Author Topic: Portable Adjustable Power Supply  (Read 1141 times)

0 Members and 1 Guest are viewing this topic.

Offline Lazyboy

  • Contributor
  • Posts: 10
  • Country: si
Portable Adjustable Power Supply
« on: June 12, 2018, 10:33:51 am »
Hello EEVblogers!

This is actually my first post on this forum. I ocasionally watch Dave on youtube, and ofc, he recomends his forum, so that is the reason I wanted to share my master thesis project with you. The project I'm going to talk about has been in my mind for quite a while now, but since i had classes and exams, I never really had the time to do it. I recomended this project to my mentor at my university and he agreed I should do it as my master thesis. At first, the project didn't seem that hard to do and I was afraid it was too easy of a project for a master thesis, but now that I am a couple of months in, I think its quite OK. Anyway, this is it, please dont shit on it, I want your honest opinion.

Being a person from Croatia, interested in engineering, never had money, I allways found a way to do a project cheap and easy. Doing the projects, I never had any good equipment. Cheap soldering iron and multimeter from China were, and still are my best equipment. A friend has a SMD oven so I dont have to worry about SMD components. The next thing, in my opinion, a young engineer needs a good adjustable power supply. Since power supplies on the market are mainly big and bulky, but also non user-friendly and can be expensive, and me, never really needing more than 12V, 1A, I've set a goal to make myself a cheaper, smaller and portable power supply, instead of constantlly using 9V batteries or 5V USB power banks or buying a bulky power supply.

The first thing was to set some rules. I followed Dave on some, but I have also made some of my own:
  • 12V 1A supply (1A @ 12V max)
  • constant voltage, 100mV step, can be more precise down to 10mV
  • current limit/constant current (0-1000mA), 1mA step
  • current draw measurement (0-1000mA)
  • linear voltage output (low noise)
  • output down to 0V
  • button for load disconnect
  • battery powered/uninterupted portable supply (Li-ion)
  • 12x12x5 cm max
  • touchscreen for ease of use(can be used to set everything, cheap resistive ts)
  • incremental encoder for smooth parameter setting (infinite turns,Dave: encoder is a must, better than pot)
  • 4mm banana female connector (OUT and GND)
  • bottom breadboard connector (you can plug breadboard on the bottom of the supply)

Picture you can see on a link below is a rough sketch of it, so you get a basic feeling for it. It is not a final design.
https://prnt.sc/jtyy3f
http://prntscr.com/jtzrnz

I got the touchscreen and wrote a lib for it, I'm using STM32L4 MCU, wrote a lib for encoder, and after all, in a couple weeks or a month, I've made a detailed schematic, simulated it, drawed it in the pcb designer and sent it to be made. Before I continue, I have to say, whenever making a project that requiered a PCB, I went with a local manufacturer in Croatia, payed 40$ for 5 PCB, waited a week and had to pick them up. Now for the first time I tried something else and I was pleasantly suprised. I saw on Great Scotts channel on youtube, JLC PCB manufacturers, and decided to give it a try. They have an offer on 10 PCBs for 2$!!!! DHL costed me 23$ and everything came to my doorstep in 5 days time. It is odd to pay 10 times more for the shipping, but the PCBs are high quality. I never before used 0.3mm vias  :D  They are really great and you should check them out. https://jlcpcb.com/

PCB:
https://prnt.sc/jtzopc

Now I'm just waiting for the components, Ill solder them on and test everything with a MCU i have on a separate board.

Anyways, what do you think about my project? Is there something to add or remove? Is is good and would you like to have one of these?

« Last Edit: June 12, 2018, 10:40:57 am by Lazyboy »
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 944
  • Country: ar
Re: Portable Adjustable Power Supply
« Reply #1 on: June 13, 2018, 06:48:19 am »
Hi! Nice project!

I'd like to have the libs, doing a lot on STM32 and libs are always helpful, HAL kind of suck, code ends up being HAL_Lib_soooo_Freaking_non5sense_looong34_t32_.

