Hardware - florindumitrescu94/DashBoard_PowerBox_V3 GitHub Wiki

Schematic

schematic_186

Parts required

For this project, you will need the following parts:

-Arduino Nano board with pins
-1 x 76mm x 72mm one sided copper circuit board
-11 x 10k ohms resistors
-1 x 100k ohms resistor
-4 x 100 ohms resistors -6 x 1k ohms resistor
-1 x 1nF capacitor
-1 x 470uF capacitor (thorugh hole) -6 x 100nF capacitors
-1 x 47uF capacitor (6.3mm dia through hole) -1 x ACS712 20A/30A IC -2 x 817C through-hole Optocouplers
-6 x PCB mounted DC Jacks
-2 x RCA/Phono plugs, pannel monuted (see picture below)
-2 x Mono 3.5mm audio jacks, pannel monuted (optional), for EXT
-5 x SUD50P04 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
-2 x 2.5A PPTC resettable fuse -6 x 5A PPTC resettable fuse
-5 x 0805 red SMD LEDs
-some leads or wires to act as jumpers. -OPTIONAL: LM7509 to keep the Arduino on if USB is disconnected.

All resistors are SMD 0805 footprint.
100nF caps are SMD 0805/1206 footprint.
1nF cap is SMD 0603 footprint.
ACS712 is SOIC-8,
N-MOSFET and P-MOSFET transistors are 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 Construction folder. The necessary files are copper.pdf (for the copper), top_silk.pdf (if you want to print the top silkscreen) and bottom_silk.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 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 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 (1mm for the Arduino and headers pins, 0.7mm for the capacitor and optocouplers), 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. Drill out the 6mm holes that allow the two cap screw posts to pass through the PCB, or even create a slot stretching to the edge of the board, as shown in the picture.

447337093-b573c654-c1bf-4e05-91e8-2ceac6c227b1

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.

**IMPORTANT!: INSTALL THE 47uF capacitor between the RST and GND pins of your Arduino, otherwise, it will time out on connection.

WHEN WRITING NEW FIRMWARE: When the IDE Switches from Compiling Sketch to Uploading, press the Reset switch on your Arduino. If it fails, try again. Timing needs to be right.**

Install the 2.5A fuses for the PWM outputs and your choice of fuses in the 5A/JMP slot beside each DC Output. 2.5A could work fine, but 5A should be more fitting for any device. Install a big fuse after the input DC jack (15A, maybe even 20A). The MOSFET transistors are capable of handling up to 40A, much, much more than your regular astro setup would use.

The wiring to the remaining components needs to be done as in the picture below, except the R2 and R1 resistors.

If you want the Arduino to stay on when the USB cable is disconnected, install a LM7509 voltage regulator to power the VIN from the DC In voltage.

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 in the pictures above and below:

447337073-c8e7a707-eaac-4a86-8880-c21b3bf1ad9d

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 R2 and R1, that make up the voltage divider going to the A0 pin. Write them down as vdiv_100k and vdiv_10k. It is important to measure them OUTSIDE of the circuit, BEFORE installing them. Measure their values, then solder them to the board. To obtain the correct value to use in the Arduino code, divide vdiv_10k by vdiv_100k, then write it down here:

image

image

Enclosure

If you choose to 3D Print the enclosure, I have attached the 3D model I have used in the Construction folder.

I have printed my box in PETG. 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).

There are no holes for the two optional External jacks, as there might be a small number of people that will actually need them, so, to avoid overcomplicating the project, I've built the model with solid walls. If you need to have the external controls, drill the necessary holes for the external connectors and mount them where you wish to.

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.

20250525_155633

Once you have post-processed the 3D printed box, put the PCB inside, then drill some 2.5mm holes in the plastic stand-offs. Tapping the holes in not really necessary, as the screws will cut threads fine. Solder the DHT22 sensor wires, or use a header connector. This step is not 100% mandatory, as the PCB is held in place by the case, anyways.

Put the lid on the box then fix it using 4 M3x8mm screws (the plastic will tap easily and hold the cap in place)

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