Supplying power to everything is not as easy as it may seem. We need several voltages to power all the components, here’s the budget:
- Isolated from mains, negative connected to mains earth
- ±12V at 14mA per pilot port (0.33W)
- 5V at max. 360mA for the user interface RGB LED strip + up to 40mA per port for contactor relays (0.6W to 2.2W)
- 3.3V at max 14mA for the STM32F103 (0.04W)
- 3.3V at 200mA (with 800mA short peaks) for the Linux module (0.66W – 2.6W peak)
- Referenced to mains neutral
- 3.3V at 23mA for the ATM90E36 (0.07W)
From AC to DC
So we need a total of about 1.8W in normal operation, up to about 5W peak in the worst case. At first I started to look at triple output supplies with ±12V and 5V outputs. Unfortunately, looking around I couldn’t find any triple output module in a reasonable size (and price); it was time for plan B.
The next best thing would have been to have a single 12V or 5V supply and convert that to all the voltages I needed. Since the biggest load is on the 5V line while the 12V one only requires 14mA, it made more sense to get the 5V output module. Initially the idea was to add way more LEDs, so I started testing with the MeanWell IRM-20-5. This 20W AC supply module outputs 5V at up to 4A.
±12V Pilot signal supply
Now, how can we generate a ±12V supply from 5V? Looking around for schematics I didn’t find much; most of the circuits are designed for very low current RS232 communication (there are plenty of ICs for that like the venerable MAX232). I could generate +12V with a simple boost converter, and then invert that; however, the only inverter ICs I could find are rated for 5V. The capacitive inverter TC7660S may work, but it’s too close to its absolute maximum rating and its output impedance is way too high.
The TPS65130 is a switching boost converter with an integrated inverter at up to 800mA, but it’s very expensive and requires a lot of (expensive) components to work. The LTC3261 would be perfect if it didn’t cost 6€ a piece (plus the boost converter).
There’s a nice trick to use a Boost converter to generate both a boosted voltage and its negative; unfortunately switching ICs have a feedback only on the positive line so this wouldn’t work with our unbalanced load. However, since on the Pilot signal the big load is normally only on the positive side, there should be a way to make this work. I have a few ideas that I still haven’t managed to fully explore.
After testing some different solutions, I concluded that the best “compromise” to supply the ±12V rail is to simply drop in a DCDC module like the MeanWell DPU01L-12. They’re cheap, easy to implement and work very well in this application, despite not being regulated.
Isolated 3.3V for the High Voltage measurements
The holy grail here is the SiLabs Si88341 IC. This device integrates an isolated DC/DC power supply and four channel logic isolation in a very nice package. I don’t know what it is that makes me appreciate this IC so much, but I think it’s truly gorgeous. Unfortunately, it’s not cheap at 5€ in single quantities, plus the transformer, plus the effort to make it work as designed.
The Isolation Dream Team!
The next best thing is a combination of the Si8641 digital isolator for the signal, and a standard 5V DC/DC isolated module like the RFM-0505S. From there, a simple 3.3V LDO will regulate the supply for the power meter. Easy, lazy, works!
3.3V supply for the Linux module
Here the requirements are simple: low ripple, about 200mA continuous with 800mA peaks. Normally I’d just paste here my usual supply block that I used in many other projects, based on the MP1584:
But that design is optimized for a wide input voltage (up to 28V!), while here we have a fixed 5V input and size and efficiency are more important. So I went to one of my favorite online tools, the TI WEBENCH, to find a better part. Here you just have to specify your requirements to get a nice list of options to choose from:
I ended up picking the TLV62568, a nice tiny switching regulator: efficient and cheap. With Webench it’s also very easy to simulate the circuit behavior:
After testing in real life with various components, I increased the filter caps value and rerouted everything a few times to reduce noise and ripple due to the current spikes from the wifi radio, and managed to get the ripple to a reasonable level.
And that’s it! I’m starting to think that I should have written these posts at the same time as events were unfolding, as reading them again doesn’t make it look like it took much effort to get this project going. Maybe if I wrote them during one of the sleepless nights I had, I would have been able to better show the stress and pain I had to go through! Enjoy my updated Eagle library with all these components and more!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
It's probably too late, but I have had great success in my Hydra and OpenEVSE II projects (find them on Hackaday) making -12 from +12 with the TC1044S charge pump and making +12 from +5 with an AP3012 boost converter. For the main AC supply, I use a CUI isolated 5V output module.
Are you sure? yes | no
Thanks! That looks great, but as every charge pump I'm afraid it has the downside of a high output impedance - that we should be able to match by decreasing the 1K series resistor (did you have to do that?). I'll definitely test it for the next version!!
Are you sure? yes | no
The TC1044S is able to make -12 for *two* cars at once in my Hydra design.
One thing to remember is that in a *compliant* vehicle, there's a diode in series with the input, so whenever the output is negative the impedance is supposed to be *much* higher than 1kΩ. Because of this, you can wave your hands a little bit at the output impedance of the negative half of the pilot generator.
Of course, this may also be abetted by my pilot generator design that uses a MOSFET half H bridge so that there's no draw on -12 at all during the positive portion of the output.
Are you sure? yes | no
Yep, I'm mentioning that on my article too, I'll definitely check your schematics :) BTW, your name sounded familiar, so I dug up my OpenEVSE and found out I'm your customer too! :) http://www.mastrogippo.it/wp-content/uploads/2019/09/photo_2019-09-30_23-24-39.jpg
Are you sure? yes | no