I like to see the set voltage as well as the actual output voltage measured back, when it hits current limiting even more as they don't even should agree.

JS
If I don't know how it works, I prefer not to turn it on.
 

Offline Lazyboy

  • Contributor
  • Posts: 10
  • Country: si
Re: Portable Adjustable Power Supply
« Reply #2 on: June 13, 2018, 07:24:48 am »
Hi,

I agree with you totally. Sometimes, it is really confusing to use HAL libs.  :-+

For the project, there are few chips that control the voltage and current limit, and I simply "comunicate" with them using HAL ADC to set voltage reference for voltage adjustment and my own I2C lib to set the current limit. There is nothing spetial about those libraries. But if you need a library for chinese ILI9341 LCD and touchscreen, I can send you that. There was a lot of hassle making those because the chinesse offered little to no documentation.

I'm planning to make the project open source in the future. I just want to finish it first because there are still some unknowns.

Glad you like it!
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1100
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Portable Adjustable Power Supply
« Reply #3 on: June 13, 2018, 07:40:49 am »
Where is the schematic?
 

Offline Lazyboy

  • Contributor
  • Posts: 10
  • Country: si
Re: Portable Adjustable Power Supply
« Reply #4 on: June 13, 2018, 07:48:23 am »
As I said, I will make it first and give out the design after I finish it. Also the schematic is not fully finished just jet, there are things in testing and things I will improve.
« Last Edit: June 13, 2018, 08:33:58 am by Lazyboy »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 8011
Re: Portable Adjustable Power Supply
« Reply #5 on: June 13, 2018, 07:55:04 am »
I assume the plan is to use a pair of them when you need positive and negative supplies.   I have a few suggestions for you:

IMHO the integrated breadboard connector is just not worth having.  It's vulnerable to physical damage, can easily be shorted by conductive objects on the bench, wont fit all common types of breadboard, and restricts access to that end of the breadboard.  Instead put a row of five Arduino style female headers next to each output terminal so multiple m-m breadboard jumpers can be plugged in for each rail.

One quite often needs to go a bit over 12V.  Adding another LiPO cell and designing it to go up to 15V would help considerably when working with older OPAMPs or circuits designed to run off a nominally 12V lead acid battery - either floated at 13.8V or an automotive supply which is typically around 14V with the engine running and can often reach 15V.

Consider adding an interface (with optoisolated input) to allow you to gang two together so their voltage and current limits and output control track for dual rail usage.   You could also use it for two in series for a 0-30V PSU.  When the interface is connected the software would offer options for dual rail or series, e.g. display the series voltage.   

The same interface, with a simple USB<=>serial + optocoupler cable would also give you PC control.
 

Offline Lazyboy

  • Contributor
  • Posts: 10
  • Country: si
Re: Portable Adjustable Power Supply
« Reply #6 on: June 13, 2018, 08:33:19 am »
Great suggestions! Thanks!

I was thinking the same about the voltage levels. I will make it work up to 15V in the next iteration, after I finish the master thesis.

I agree about the breadboard connectors, but there is also a solution to make a removable cover for it. I dont know just yet, they might get removed, they might not (more towards remove than stay, now that i think about it) . Nevertheless, arduino style female headers is a great idea and it will defenatly be implemented. Thanks!

The dual rail it also a great idea, but it will have to wait an iteration or two.

Thank you for your help.

Do you guys think that after all the improvements, it would be a good idea to proceed further with it? I mean kickstarter/indiegogo.
« Last Edit: June 13, 2018, 08:35:19 am by Lazyboy »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 8011
Re: Portable Adjustable Power Supply
« Reply #7 on: June 13, 2018, 09:24:01 am »
Consider the issues with protecting the front panel against damage during storage or transport - you may need a clip-on cover to protect the display, knob and binding posts.  It could also act as storage for hookup leads or even a separate breadboard adapter PCB.

