Supplino is a Quick & Dirty PSU (Power Supply Unit) made with some widely available breakout boards, an Arduino Nano (or an Arduino Nano Every) and a graphical LCD.
Power output is given by a DC/DC buck converter based on the XL4016E1 IC with possibility to regulate the output voltage. Regarding the power input, we prefer feeding it through an external 20รท30V brick PSU such as the ones used for laptops or old printers: this solution is safe and cheap, but you can choose to use a larger enclosure and then include internally your own transformer+diode bridge+capacitors but with a lot of precautions. We used this project to recycle some old printers PSU that have an output voltage of 24V.
Arduino does not manage the buck converter module but only measures output voltage and current through a current sensor and then shows those values on a display. Power value is showed too. An additional analog gauge can be configured for showing voltage, current or power value giving some retro style to the graphics.
Power output on the banana socket is feed through a relay, so Arduino detaches the output power sensing an external pushbutton or on alarm events (short circuit/under voltage, over-load, over-voltage).
There is a secondary DC/DC buck converter module set to 5V for powering the logics, taking input from the same input of the adjustable module. Eventually you can port also this 5V on the panel (making adjustments to the provided enclosure).
We choosed this configuration since is cheap, simple and fully adaptable to other kinds of voltage converter designs, so the final user can choose whatever he want, also based on old-style linear voltage regulators such as the LM317 or LM338K. Anyway you must use the exact parts listed in the BOM if you want to use the provided enclosures you can 3D-print yourself.
We named it Supplino since we like a lot an italian snack typical of the roman cuisine, called Supplรฌ and because is the contraption of "Supply" and "Arduino".
The XH-M401 buck converter moduleThe XH-M401 module is based around the XL4016E1 buck converter IC. It can accept as input 4รท40V and gives an output 1.25รท36V. Manufacturer of those boards states a maximum output current of 5A that can be increased up to 8A by adding a fan, anyway we never used it for currents above 2A so we not tested it above 2A.
This module has a switch-potentiometer for turning on/off the module and adjust the output voltage. The output current on this specific module is fixed to the maximum allowable by the buck converter IC.
For using this module with enclosure we've designed and provided here you must remove the switch-potentiometer because we will use an external multi-turn potentiomer:
Then connect to the pads a 50K Multi-turn Potentiometer (we used a JST-XH 3 pin connector for connecting the potentiomer) and then close the switch pads with a piece of wire (you'll turn on/off the module with the panel switch):
It's absolutely not adviced using a standard single-turn potentiometer such as the one provided with this module since you'll not be able to adjust the voltage in a stable and fine way.
I gave further info on this Buck Converter module in this post and further info on the original switch/potentiomer removal here.
A new model of this Buck Converter module exists having also the possibility to regulate (limit) the output current (link). This module has the same circuital design of the used XH-M401 but buck converter and double diode are mounted on two separates heatsinks resulting in a larger board and it hasn't the switch-potentiometer but 2 multi-turn trimmers for adjusting voltage and current. In this case you'd remove both the trimmers, changing them with multiturn potentiometer (for voltage) and a standard single-turn linear potentiometer (for current - or a multi-turn if you want). But consider that in this case the provided enclosures will not usable anymore, so you must do your own design or choose a commercial one: a second potentiometer on the panel will require more space so a larger design.
Circuit AssemblyNo particular indications: follow the schematic, we've not designed a PCB, since circuit is very simpe we used protoboards and wire-wrapping. There are some indications on used protoboards in the enclosure paragraph. Those steps are very important and have to be fullfilled first:
- Feed power in the buck converter module (LM2596). This module will be used for giving 5V to logics (Arduino, display, level shifter). Turn the trimmer on the board until you read 5.00V with a multimeter on the output pads. Usually a lot of turns are needed: if nothing happens after a lot of turns, try to turn in the opposite way.
- Modify the buck converter module (XH-M401) for having the external multi-turn potentiomer and close the switch pads as explained above.
- After you mounted all, first than attach the Arduino, check with a multimeter all the connections.
- Display will be powered with the 5V on the Vcc: it have his own regulator on board but signal logic level must be at 3.3V hence the level shifter.
You can use an Arduino Nano or an Arduino Nano Every. If you want to use an original Arduino board (adviced), better use the Every since is more capable (=more code) and costs less.
If you want to use the Arduino Nano : Select the board from Tools > Board > Arduino AVR Boards > Arduino Nano
. Most of non-original Arduino Nano boards requires to be configured in Arduino IDE for using the old bootloader: Tools > Processor > ATMega328P (old bootloader)
.
If you want to use the Arduino Nano Every: Pinout of this board is compatible 1:1 with the Nano so no modifications are required. You will not find this board under the same menu of the Arduino Nano but from Tools > Board > Arduino megaAVR Boards > Arduino Nano Every
. For using the code unchanged select also Tools > Registers Emulation > ATMEGA328
We've designed 2 different enclosures since we worked on the enclosure design following our personal taste. They're both obtained through the Ultimate Box Maker by HeartMan on Thingiverse and we've modified for modules we used and listed in the BOM here. Eventually you can download and customize the original enclosure project from Thingiverse if you want to make your own enclosure.
Here the two enclosure variants are described
Enclosure Variant 1
- Dimensions: 140x170x60 (Width x Depth x Height)
- Thickness: 2mm
Internally there are 2 sets of 4 feets: one set is for the XH-M401 module (switching regulator based on the XL4016E) and another for a 50x70 protoboard. On the 50x70 Protoboard you can mount connectors, the LM2596 module, components (resistors, capacitors) and the Arduino Nano.
You must insert M3 6mm brass inserts in the feets using the soldering iron at lowest temperature possible from your soldering iron.
Internally in this enclosure there are 2 slots too: one is for the relay module and another for the ACS712 breakbout board, you must fix them in the slot using a piece of double-sided tape.
Display will be attached on the front panel by screwing 4 short M3 screws without using inserts, directly in the plastic feet. You'll use a 30x70 protoboard on the back of the display for attaching the level shifter and cables:
On the rear panel you will attach the Power Jack socket and the fuse holder. Here is a top-view of parts in the Variant 1 enclosure:
For the Back panel of the Variant 1 there are 2 different designs: both will contain input socket and fuse holder while the panel_back_usb.stl
has additional holes for attaching an external USB-Type B panel connector:
This external USB connector will be useful to reprogramming the Arduino without open the enclosure and for eventual future revisions where the USB could be used for reading display and set certain values.
Here is showed how we attached that connector:
We've used this cable but warning: this specific cable is good only if your Arduino Nano has the USB MINI connector (such as some third-party Arduino Nanos) so for sure is not good with the original Arduino Nano Every since uses the USB MICRO.
Enclosure Variant 2
- Dimensions: 140x155x55 (Width x Depth x Height)
- Thickness: 2mm
There are 2 sets of 4 feets: one is for the XH-M401 module (switching regulator based on the XL4016E) and another for a 50x70 protoboard. You must insert M3 6mm brass inserts in the feets. There are 2 slots too: one for the relay module and another for the LM2596S step-down regulator. Arduino Nano and current sensor ACS712 breakbout board will be mounted on the protoboard. Front panel contains pushbutton, display, output sockets, potentiometer while Back panel contains toggle switch, input socket and fuse holder
Source code is provided in the Github repository linked in this page. You must made some adjustments to fit it with your parts.
The RELAYON macro is defined as LOW because our Relay board will turn on the relay when receive a low logic level:
#define RELAYON LOW
If you intend to use a different relay board, change it to HIGH.
Set your maximum values for current and voltage in these two macros:
#define CURRENTMAX 2 // A
#define VOLTAGEMAX 33 // V
This will depend mainly on used input PSU.
This macro is used for the undervoltage alarm:
#define VOLTAGEMIN 1
The used variable Buck converter module can output a minimun of 1.25V, so a voltage under 1V will considered as a short-circuit. Change it only if you intend to use your own design.
This constant is used for measuring the voltage from the buck converter through the voltage divider:
#define DIVIDERCONST 0.12821F
On the voltage divider we've used R1=68K and R2=10K so this value comes out from the voltage divider formula R1/(R1+R2). The voltage divider can accept up to 35V as input for giving a voltage to Arduino Analog input of 4.48V, don't exceed those values or Arduino will blow up.
This costant is for to the variant of ACS712 current sensor used:
#define ACSCONST 0.1F
The model used is the 20A one that has a resolution of 0.1V per Ampere, so we put 0.1F here.
After you mounted all, measure the PSU voltage output with a multimeter then check the value showed on the Supplino display against the value showed on multimeter. If there are differencies, you can adjust it using this macro:
#define VOLT_ADJ(V) V+0.2F // your own formula
I put V+0.2F because my multimer reading was 0.2 higher than value showed on display, so I must add 0.2V to the reading to have a correct one.
Then measure the current. You will need a power resistor. I've used a 39Ohm 5W resistor and I'll make an example with this. Feeding 8V in a 39Ohm resistor will result in a current absorption of I=V/R => 8/39 => 0.21 A.
You can measure the precise value of the resistor with the multimeter and precise value of the voltage output and then use the above formula for calculating the current or you can connect a multimeter in the Current position in series to the resistor and read the showed value.
As done for the voltage, do the same with the current in this macro:
#define CURR_ADJ(I) I-0.015F
I used a third decimal even if not showed (supplino uses 2 decimals) because my current value was floating.
Supplino UsageWhen you turn on Supplino, there is no voltage on the output sockets: this because the relay is OFF. The power OFF condition is showed by the grey circular indicator on the display and the whole display in B/W.
In this conditions, the voltage is measured anyway since the buck converter output is connected to Arduino through voltage divider first than the output relay, so you can modify it by turning the potentiometer first than activate the output.
Make a short press on the button: relay will turn ON activating the power output. Display get colored and the circular indicator become green:
In this condition the current output is measured and power (active power) is calculated by multiplying measured voltage and current. Since the ACS712 is not the best current sensor in the world, you will see the current float.
In case there is an anomaly on the output (a short circuit, an over-voltage/current) this condition will be detected from Arduino through the current sensor or the voltage divider and Relay will go OFF disconnecting the power output and giving an alarm by turning red the round indicator on display:
In this condition you must remove anything you've connected on the output, press and release the button for a first time to reset (circular indicator become grey), then press and release a second time to re-activate the output.
In any condition, by keeping the button pressed for more than a second, the analog gauge will change indicating voltage, current, power. Release the button for keep the indicator you choose. Anyway this setting is not kept so to the successive usage the analog gauge will always start showing voltage value.
Comments