December 29, 2022
Description
Power supply, multi output (6x USB and more) charger, FSK remote controller code detector
Features :
Purpose: central charger for many gadgets at once. Shows that the charging takes place, how much current, finished. Supply for experimental circuits. Verifies the remote controller's operation, the user can note and keep the codes in a file to replace damaged or lost controllers.
Hardware :
Circuit description :
The raw power +35 and -35V is supplied by an old 2x24V iron core transformer. +35V supplies the two LM2596 modules. One is fixed to 5V, in the other the trimpot is replaced by a multiturn 10k potentiometer adjusting the output voltage. Normally the Q2 NMOS IRL540 transistor is open via R26 because the input of the LM2596 module is always higher than the IRL540 source. The load is connected to J1 +pin2 -pin1, the current flows back to the shunt and measured by ADS1115 on channel A0. Same signal is fed to +ve input of the OPA27 precision op-amp. The -ve input of the OPA27 is set between 2.5 to 50mV by the current limit switch. If the voltage on the shunt is higher than the limit, the opamp shuts down the IRL540 via an optocoupler. The current limit is active in microseconds. There is only a 10nF capacitor on the output so that no big capacitor discharges on the load.
The ADS1115 module channel 0-1-2 is connected to 3 shunt resistors, channel 3 is multiplexed by 74HC4051, resulting 11 channels 256mV full scale with 16 bit resolution (8 microvolt). The multiplexer does not seem to introduce any error in measurement. The channels on J1: 1-30V, 5V USB A, Li-Ion charger, USB mini and/or USB C plug 5 outputs, and 3 reserve channels. I used one for LED tester with a 39 ohm serial resistor to 1-30V output.
Code switch 2P6T selects 6 functions.
1: displaying the current on all channels.
2-3-4-5 : analog instrument graphics shows the voltage, bar graph shows the current of the 1-30V output. Current limit changes.
6: For 10 sec, the 315 MHz receiver is on, in the next 10 sec the 433 MHz is on, repeat. Code received in these time windows is displayed in decimal and hex.
The code switch I was using Knitter MRS10H has two independent parts, however they work only in 4 positions, two positions overlap. 1-2-3-4 sends different voltages to PA1. The other side 3-4-5 provides the limit voltages for the OPA27 while position 6 pulls PA1 down signaling the last function. RS26 rotary switch (source: Aliexpress) can replace this strange switch. PA2 senses the 1-30V output voltage using 100k/10k divider ( error on drawing 20k !! 10:1 ratio is correct !).
5V / 3.3V issue : The FSK receiver modules work with 5V. Two resistors in series on Data line protect the STM32 inputs PB0 PB1. Since the FSK decoder firmware is interrupt driven, there was no option to use other 5V tolerant inputs - did not work.
Microvolts issue : take care to squeeze the shunts as tight as possible (2512 SMD resistor 2.54mm apart soldering on its edge) solder a thick ground bus wire and pull this wire all the way to GND point of the ADS1115 module. No other wire should be connected to this GND point on the module. Connect the high current supply GND from the LM2596's to bus middle. Similar but less critical is the OPA27 limit voltage, if possible connect R14 to the same GND bus.
How I built it : have a lot of Weisser EI 84/112 boxes this is why I cramped the circuit in it. Feel free to build it in any other form.
Firmware : ST7735 TFT the graphics is calculated for 128x160 resolution. In another project I used the same graphics with higher resolution, code attached. Change the text arrays as you wish.
Note : Schematics: Again, I could not upload the PDF schematics file , zip not accepted either. Please download from here
https://drive.google.com/file/d/17O0c7Y-nBwEeU2XmlbHgXsiufRAPcd18/view?usp=sharing
Please note that until I correct this on the drawing, the resistor R26 10k (PC123- IRL540 circuit) has to be 33k instead of 10k. Some PC123-s are not sensitive enough and the IRL remains open in a current limit situation...Multiplexer chip: I used 74HC4051 SO-16 Nexperia with good results.
Option : the ADC could process type-K thermocouple signal like this :
/* K_type thermocouple 41uV /C
*/
int K_type (void)
{ unsigned long sum=0;
byte thermocouple_channel; // no shunt resistor on this channel !!
for (byte i=0; i<100; i++) {sum += ADC_Value(thermocouple_channel); }
return (sum/525); //return Celsius
}
Category: ElectronicsLicense:
Creative Commons — Attribution — Noncommercial
8