As you haven't finalised the case design, you can still easily add the  ganging interface in as an optional daughterboard.   It would carry a 4P4C modular socket,  an optocoupler, a diode, a few resistors and a small MOSFET to buffer the MCU's UART TX output.  For now as you don't want the hassle  before you've finished your thesis, just add PCB guides or mounting pillars to the case for the daughterboard with a knockout for the 4P4C modular socket at the back of the case.


When you get round to designing and fittinng the daughterboard, patch wire it to the MCU's UART pins, Vcc, Gnd, and probably a higher voltage rail for the output so you can use large enough series resistors on both output pins (+rail and MOSFET drain) to limit the current so incorrect connection wont cause damage.   The input side is just two pins to the optocoupler LED, with an anti-parallel diode to protect against reverse connection and a series resistor to limit the LED current to about 1mA (allowing for the output protection resistors).  On the other side of the opto, the phototransistor pulls the MCU UART RX pin high acting against a pulldown resistor.   If its not connected (or the controlling device is powered off), the receiving UART sees a continuous break condition.   

Use a 4P4C modular plug to plug crossover cable for the interconnect.   For the PC interface simply put a ganging interface daughterboard connected to a USB <=> logic level serial module in a small case as an interface pod.

An slightly more expensive alternative that would allow ganging or PC control of multiple PSUs would be to use a fully isolated RS-485 interface, and give each PSU a unique address.   Probably the easiest connector to support multiple PSUs on the same RS-485  control bus would be a recessed box header for a 2x3 IDC connector.
« Last Edit: June 13, 2018, 09:31:15 am by Ian.M »
 

Offline Lazyboy

  • Contributor
  • Posts: 10
  • Country: si
Re: Portable Adjustable Power Supply
« Reply #8 on: June 13, 2018, 09:56:48 am »
I will consider everything you have said. You have given me valuable information.

I will probably go on the PC control option, but as you said, I dont want the hassle before finishing the thesis. The reason I would go with the PC option is because there are also some things I would like to implement on the PC side that will enable user to have more option/freedom of controling over the outputs (setting the voltage and current limit for simulating different batteries and it falling over time, maybie function generator with power, etc... who knows). I was thinking of implementing an ESP8266 in the future to conrol everything over wifi, but now that you talked about ganging, I'm not sure how that would fit.

Thank you!

Off to lunch... :D

 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 8011
Re: Portable Adjustable Power Supply
« Reply #9 on: June 13, 2018, 10:44:56 am »
For test equipment you should always design for a minimum 20 year life, (with in this case battery replacement).

WiFi (or Bluetooth) is a PITA - why introduce another source of EMI on your bench + add problems keeping up to date with encryption standards etc?  If you do *need* wireless,  RS-485 to WiFi or Bluetooth adaptors are available off the shelf, and are nearly transparent as far as the devices on the RS-485 side are concerned.

'Vanilla' 100BASE-TX Ethernet is still going to be around in 20+ years time and the odds are that future operating systems will be backwards compatible with TCP/IP IPv4 LANs.   The normal Ethernet magnetics typically provide 1500V of isolation so you wont have any problems with ground loops or stacking PSUs. There are still a few security implications, but they can be greatly reduced by specifying that the bench LAN must be firewalled.  However the required Ethernet stack is a significant firmware resource consumer.  Again you could add wireless capability using an external Ethernet to WiFi bridge.

RS-485 is also going to still be around in 20 years + as it is a favourite interface for industrial automation.   It also has the benefit of reducing the firmware overhead as you wont need a fully featured Ethernet stack.

Its worth looking at the SCPI protocol rather than rolling your own.   SIGROK already supports at least one SCPI controlled PSU, so it wont take a lot of effort to develop and maintain PC side software for your PSU - just write a SIGROK device driver for it based of the existing HP 6632B one.   
« Last Edit: June 13, 2018, 10:53:11 am by Ian.M »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf