User Interface for Unilab2 Power Supply

A user interface with LCD and rotary encoders for the Unilab2 power supply.
This project is an add-on for the Unilab2 power supply, published in and at Elektor Labs.
The Unilab2 has a potentiometer to set the output voltage and the maximum current. A carbon film potentiometer tends to wear out prematurely and they are a bit "old school". Also, for reasons of cost, the Unilab2 does not have a display. Setting the current limit is a bit like flying blind, as there is no feedback. The actual value of the current is available as a proportional voltage (on K3) but with quite some tolerance and the voltage must be corrected to obtain the real valiue of the output current.
The Unilab2 has a potentiometer to set the output voltage and the maximum current. A carbon film potentiometer tends to wear out prematurely and they are a bit "old school". Also, for reasons of cost, the Unilab2 does not have a display. Setting the current limit is a bit like flying blind, as there is no feedback. The actual value of the current is available as a proportional voltage (on K3) but with quite some tolerance and the voltage must be corrected to obtain the real valiue of the output current.
My approachnter A 4 x 20 LCD shows nominal voltage, actual power, and the current limit. One rotary encoder is used to set the output voltage and another to set the maximum current in 0.1 V / A steps. Three preset pushbuttons with LED indicator have been added as well. With these buttons one can select one of three fixed output voltages: 3.3 V, 5.0 V, and 12 V.
The actual value of the current is measured with an ACS712 [not suitable for new designs, use AC723 instead] current sensor and captured at the PC1 analog input. The setpoint for the current limitation can be chosen in this mode.
The two LEDs available at the Unilab2 board can be moved to the display board as well.
Prototype The project was created in Target V19 and the prototypes are finished. Of course, the board dimensions (160 x 110 mm, W x H) are tailored for my enclosure. A 100 x 60 mm cut-out in the top half provides space for the display. The the copper side of the board is mounted to the front panel with the display plugged "in reverse" on a header on the component side. The rotary encoder is on the right together with the three jacks Plus, Minus, and Ground. The preset voltage pushbuttons are nicely alligned.
When in Preset-Voltage Mode, pressing the built-in pushbutton of the rotary encoder will switch back to Variable-Voltage Mode.
The firmware is written in Bascom. The program and all its functions have been tested extensively on a Breadboard and works fine. I've measured the setpoint voltage at the wipers of the MCP42xxx with two multimeters and they showed exactly the desired values. The Unilab2 expects 0...5 V at the wipers of P3 and P4.
Conclusion If a higher adjustment resolution is desired, a digital potentiometer IC with 512 steps can be used. The MCPxxx has 256 steps.
U_I Display_Unilab2 construction of the prototype variant 2
I have now carried out the test of the prototype variant 1 with the Unilab 2 after exchange R11 = 91K 1% and R12 = 11.3K 1%. This resulted in a very good match of the voltage actual value on the multimeter as well as on the display in idle and under load (5W). I noticed that the Unilab2 at 30V setpoint under load about 500mV higher, but also there very good match. This resistance combination is available from the relevant distributors. An attempt would be worth ordering the two resistors with 0.1%.These resistors should also be used in the final version. Of course, the option with R11 = 100K and R1 = 25K remains open.
There is still a change in the two final versions. I have changed the layout around IC8 (5V fixed voltage IC) so the through-contacts are no longer there under the lying IC. Nevertheless, the mica disc should not be dispensed with.
Conclusion: Those who have the prototype variant V1 under construction can live well with the change of R11 and R12 also with variant. By the way, the three large boreholes serve the banana bushings as a guide to earth U+ and mass.
By the way, AZ Delivery also has the port expander without a display. This would free the way to use a different display and different color.
The two Gerber files with the layout changes are attached. .With version V2 it is also possible to control other power supplies on the setpoint side. Prerequisite setpoint voltage is 0 to 5V.
Yours sincerely
Dieter Aschmann
Power supply front end control version 3
The time has come. The power supply front end control for the Unilab 2 based on MCP49xx has been completed as a prototype. In the current part of the project I used the MCP4912. This DAC has a resolution of 10 bits corresponding to the resolution of the ADC of the ATMega328P. The signal processing of the actual current value is now carried out completely as a hardware solution using MCP602. As a current sensor I used an ACS723 as a +/- 5A variant. It is a BOB with ACS723 from Sparkfun. This variant of the ACS723 provides a voltage of 2.5V at its signal at 0A. An opamp of the MCP602 is connected as a differential amplifier. According to the data sheet, the output of the ACS723 delivers 400mV per ampere. Since a current measurement range from 0 to 5A is programmed in the Bascom project, the signal is multiplied by 2.5 with the 2nd OPV of the MCP602. A reference voltage of 5V is available for the MCP4912 as well as a value set by a precision trimmer for the differential amplifier. The trimmer must be set so that it is attached to the ADC input of the ATMega328P 0V. In the Bascom program it must be noted that the 16 bit wide register of the MCP2912 with bit 0 starting with 12 bits contains data for the output value. But I use the 10 bit variant, so the bits are multiplied by 2 digits to the left here by 4. Then the data word is wrong in memory and the swap statement is used. Subsequently, the data transfer takes place with the sub-routine.
Everything works perfectly. For the setpoints, the fixed values as well as the variable values can be set very precisely. According to the data sheet of the MCP4912, 4.96V should be set at 10 bits. The result measured with my multimeter 4.9x. The x fluctuates around the 5. This cannot be done any better. If you set 3.3V then the setpoint voltage also corresponds to the selection. 15V are very accurate 2.4x V where x oscillates around 5 again. The same result is also achieved by the setpoint of the current limit 3A resulting in 4.9x V also here oscillates x around the 5. 1.5A is linearly beautiful in the middle. I am very satisfied with the measurements, if you want to have the setpoints even closer, you should choose the MCP4922 and make the changes in the well-commented program.
To the actual value display current. ACS723 +/- 5A type I used a wire resistor 10W measured cold resistance 4.7Ohm and connected via an external laboratory power supply 5V +5V to resistance its other end at the +input of the ACS723 (BOB Sparkfun) – the BOB to -5V of the laboratory power supply. After switching on, a current of 1A could be read. The current decreased to 0.92 A with the heating of the resistance. Same procedure with additional multimeters inserted. Both results multimeter and test object were very close to each other. Calculator result is 1.064A. I can be very satisfied with this result. The warming of the resistance actually starts immediately.
The actual value voltage measured and displayed with multimeter accuracy has a very good agreement at 15V and 30V. The voltages are also here from the laboratory power supply.
If you measure R11 and R12 for good agreement, then my measured values result. If the user wants to spend more money then 0.1% tolerance would be an option.
What do current laboratory power supplies have, what does my project not have? Laboratory power supplies have an on/off button my project does not have that and the UNILAB 2 does not have that either.
The MCU no longer has a port pin free, the MCP4912 has a shutdown pin and this is set to +5V = VDD. You can't intervene. After starting frontend, the current setpoint is 0.0A. Therefore, there is no danger for the hardware at first.
I see one possibility in the shutdown pin of the switching regulator IC of the Unilab2. Drag this pin to GND with a latching button and the function would be 100% fulfilled.
It is possible to link my project to other self-made power supplies. Prerequisite is the setpoint voltages must be 0... 5V.
Yours sincerely
Dieter Aschmann
Updates from the author
Dieter Aschmann 4 years ago
The bug I discovered during an intermediate test is found and fixed. I found that the output voltage on the Unilab 2 for about 200mS was up to 14.6V. After a welcome message on the display, the phenomenon was already gone.
A glance at the data sheet told me that the two potentiometers are in the middle position after VDD = +5V was attached. After the first Config Write command later, the two potentiometers took the desired positions.
Another study of the data sheet brought me to the possibility of software shut down mode. The application.
Software Shut Down mode is possible if pin 12 [VDD] is the MCP42010 High. That is the case here.
I put the shut down right after the initializations and inserted the Timer0 ISR a little later.
The following test was carried out to my complete satisfaction.
One more word about the Bascom source code.
Since the Imess signal is generated with the better used double OPV in the Final Target projects and then always 0 to 5V is used no matter which ACSxxx is used, the commentary must be taken into account in the current Bascom source code !!!
Currently, the Hex file is the compillat of version with ACS712 without hardware solution in the Target Final project. So if you have equipped the original version of the board and equipped R11 with 91K and R12 with 10.2K, you can use the Hex-File. In the other case, the comments must be observed and new to compiums.
Have fun testing
Dieter Aschmann
Dieter Aschmann 5 years ago
Dieter Aschmann
Dieter Aschmann 5 years ago
Final Projekt (79kb)
Final Projekt (13kb)
Final Projekt (32kb)
Final Projekt (33kb)
Final Projekt (13kb)
Final Projekt (91kb)
Final Projekt (32kb)
Final Projekt (32kb)
Dieter Aschmann 5 years ago
Dieter Aschmann
Schematic (29kb)
Aktualisiertes Targe Projekt (145kb)
CAD Projekt (105kb)
fmmech_24 5 years ago
Thanks for sharing!
fmmech_24 5 years ago
Dieter Aschmann 5 years ago
Dieter Aschmann
U_I- Display Korrektur Update (29kb)
XGerber File neu (79kb)
Dieter Aschmann (29kb)
Update (29kb)
Update (134kb)
Dieter Aschmann 5 years ago
Changes:
Prototype construction 1 Variant. Component LM336_5 used for IC2. When putting into operation / voltage check at the IC Sockets, was not AREF. At LM336_5.0V (there's no datasheet) in TARGET 3001 V19 but in the database??? Component corrected changed in LM336Z-5.0V and on board. AREF is now exactly adjusted to 5V.
For those who already have boards of version 1 in progress, you can rotate by 180 ° IC2, then functionality is available.
For all users who want to directly insert the BOB ACS712 (20A) in K9, I've moved K9 slightly to the North.
For S7, S8, S9 MEC must be soldered must switch 5GTH935xx. Pin numbering on the back of un due note, it's also about 180 degrees twisted to solder. built-in LED XX stands for the color. Adjust to R7, R28, R29! XX = 22 = green value would then be 470 Ohm.
100 K = voltage divider for Umess1 R11, R12 was changed from 18 K to 20 K and tested with Multisim blue. Measuring range 0 now... 30V. Bascom program now changed due to changes in the value of R12 from 18 K to 20 k. Measuring range is now 0... 30V.
The IC TS912IN (rail-to-rail) is hard obtained a Dil version. New type is now MCP602-I/P.
It follows now first start-up with injection of 0... 30V from the laboratory power supply unit and Bob ACS712 with closed briefly entrance examination to 0A in the display (is). The setpoint values for voltage and current are with multi meter to 0... Checked 5V. Is that all right is connected with the University Lab. There is solder jumper on the circuit board. Once you can use the 5V in the circuit board. Jumper the other way around used the 5V from the University Lab. That's only because yes my project with other power supplies should go.
All images, display of actual value voltage and actual power using an external lab power supply were. In the next step we a Unilab 2 PCB prototype connected to full functionality to test.
Dieter Aschmann
Bestückungsseite (144kb)
Iist 0.4A Strom durch Sofitte (149kb)
Lötseite (146kb)
Nach Reset X5 Spunnung einstellbar (139kb)
Extern 3V3 als Uist (150kb)
Extern 5V0 als Uist (151kb)
Extern 12V0 als Uist (125kb)
Sollwert 3V3 Fest (143kb)
Sollwert 5V0 Fest (143kb)
Sollwert 12V0 Fest (141kb)
Usoll 30V0 (145kb)
Projektänderungen (145kb)
Schematik als PDF (30kb)
Aktuelles Bascom Projekt (34kb)
fmmech_24 5 years ago
Alternative für IC5? Könnte ein ICL7660 passen?
mkg.
Dieter Aschmann 5 years ago
Unilab2 Back (4930kb)
Dieter Aschmann (4kb)
ACS723 BOB (4kb)
XGerber File ACS723 Bob (12kb)
Dieter Aschmann 5 years ago
3V3 Fest (200kb)
5V0 Fest (192kb)
12V0 Fest (187kb)
15V0 Variabel (186kb)
30V0 Variabel (188kb)
Knob X5 Press Reset to Variabel (198kb)
Start Screen (192kb)
Syl 5 years ago
Ayant monté, il y a quelques années de cela, l'alimentation UniLab je serais trés interressé par votre montage UI Unilab2.
Cordialement et bravo pour ce que vous faites.
SABATIER Sylvain