diy solar

diy solar

Networked DC-DC power supply

rin67630

Solar Enthusiast
Joined
Apr 29, 2020
Messages
1,067
Location
Nort-Rhine-Westphlia Germany
You have a gorgeous solar system and a battery bank to make Elon Musk jealous.
Well!

You can do better with your battery than feeding an inverter.

DC/DC is always more efficient than DC/AC/DC to carge a quantity of devices: your eBike, vacuum cleaner, computer, tablet and so on.

There are a lot of DC buck converters around, a few of them being boost/buck, that means they are able to convert voltage upwards and downwards.
These are really convenient to charge secondary batteries from your main battery at any voltage.

One of those digitally controlled boost/buck converter is the DPS3806 (38V/6A boost/buck converter) e.g.
https://www.aliexpress.com/item/1005001591485527.html

JUNTEK-DPS-3806-spannung-regler-konstante-strom-digital-control-dc-buck-boost-power-supply-module-led.jpg_q50.jpg


It is a nice well done and inexpensive module, but the digital control board is everything but convenient.
You have to fiddle with the tiny push buttons and the seven segment display is not really 21st-century.

Fortunately the digital control board is pluggable, and I was able to replace the unit with a powerful WiFi enabled ESP32 microcontroller.
The result is a fully WiFi networked DC-DC programmable power supply, with tons of features:

110494163-9af3a880-80f3-11eb-96a9-72d462eb322b.png


The power supply is controllable by:
  • USB -Serial with a simple menu to change the set-points control, the OLED display variants, the charging profiles and print reports.
  • from everywhere in the world using the cloud dashboard service of https://thinger.io with a free limited maker account.
    This is just an example, much more will come:
    Thinger.io.Juntek.jpg
  • a IR remote control.
  • remote screen replication
Over the serial port and thinger.io, many reports will be made available:
  • Energy report by the second, the minute, the hour.
  • Ah, Wh Joule/Coulomb reports by the minutes, the hour, the day.
  • Events of the charging process
  • ...
Beside the usual constant voltage and constant current set points, I will provide many interesting things that are not common, but very useful:

Battery Charger mode:​

  • charging profiles for many battery chemistries
  • evaluation of the battery's internal resistance
  • evaluation of the battery' capacity
  • charging time series plots

Power Source emulation:​

  • add a programmable internal resistance
  • run a constant power mode
  • emulation of solar panel / wind turbine incuding "pseudo-daily" gaussian cycles (accelerated 60x) to test solar chargers

Programmable Load​

  • together with a flooder to dissipate the energy, the buck-boost converter can be used to discharge batteries and transfer energy from one battery to another one.

Maybe other useful ideas that you might have...​

Last but not least everything is neatly self powered, and integrated on one single board, that plugs instead of the original controller board. If you wanted to revert to the original functionality, just replug the manufacturer's control board. There is absolutely no cable mess and even a new program can be updated over the air using a beginner's easy Arduino IDE. You need no additional computer to manage the dashboards, everything is done in the cloud. The only thing you need, is a Wifi connection.

All instructions to build and the corresponding program is available at GitHub:
Drok-Juntek on Steroids.
Enjoy!
 
Last edited:
Very nice. I've seen hacks for those PSUs & bought the 900W version myself, with every intention of reprogramming it. But your method of replacing the digital board is so much better. Well done.
 
Very nice. I have received my DROK module today and evaluated the differences. They are minimal.
1616101466196.png
The PCB should remain quasi- identical. The voltage sense swap can be done in software,
I had to wire a 220R resistor between J1-6 and J1-8 to enable the Drok converter.

Better, connect J1-6 to J5-4 and J1-7 to J5-5 so enable and the fan could be controlled by software.

I haven't clarified if J1-3 is free on the Drok to sense the input voltage, maybe I'll get clarity tomorrow.
Else one should foresee a kind of independent terminal to feed to input voltage...

If you have the possibility, it would have been good to foresee a GND layer to shield the weak feed-back voltage measurements from the current spikes coming from the converter switching.

Thank you
Laszlo

Regards

P.S. your PCB has an error:
ADC12 is on pin J5-7, GPIO15 on J5-6 and GPIO12 on J5-5.
J1-7 (Fan PWM) should be routed to the remaining J5-4.
J1-6 should either go to GND J1-8 over a resistor (always enabled), or to J4-3, the remaining (GPIO27, software-enabled).

1616104107838.png
 
Last edited:
If you don't mind updating the software, do you mind if I swap some pins for an easier layout? I'm not familiar with the TTGO so are all the ADC pins equal? Also might it be worth moving the two outputs from J5-6 & J5-7 to J4-4 & J4-5 if they can also do PWM, as that would give the option of using them as DACs. Do you have a link to some decent documentation on the TTGO thing?
I already put a GND screen on both sides. In the screen-shot of the PCB design, KiCAD shows it as a red/green hatching along the edge. You can see it better in the photo-realistic rendering pics. I brought the GND planes & all GND connections from the circuit to a 3-pad solder bridge so you can easily select which of the host PSU board's grounds it gets connected to. In case that matters.
 
I strive to keep the specialized input pins (ADC0, ADC3, SDA, SCK, DAC1, DAC2) as possible free.
Stupidly the makers of the TTGO have exposed a very few GPIO usable pins: GPIO37/38 for example are very restricted digital input-only pins, and they have wasted a lot of opportunities by redundantly providing too much GND pins.

By the way: if you could include an I2C port on a header: GND, SDA, SCL, 3.3V. that would give us the ability to:
-add digital IO ad libitum, e.g. to control relays,
-add sensors and all the I2C stuff available on the maker market.

The ESP32's DAC functionality is not a solution for us, since its resolution is only 8 bit, that is absolutely not enough: we must be able to trim the voltage by ~ 0,1%.
8 bit at 60V span would give you steps of ~0.25v. That is absolutely not enough to control the charging of a battery.

A good resource for TTGO The text is in Dutch, but the most important stuff are the tables and pictures.

Else you must dig a bit on the ESP32 documentation, especially about the restrictions regarding the GPIO abilities.

I still did not step into KiCAD, that will be another learning curve for me, could you meanwhile provide some PDF outputs?

May I suggest to continue our exchange on the Github Wiki of your fork, so that the discussion is available for everyone there?
Could you please open it?
 
Last edited:
I thought there would probably be some pin usage restrictions. Will explore the Dutch page in due course. I too see I2C port as essential. I already made JPG images for easy viewing in any browser but they may be hard to spot among all the KiCAD files. Will do nice PDFs soon. Just created Wiki Welcome page but didn't see any opening-up controls - maybe that's all it needed.
 
Back
Top