Hardware - florindumitrescu94/DashBoard_PowerBox_V2 GitHub Wiki

Schematic

image

Parts required

For this project, you will need the following parts:

-Arduino Nano board with pins
-1 x 66.6 / 51.8 mm blank copper circuit board
-7 x 10k ohms resistors
-1 x 100k ohms resistor
-2 x 100 ohms resistors
-1 x 3.3k ohms resistor
-1 x 1nF capacitor
-6 x 100nF capacitors
-1 x ACS712 20A IC
-5 x PCB or pannel mounted DC Jacks
-2 x RCA/Phono plugs, pannel monuted (see picture below)
-2 x Mono 3.5mm audio jacks, pannel monuted (optional)
-2 x IRFR5305 P-MOSFET Transistors
-2 x IRLR2905 N-MOSFET Transistors
-1 x S8050(J3Y) NPN transistor
-1 x DHT22/AM2311A temperature and humidity sensor
-1 x 15A PPTC resettable fuse
-6 x 2.5A PPTC resettable fuse
-2 x 10k NTC thermistors (optional)
-1 x 3mm red LED (optional)

All resistors are SMD 0805 footprint.
100nF caps are SMD 1206 footprint.
1nF cap is SMD 0603 footprint.
ACS712 is SOIC-8,
N-MOSFET and P-MOSFET transistors are TO-252 or TO-252 SMD.
S8050 (J3Y) is SMD SOT-23 RCA sockets have a 6.3mm diameter, 5mm lenght threaded stalk that gets mounted throught the hole in the box. image image

ACS712 variant

In order to obtain a high enough headroom, but adequate resolution, I chose the 20A variant of the ACS712 current sensor for my project.
If you, for whatever reason, need to go with another variant, please refer to this table and modify the current calculation code in your Arduino file.

Variant Resolution Arduino Code
5A 185mV/A AMP_AVERAGE[AVERAGE_COUNT] = (2.5 - ((CURRENT_SAMPLE_SUM/150)*(5.0/1024.0))) / 0.185;
20A 100mV/A AMP_AVERAGE[AVERAGE_COUNT] = (2.5 - ((CURRENT_SAMPLE_SUM/150)*(5.0/1024.0))) / 0.10;
30A 66mV/A AMP_AVERAGE[AVERAGE_COUNT] = (2.5 - ((CURRENT_SAMPLE_SUM/150)*(5.0/1024.0))) / 0.066;

PCB etching

If you chose to make your own PCB, the first step is to download the files from the Documents folder here: Document.
The necessary files are pcb_copper.pdf (for the copper), pcb_topsilk.pdf (if you want to print the top silkscreen) and pcb_botsilk.pdf (for printing the bottom silkscreen).
If you are using the heat transfer method, you will probably not be able to use both a top and bottom silkscreen, since heating up one side of the PCB will melt the toner on the other.

To etch a PCB, first print the pcb_copper.pdf in real dimensions on a sheet of thermal transfer paper and cut it around the PCB border (check with your local electronics supplier for this).
Take your blank copper board, cut it to size and sand it down using 40 or 80 grit sandpaper. Then, clean it well with isopropyl alcohol, acetone or paint thinner.
Then, take the printed transfer paper and put it over the copper board, so that the printed side meets the copper, then line up the edges of the paper with the edges of the board. You can use some masking tape to fix the paper in place. Then, place the board with the bare side down and the paper back up on a piece of wood. Take your clothes iron, place another sheet of regular paper over the transfer paper, then iron them for approx 30s, applying pressure on the board and paper.

DO NOT USE STEAM! Preferably, empty the clothes iron and run it until dry before using it on the board.

After ironing, let the board cool down a bit, then gently unstick the transfer paper. The black toner should now be stuck to the copper.
If the toner is not properly transferred to the copper, repeat all the steps above untill you get a good transfer. You can touch up tiny defects using a marker pen.

Once done, you should have something looking like this. Mind the fact that, instead of bare fiberglass between the black traces, you will still have copper. I did not take a picture before putting the board in the etching solution.

image

