The Electronics

I've posted screen prints of the breadboard layout, what the circuit looks like when built on matrix board, a schematic as a PDF and the original Fritzing files. This isn't particularly complex electronics and is there to mount limiting resistors, buffer amplifiers and fan out connections for the Arduino board. But there are several images to show the many connections a bit more clearly. Most of the wiring was made up from standard lengths of pre-crimped dupont ribbon cable reassembled into multiway housings to make them both easier to re-plug and more reliable.

 

The Arduino Mega 2650 is mounted in the lid with the USB socket available for programming. It drives the TFT touchscreen used to display all outputs and inputs.

 

8 digital inputs are made available via a 2 x 8-way PCB header and their status displayed on the screen if that function is selected. This is a simple on/off display, red off, green on. I may add oscillating as a future change.

 

4 voltage inputs are also made available via the PCB header, and a voltage divider, the voltage displayed on the screen. Each input voltage on the front panel, with reference to the common ground, is passed to a divide by 7 voltage divider and then buffered by one of four op-amps in a TL074 configured as a rectifying amplifier, just to avoid accidents with negative voltages. Would be nice to add a polarity indication at some stage but not this time round. Output from each op-amp is to one of the ADC inputs of the Arduino.

 

A further PCB header exposes both serial and I2C connections. This was done to allow implementation of a serial display console and a basic I2C identification function.

 

The voltage/digital inputs may prove to be not all needed so they may be re-configured to provide digital switching outputs.

 

The Arduino powers a resistance array on a voltage divider to provide a resistance meter functionality. The output of this is buffered by an op-amp (half a TL072) before being read by the Arduino and the resistance calculated. The purpose of this is not accurate resistance measurement but to identify E24 series values quickly, though with some calibration it could be used as a basic meter. It's operation is to detect when a resistance less than 9M9 is present on the two springs mounted on the front panel and then selectively switch 5V to each resistor in the divider array until the value closest to 2.5V is measured or the last resistor selected, a calculation and comparison is then made to determine the E24 value closest. The 5V is sourced from digital outputs 3-10 on the Arduino which are reconfigured as high impedance inputs between each measurement to minimise errors. Arduino pins D3-10 were deliberately used as a future addition might be a capacitance meter using the PWM capability of these outputs which could potentially only be a software change.

 

A modified INA3221 board provides additional voltage and current measurements via the I2C interface with inputs from the front panel. Everything is wired using jumper cables so that the reassignment of functions will be easy in the future.

These are the connections to the Arduino Mega board. As far as I could, the colours match in the diagrams and in the photographs.

This is the small piece of matrix board which was used to construct the electronics. The diagonal cut on the left is due to the negative voltage generator being part of the board originally but I then decided to put this in with the main power supply components.

 

INA3221 adjustments

This was intended as a quick fix to provide voltage/current measurements in the box but it turned out that as implemented on the board I bought it was intended to monitor battery charging so had to be modified to provide three independent measurements. If when building this project you can source an INA3221 board which implements this chip as per the datasheet then this isn't necessary.

 

Looking at the picture, three cuts have to be made in the PCB traces to separate the measurement resistors. The pads for these three resistors also have to be cut to separate them from the rest of the PCB. The resistors are then joined to the pads by soldering additional wires as bridges. I'm documenting this because this is a common board and may be the only one available.

 

Connections to the board from the front panel are then made via jumper leads across the measurement resistors.

 

The power for the board is taken from the Arduino 5V pins as is the ground, with the I2C connections going to the electronics PCB.

 

Since doing this, I've found INA3221 boards from other manufacturers that don't implement it in this way and are ready to use. These are on a black pcb with sharp corners, the one with the common connections are on purple pcbs with round edges.

 

 

The Display Screen

This was an eBay purchase and available from lots of sources and is an ILI9486 powered display. I found that it ran best with the MCUFRIEND libraries of David Prentice but it does have to be calibrated before use which just required that one of the library examples provided by David is run with the screen connected, follow the instructions on the screen and write down the displayed parameters, inserting into the Arduino_Workstation_v01 code file if different.

 

For this project a touch screen is essential, it revolves round not having dedicated switches and the facility to just add menus and functions in the future without lots of rewiring.

 

 

Connecting it together

The Arduino Mega is located on the LHS of the lid, with its USB and power ports accessible from outside the case. On the RHS next to the Arduino are the electronics mounted on matrix board and above this is mounted the INA3221 board on the rear of the lid.

 

Also on the rear of the lid at the LHS above the Arduino is a common ground connection board to which all grounds are connected.

 

As many leads as possible were consolidated together into multiway connectors. This makes plugging the circuits together much easier and reliable, and the mutual support of connectors in a multiway housing provides improved resistance to coming loose. A list of these consolidations follows.

 

All the connectors were added in a logical manner giving greatest access for making connections with my clumsy fingers, leaving the front panel connections until the end, with the final display connections being passed through the mounting hole to be completed last. The screen was fixed in place with a 3D printed bezel.

Consolidated leads

  1. Voltage and resistance inputs to the Arduino ADC ports, five leads 20cm with individual male connectors on one end consolidated into a six way housing with a gap to accommodate the gap in the Arduino headers.
  2. 4 way 10cm cable from a four way housing to two 2 way housings to connect the voltage pins on the front panel to the circuit board.
  3. 8 way 10cm cable from a 2x4 way male header to a 8-way female header
  4. 4 way 10cm cable from 4 way female housing to 4 way female housing to connect Serial and I2C to front panel
  5. 4 way 10cm cable from 4 way housing to four single connectors to connect INA3221 to front panel
  6. 4 way 20cm cable to connect four way female housing to four way male housing to take Serial and I2C from Arduino to circuit board fan-out.
  7. 8 way 10cm cable from 8 way female housing to 8 way female housing to take digital inputs from front panel to circuit board.
  8. 8 way 10 cm cable to take 8 way female housing to one 3 way male housing and one 5 way male housing to connect the resistance divider to the circuit board. The two housings are used to accommodate the non-standard gap in the headers on the Arduino board.
  9. 2 way 20cm cable to take 2 way female housing to two single male connectors for the INA3221 power supply.
  10. 2 way 10cm cable to take 2-way female housing to two single female housings to connect the third INA3221 monitor connection to the front panel.
  11. 2 way 10cm cable to take 2-way female housing to 2 way female housing to connect the INA3221 to the I2C fanout connections.