Once the transfer is successful, take a small tupperware container and pour some etching solution. Put your board in the solution face down and shake the container to release all air bubbles that might get trapped underneath the board. Leave it in the solution for 10-15 minutes, then rinse.

Using a dremmel tool and a drill bit (0.8mm), drill out the holes for all through-hole components. To drill the slots for the DC jacks, drill a couple of holes next to eachother, then use the dremmel tool as a router to gently cut through the remaining board. Be very careful not to break the drill bits! Sand down the board once again to deburr the holes. Drill the 3mm holes for screw mounts in the corners.

image

PCB assembly

Now that we have created (or odered online) the PCB, we are ready to assemble the components.
Start with Arduino Nano board, then install the DC Jacks, then the 2.5A fuses. We will need to enlarge the holes for the 15A fuse, since they are thicker than 0.8mm. Use a 1.2 or 1.5mm drill bit to enlarge the holes, then bend the pins of the fuse so that it can lay flat and clear the Arduino board. Some component yoga will be required to acheive this, but it is necessary to keep the size of the box as small as possible.
Then, solder your SMD components. Use plenty of flux to avoid solder bridges between tracks and pads. You can use a hot air soldering station, but you can manage to do it with just a regular soldering iron with a fine tip. Clean up the remaining flux with isopropyl alchohol and q tips.

You will notice that I have used a 14A fuse. I could not find any 15A fuse, but the 15A fuse has the same dimensions, so installing it should follow the same steps. I don't think I will ever go over 5A total, let alone 14, so I am not worried about tripping that fuse too soon.

The wiring to the remaining components needs to be done as in the picture below:

image

You can chose to either connect the some wires for the other components now, or you can solder in some header pins that you can solder on later. I chose to use header pins in my project. After mounting all the components, the board should look like this (but cleaner, since I ran out of isopropyl):

image image

Measuring values for voltage dividers components

In order for the Arduino to correctly calculate the voltage and temperature, we need to provide correct measurements for the voltage dividers. First, we measure and write down the resistors for R12 and R10, that make up the voltage divider going to the A0 pin. Write them down as vdiv_100k and vdiv_10k

image

Then, measure the two resistors that make up the high part of the voltage dividers for the NTC probes and write them down. Make sure to note which is which, by marking the one going to A2 as ref_ohm1 and the one going to A3 as ref_ohm2. We will need these values later on when preparing the code for upload.

image

Enclosure

If you choose to 3D Print the enclosure, I have attached the 3D model I have used in the Documents folder. You might want to print this at 102 or 103% scale, to compensate for the plastic shrinking when cooling down. Click to download model

image

I have printed my box in PETG, 0.2mm height, 0.35 layer width. 1mm walls and top/bottom, 50% gyroid infill. You can use PLA, but it will not be UV resistant and it won't hold its' shape if you heave it in the sun (PLA gets soft at around 50-60 Celsius. PETG can go up to 80 without any trouble).
I have added thin walls to the holes to avoid stringing and support structures. Once printed, the holes can be easily cleared with a hobby knife and a drill.
To fix the lid in place, I have modeled four supports that line up with the four holes around the outside. I did not model any holes in the supports, so you will need to drill them yourself.
The hole in the lid is there for the DHT22 sensor wires to pass through. You can mount the DHT22 sensor using a screw through the lid, or with an adhesive solution (epoxy, hot glue, double sided tape, etc.). I chose to mount it on the lid, but you can mount it wherever else you want and have room to do so.

image

Once you have post-processed the 3D printed box, put the PCB inside, then mount it using three M3 screws directly in the bottom supports. Tapping the holes in not really necessary, as the screws will cut threads fine. Then, mount the phono jacks and audio jacks in theri holes and solder the wires to them/the header pins. Then, solder the DHT22 sensor wires. DuPont connectors can't be used, since the lid is too low for it to clear the wires. Feel free to alter the 3D design if you want to make it taller to allow dupont connectors to be used.

Congratulations! The hardware part of the project is complete! Drill some holes for the 4 side screws (M2 or M2.5 screws are preferable here) and close the box.

image image image

⚠️ **GitHub.com Fallback** ⚠️