logo elektroda
logo elektroda
X
logo elektroda
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Front panel of rectifier with dual LED displays, four buttons, and main red power switch
    I have made myself a transformer rectifier to charge the car battery, with automatic charge control - on/off principle - so that charging can be left unattended for a long time. The circuit has two basic tasks:
    - enable charging when the battery is connected
    - switch off charging when the battery is charged or in an error situation

    The garage aesthetics of the unit are provided by the casing after the ATX power supply.
    However, I took care to at least divide the front and rear panels.
    The side that was visible from the back of the computer is now the front panel. There is a red seven-segment LED display (2 rows of 4 digits with decimal points), a big red main switch and 4 momentary buttons - 2 blue on the left (closer to the display) and 2 red on the right.
    There is a fuse socket on the back, a positive and negative terminal, and a power cable sticking out.
    Rectifier in ATX case with LED display and red main switch Rear panel of DIY charger in ATX case with fuse and banana plug sockets Front panel of battery charger with dual LED displays and control buttons

    Internal construction
    The transformer is from a very old TV-SAT receiver, has about 40 W and has 3 secondary windings with the following AC voltages (at ~240 V on the primary):
    <br/span> <br/span>
    Wire colour Voltage Application
    brown 7,95 V Control electronics supply
    yellow 15,39 V the convolution referred to below first
    blue 22 V the convolution called below the second

    Inside view of a transformer battery charger in an ATX power supply case.

    The electronics are powered by a separate small rectifier bridge and 7805 .
    One of the other two windings is connected via relays to this second (larger) bridge, from which the rectified voltage exits via a shunt to the banana sockets on the rear.
    Both bridges and 7805 are mounted on a heatsink.
    Interior of a transformer-based charger inside an ATX power supply case

    The main board is a 7x9 cm universal board. It already receives stabilised 5 volts.
    There is a socket for Atmel on the board AT89C2051 and EEPROM AT24C02 , but I replaced them with a clone: Nuvoton W79E2051 . Compared to the original, it has built-in non-volatile memory , watchdog a and brown-out reset , well it is 2x faster in this application.
    Also: 4 double-digit displays D-5625ASK11 , which light up quite nicely, operated by MAX7219 ; and a squeaker.
    Prototype board with six 7-segment LED displays and DIP sockets Universal 7x9 cm PCB with soldered connections on bottom side Universal PCB with four 7-segment LED displays and DIP sockets. Perfboard with hand-soldered wires in various colors Electronic board with LED display showing “HELP.” and “HEHE”

    The following peripheral modules from Aliexpress are connected to the board:
    - 2 5 V SRD-05VDC-SL-C relay module with optoisolation HL-525 - one closes the circuit and the other switches the windings
    - via I²C: module INA226 for voltage and current measurement, with wire soldered in parallel to a 0.1 Ω shunt
    - via UART: bluetooth module SPP JDY-33 - together with the rest enclosed in a metal box and maybe because of that it has a range similar to the display through the window

    In the module INA226 I short-circuit the VBS with IN-, i.e. the voltage is measured between the plus and minus terminals, without a shunt.
    The module has a built-in 0.1 Ω shunt to measure currents up to 0.8 A. To extend this range, I soldered a piece of wire in parallel. I don't know what resistance it has, but after calibrating with an H4 bulb (current about 4 A), with a calibration register value of 1345 the result in mA agrees with the meter on the 10 A range. I had previously tried with some 0.1 Ω resistors, but the range was then exceeded.
    5 V dual relay module SRD-05VDC-SL-C with opto-isolation SRD-05VDC-SL-C relay module mounted above a transformer with connected wires View of rectifier interior with relay, transformer, and INA226 module Internal view of transformer-based charger with electronics and wires Internal view of transformer-based charger with electronics and wires Interior of a rectifier showing wires, resistor, and transformer windings Inside of battery charger in ATX case with transformer and control circuitry Inside of a transformer rectifier with electronics modules and relays Close-up of INA226 module and wiring inside a custom battery charger case Close-up of INA226 module and wiring inside a custom battery charger case

    Schemat
    Recharger to charge the car battery
    schemat...pdf Download(208.12 kB)

    Algorithm
    INA226 operates in the fastest possible mode i.e. without any averaging, 140 µs per measurement.
    The processor reads the voltage and current for 100 ms in a tight loop and does the relaxation.
    At the end we have 4 values: U min , U max , I min , I max .
    I am counting on is that within 10 straightened halves of a sine wave it is possible to catch the extremes even without synchronisation with the zero crossing.
    W79E2051 manages to read data from INA226 400x within these 100 ms, a AT89C2051 - 200x.

    Then a state machine is flown which, based on the above 4 values and the charging time, changes the state and switches the relays.
    This is followed by converting the parameters to decimal numbers and sending to the display, and possibly sending data to the UART (and further via bluetooth if paired) - and the cycle of measurements repeats.

    Display
    The upper and lower displays one of 7 values independently selectable by the blue button next to the respective display:
    0 State of the automatic charge control as 2 spaces and 2 digits, or error code E-XX
    1 Charge time - in minutes, with one decimal digit
    2 Number of voltage and current samples read in 100 ms
    3 U min - in volts, with two decimal digits
    4 U max - in volts, with two decimal digits
    5 I min - in amperes, with three decimal digits
    6 I max - in amperes, with three decimal digits

    When the button is pressed, a single digit with the index of the newly selected parameter appears on the display. It disappears when the button is released.

    If an error occurs, its code will be shown on the lower display instead of what the user wanted. Unless, of course, he has turned on the status display (index 0) on the upper display.

    Buttons
    The blue buttons are used to select what is to be displayed on the display next to it. (However, these changes will not be saved permanently until you enter and exit the menu.)
    The lower red button switches loading on and off. It also clears the error status.
    The upper red button enters the menu and then cycles through all options. The blue buttons are then used to set the value of the selected option (top=more, bottom=less). The lower red button exits the menu and saves the setting changes in non-volatile memory.
    Autorepetition (30x/s) works on the blue buttons.

    Menu
    960.0 7,000 13.20 14.60 14.40
    Option Scope Default Description
    bEEP >-1 1 Whether or not it beeps when the button is pressed
    LEd >-15 8 Display brightness as fill of multiplexing cycle from 1/32 to 31/32 in 2/32 increments.
    Value entered into Intensity Register circuit MAX7219 .
    rCAL 0000-9999 1345 Current Current Factor - the number, by which the shunt voltage must be multiplied
    (expressed in units of 2.5 µV) to give the result in milliamps when divided by 2048.
    Value entered into Calibration Register layout INA226 .
    CALI Current factor calibration mode.
    Pressing the lower or upper blue button switches INA226 into result averaging mode
    (so that they correspond to the universal meter) and enters a waiting state for the calibration start conditions.
    You have to connect e.g. a light bulb in series with the ammeter to the output connectors
    and correct the measurement result displayed on the lower display with the blue buttons.
    T 0 000.0-999.9 Upload time limit, in minutes.
    I 0 0.000-9,999 0.200 Bottom limit of peak charging current, in A.
    Also the upper limit of current flowing when charging is switched off.
    I 1 0.000-9.999 Upper limit of peak charging current, in A.
    I 2 0.000-9.999 5,000 Upper limit of peak charging current of the first winding, in A,
    below which it is possible to switch to the second winding.
    U 0 00.00-99.99 10.00 Bottom limit of minimum voltage required to start charging, in V.
    U 1 00.00-99.99 Upper limit of minimum voltage required to start charging, in V.
    U 3 00.00-99.99 Upper limit of peak charging voltage, in V.
    U 4 00.00-99.99 Upper limit of minimum charging voltage, in V.
    U 5 00.00-99.99 13.80 Upper limit of peak charging voltage, in V,
    below which it is possible to switch to the second winding.
    AuOn >-1 1 Whether, when switched on, to enter immediately into a waiting state for charging conditions (1),
    or not switch on charging (0).
    rECH >0-1 0 Whether, after charging, to return to wait for conditions to charge (1),
    or not to switch on charging again (0).
    bErr 0-1
    bEnd 0-1 1 Whether to signal the end of charging by beeping.
    FACT Upper blue button = return to factory settings.
    Lower blue button = exit menu without saving changes.


    Automatic charge control
    State Transmitters Description
    0 Disabled Uncharged. This is the state when switched on when option AuOn =0.
    1 off 1 Waiting for conditions to start charging (assumed - connecting the battery).
    This is the state after switching on when the option AuOn =1.
    2 Included first winding Charging the battery with normal current
    3 Included second winding Charging the battery with increased current
    4 Off Waiting conditions to start calibration of current measurement with the second winding
    5 Excluded Waiting for conditions to start calibration of current measurement with first winding
    6 Included X winding Calibration, and X depends on whether we have moved from state 4 or state 5


    Diagram of states
    State diagram of the battery charger automation controller
    maszyna s..ów.pdf Download(20.93 kB)

    Error codes <br/span>

    3 <br/span>
    Code State Destination
    E-01 1 When the charge is turned off, a current of I min >= I 0
    E-02 1 When the charge is turned off, a current of I max >= I 0
    E-03 2 The set charging time T has been exceeded charging time T 0
    E-04 2 In zero sine wave current module I min does not fall below threshold I 0
    E-05 2 Peak current charge exceeds limit I 1
    E-06 2 In the zero of the sine wave, the voltage has dropped below U 0 (i.e., e.g. battery disconnected)
    E-07 3 3 The preset charging time T 0
    E-08 In zero sine wave current module I min does not fall below threshold I 0
    E-09 3 In the zero of the sine wave, the voltage dropped below U 0 (i.e. e. battery disconnected)
    E-10 4,5 When power is off, current I min >= I 0
    E-11 4,5 When power is off, current I max >= I 0
    E.226 Communication error with INA226 (occurs regardless of state machine)

    After the error E.226 the processor will go to sleep for those 100 ms and try to initialise INA226 again (over and over again).

    Transition codes between states that are not considered an error:
    Code Z To From
    P-10 1 2 Timer reset, start of charging with winding one
    P-20 2 3 Charge switching from winding one to winding two
    P-15 3 2 3 2 Transfer of charge back from winding two to winding one due to overcurrent
    P-16 3 2 3 2 Transfer of charge back from winding two to winding one due to voltage overshoot

    P-30 2 0/1* Finished charging due to minimum voltage exceeded
    P-31 2 0/1* Completion of charging due to peak voltage exceedance
    P-32 2 0/1* 2 End of charge due to failure to achieve minimum peak current
    P-33 3 0/1* Finished charging due to minimum voltage exceeded
    P-34 3 0/1* Failure to charge due to minimum peak current not being reached
    P-50 4/5 6 Begin calibration with winding two/first

    *) Depends on whether the option is enabled rECH : no :arrow: 0, yes :arrow: 1.

    Bluetooth 2
    The device itself sends lines of text via bluetooth with an error or pass code, such as:
    P-50 0015 0191 0000 0002 FFF8 0002
    P-50 0017 0192 0000 0001 FFFA 0002

    It is possible to send the letter v , which activates and deactivates the talk mode - that is, sending the above block of data after each measurement cycle (every 100 ms), in which case instead of an error/transition code - unless one or the other has occurred - there is only a two-digit status number, e.g.: :
    00 0035 0168 0000 0002 FFF8 0003                                                
    00 0035 0167 0000 0001 FFF8 0002                                                
    P-50 0035 0156 0000 0002 FFF8 0002                                              
    06 0035 016A 0000 0000 FFFD FFFD                                                
    06 0035 016B 0000 0000 FFFD FFFD                                                
    06 0035 0170 0000 0297 FFFD 12D9                                                
    06 0035 016A 0297 0297 12D9 12D9                                                
    00 0035 0169 0000 058D FFE8 1951                                                
    00 0035 0165 0000 0002 FFF8 0003
    ...
    00 0036 0162 0000 0001 FFF8 0003                                                
    P-50 0036 0165 0000 0001 FFFA 0002                                              
    06 0036 016F 0000 0000 0002 0002                                                
    06 0036 0170 0000 0000 0002 0002                                                
    06 0036 0167 0000 02D5 0002 1169                                                
    06 0036 0165 02D5 02D5 1169 1169                                                
    06 0036 016B 02D5 02D5 1169 1169                                                
    00 0036 0169 0000 0555 FFFB 18C0                                                
    00 0036 0169 0000 0001 FFF8 0002

    The status/error/transition code is given in decimal and the rest of the parameters in hexadecimal and these are in turn:
    1. Charging (or non-charging, as the clock goes all the time) time
    2. The number of circuits of the tight loop of measurements in 100 ms (as you can see, with the transmit on, it no longer makes 400x but about 360x)
    3. Minimum voltage
    4. Maximum voltage
    5. Minimum current
    6. Maximum current
    ... which is the same as what can be shown on the display; only it's hexadecimal, the time is in deciminutes, the voltage in centivolts and the current in milliamps.

    Firmware
    I guess it was only by using 8051 (CISC) and an assembler that it was possible to stuff all the firmware into a 2 KiB ROM.
    There was not enough room for any more extensive Bluetooth control.
    nuvoto..hex Download(5.51 kB)Points: 1
    received by the file author


    Filmish



    Charging a charged battery:


    Charging a dead battery
    Charging a dead battery in auto-recharge mode (which is why this option is disabled by default):



    Cool? Ranking DIY
    About Author
    Sam Sung
    Level 33  
    Offline 
    Sam Sung wrote 1980 posts with rating 548, helped 226 times. Been with us since 2005 year.
  • ADVERTISEMENT
  • #2 21813734
    gulson
    System Administrator
    A useful thing these days! I've already heard "borrow a cable, borrow a cable" on the estate.
    Thanks!
  • #3 21813794
    acctr
    Level 39  
    Sam Sung wrote:
    Compared to the original, it has built-in non-volatile memory, watchdog and brown-out reset, and is 2x faster in this application.

    And importantly it has ICP, or on-chip programming. Developing something with the AT89Cx051 without using a hardware emulator is an ordeal, because on-chip programming they don't have.
    Sam Sung wrote:
    I guess it was only by using an 8051 (CISC) and an assembler that it was possible to cram all the fiddly stuff into a 2 KiB ROM.

    What would it look like with some AVR/PIC?
    Helpful post? Buy me a coffee.
  • #4 21813798
    krzbor
    Level 28  
    Is that white cable cut through the vents the power supply? If so, it's a rather poor and dangerous solution. It's a shame that you knocked out the connector connecting the power supply. This is one of the more valuable parts of such a power supply during rework.
  • #5 21813844
    pitsky
    Level 14  
    For me, I like the drippy look of this diva.
  • #6 21813924
    sq3evp
    Level 38  
    Interesting solution.
    And making an inverter to supply power from another battery in a "portable" way?
    Would that be a lot of modifications?
  • #7 21813946
    Stanley_P
    Level 28  
    I don't know, maybe it's already the fault of my eyesight, but in the article I don't see the most important thing - a diagram of the rectifier, at least some block diagram. There is only the controller.
    Besides, is it still worth carving something like this in this day and age? Apart from the priceless satisfaction.... The Lidl charger I bought a couple of years ago for about five quid (maybe a bit more expensive now, inflation) has a backup charging function.... Fact, I've never used it because I don't have a garage, but according to the intructions: "(...)the device has an automatic back-up charging function. The battery can be left connected to the charger for an extended period of time."
    gulson wrote:
    Useful stuff these days! Already on the estate I've heard "borrow a cable, borrow a cable".

    And everyone on the estate has a garage, because it's unlikely to be suitable for outdoor use? Besides, even if garages were, why borrow the cables? ;-)
    For jump-starting in case of "W" I have also been carrying a so-called "jump-starter", a small Li-ion battery (nomen omen also from Lidl, I think I once even described it on Elektroda) for a couple of years. It has saved my life more than once and more than twice, when the car is not driven very much, sometimes it stays there for several days, although most often it is at the end of the battery's life, prolonging its agony a little and delaying its replacement. As for the latter, i.e. replacement, I expressed my opinion quite recently HERE.
    Anyway since the device has been made, the article published, I reiterate the question for a complete schematic.
  • #8 21813971
    otapi
    Level 26  
    Interesting

    And haven't you thought about using a specialised chip like the LTC4162S ?
  • #9 21813982
    Karol966
    Level 31  
    I praise you for the amount of work you put into it. Fact, a necessary device, sometimes a lifesaver. I read it in a hurry, so I might have missed it - do you regulate the current somehow? Is the device only intended to pump the rest into the battery/desulphurise it? Because if you connected this charger to a discharged battery (e.g. 10V) it wouldn't be able to charge it, would it? You would need a current limiter even for that 800mA (even on a simple LM317), you would have to use a higher transformer voltage but you could charge almost anything with it, even from 0V.
  • ADVERTISEMENT
  • #10 21814061
    Andrzej_Tomaszewski
    Level 13  
    The idea of a battery charging device is interesting but the execution itself is disastrous.

    Regards
  • ADVERTISEMENT
  • #11 21814231
    bestboy21
    Level 40  
    I find it difficult to comment, everyone has their own vision. :)
    Personally, for me, a 13.6V backup power supply would be sufficient (with ambient temperature measurement to raise the voltage in winter, for example to 13.8V at -10°C, because somehow it works out that way)

    Standing all day on StandBay will still charge and even drain the battery (contrary to the opinions of some wise people), and the battery consumption itself will be marginal.
  • #12 21814242
    efi222
    Level 21  
    Stanley_P wrote:
    Beyond that, is it still worth carving something like this in this day and age?

    Sculpting is always worthwhile. You have to train your grey cells because they will atrophy when not used.... ;)
    And the design - fact. It could have been more refined mechanically.
  • #13 21814247
    sq3evp
    Level 38  
    Very good idea with temperature correction - I wonder how much Ah is consumed by such a backup.
    They keep an eye on the voltage in the better autocommercials - I once saw a parking lot attendant running around with a rectifier and recharging the batteries on a regular schedule.
  • #14 21814262
    bestboy21
    Level 40  
    sq3evp wrote:
    Very good idea with the temperature correction


    Such a correction has been used for a long time in buffer power supplies (where lead batteries work). This is so that in summer, when it is 30°C, the voltage is lowered to 13.3V (prevents drying out of the batteries) and in winter, at -20°C, it is raised to 13.8V in order to effectively maintain the charge.... (without gassing).
  • #15 21814277
    sq3evp
    Level 38  
    The question is whether this is hysteresis or proportional control?
  • ADVERTISEMENT
  • #16 21814301
    bestboy21
    Level 40  
    sq3evp wrote:
    Question is this hysteresis or proportional control?


    You're asking my idea or the author's , I'm not the author, I just got into the discussion ;) Because I think you got caught up .... , well maybe someone will benefit at ver.2.2 :lol:
    The standby voltage compensation is "almost" linear 3mW per cell, i.e. 18mV for a lead battery with 6 cells. At an output voltage of 13.6/20°C, that already gives 13.9V at zero degrees.... , then I guess the curve flattens out to -10 and only then flies +18mV....

    I've dug out the supposedly VARTA table, at first glance it is correct :)

    Recharger to charge the car battery
  • #17 21814322
    sq3evp
    Level 38  
    Just asking - my charger supposedly has a correction and I was looking for something or are there algorithms for this?
    In the winter I always charge to 14.7V to make sure the battery warms up slightly and doesn't sulphur, then back up to 13.8V. Almost a charge won't go in, but I think it will slightly maintain the battery condition.
  • #18 21814330
    bestboy21
    Level 40  
    sq3evp wrote:
    I was just asking - my charger supposedly has a correction and I was looking for something or are there algorithms for this?
    In the winter I always charge to 14.7V so the battery warms up a bit and doesn't sulphur, then back up to 13.8V. Hardly a charge will go in, but I think it will slightly maintain the battery.


    If the battery is in good working order then such an algorithm is sufficient.
    It is a different matter when it is discharged to 10-20% and in order to recover the electrolyte density you need to charge to 16.2V (and this only outside the car, as it may prove dangerous for the installation). Although electrolyte density and vitality will also return after 2 weeks on standby - and that is the most beautiful thing ;)
  • #19 21814357
    sq3evp
    Level 38  
    bestboy21 wrote:
    Also the electrolyte density and vitality will return after 2 weeks on standby - and this is the most beautiful thing ;)

    I have such an old battery - supposedly it was already rubbish, but after 3 repair cycles to 16.2V it has stood its ground and the tester is already showing it pretty much as it fell once to 9.8V. The current according to the tester is 533A from the declared 680A. It is standing as an emergency, it has been running new in the car for over 8 months now.
  • #20 21814360
    bestboy21
    Level 40  
    sq3evp wrote:
    bestboy21 wrote:
    Also the electrolyte density and vitality will return after 2 weeks on standby - and this is the most beautiful thing ;)

    I have such an old battery - supposedly it was already rubbish, but after 3 repair cycles to 16.2V it has stood its ground and the tester is already showing it pretty much as it fell once to 9.8V. The current according to the tester is 533A from the declared 680A. It stands as an emergency, it has been running new in the car for over 8 months now.


    I would still leave this corpse in standbay 1-2 weeks, and repeat the test :)

    p.s. These rapair cycles in "popular chargers last too short..." 16.2V [although more like barely 15.7V] and should be sustained for several hours with current limited to ~1.5A and usually it's barely 80 minutes and "after repair".
  • #21 21814421
    Alpha
    Level 26  
    otapi wrote:
    And you didn't think about using a specialised chip like LTC4162S ?

    The only distributor in PL is Mouser : 50zl/IC + shipping for 100zl, plus a case not solderable with a soldering iron :(
  • #22 21814551
    GGK
    Level 13  
    >>21813971 there is also such an analogue PB137 I don't know if that wouldn't be the simplest solution
  • #23 21814656
    Sam Sung
    Level 33  
    acctr wrote:
    How would it look with some AVR/PIC?
    I'm curious myself, the other option was to assemble everything from off-the-shelf modules, then I would have used MH-ET Live (with ATtiny88) or LGT8F328P and an alphanumeric display, but the desire to wear out the old ones won out, besides I like 7-segment displays.
    krzbor wrote:
    Is that white cable cut through the vents the power supply? If so, it's a rather poor and dangerous solution. It's a shame you blew out the connector connecting the power supply.
    Ow. Maybe some cable bending will still save the situation. I knocked the connector out so the cable wouldn't come out of the front panel. I could have done the front panel on the opposite side, but it was easier to cut out the fan cover and sand the 4 stumps. And once I did that, the handle fell into place.
    pitsky wrote:
    For me, I like the whimsical look of this diway.
    Well, it looks like an old ATX power supply with the fan hole taped off.
    sq3evp wrote:
    Adding an inverter to power from another battery in a "portable" way?
    A lot of modifications would be involved?
    Here I am taking advantage of the fact that there is a pulsating current coming out of the rectifier. Are you thinking of replacing the "safety module" in your design with something digital?
    Stanley_P wrote:
    I don't know, maybe it's my eyesight's fault already, but in the article I don't see the most important thing - a schematic of the rectifier, at least some block diagram. There is only the controller.
    Besides, is it still worth carving something like that in this day and age?
    This doesn't encourage you to "carve" a piece of schematic yet :) There is a simple integrated bridge screwed to a heatsink with thermally conductive paste.
    Karol966 wrote:
    Are you somehow regulating the current here? Is the device by design only to pump the rest into the battery/desulphurise it? Because if you connected this charger to a discharged battery (e.g. 10V) it wouldn't be able to charge it, would it? You'd need a current limiter even for that 800mA (even on a simple LM317), you'd have to use a higher transformer voltage but you could charge almost anything with it, even from 0V.
    No, I don't regulate the current. The control circuit turns off the relays when either the voltage or the current is exceeded. You could possibly raise the peak limit to 9.999 A. If it turns out that a discharged battery draws more current and the transformer can deliver it, the circuit would immediately enter an error state and the transformer would have to be changed.
    This is just a circuit to protect against overcharging (and short-circuiting altogether too, but with a response time of 100 ms). It allows you to use a transformer that, when rectified, gives too much voltage without load. I've had a pretty primitive rectifier made on it before, and it had to be watched.
    Andrzej_Tomaszewski wrote:
    The idea of a battery charging device is interesting but the workmanship is already awful.
    I was a little afraid that some people would suffer looking at it, but it is a sacrifice I am prepared to make :)
    Actually, this is the first working prototype. Now the right way to assemble all the parts could be worked out, maybe even the board could be developed. But for me it was just making the physical and electronic platform, which unfortunately has to be done to be able to develop and run the program. I broke one INA226 module by screwing it into the IN- rear end of the positive terminal, because that's how clever I wanted to be, but it turned out that there was so little metal there that the contact became insecure and the current measurement went crazy. I've already put the next module on the wires, but it's guerrilla-fixed with one screw. It's hard, it sticks, it works, nothing flies there.
    Stanley_P wrote:
    I don't think it's suitable for outdoor use?
    And I've already used it outdoors in the drizzle and for half an hour nothing happened ;)
    You might think that with an absurd amount of work I have achieved a poor result. And I might even agree with that, but I had other, conflicting goals:
    - i used old parts: trafok, heatsink, displays, MAX7219 in DIP
    - to familiarise myself with the operation of the INA226 and JDY-33 bluetooth modules
    - i found out how high the peak current and voltage are when charging the battery with such a rectifier (a universal meter does not show this and puts you to sleep)
    - for the sake of brain gymnastics, I practised the skill, no longer needed elsewhere, of packing complex logic into a small ROM
    And the fact that this prototype is usable at the end is an added plus. And this article is just so that when I'm loading something in six months and an error pops up, I'll go to the electrode and check what it means :)
    It also opens up the field of developing an Android app that will chatter via bluetooth, notify when charging is over, show parameters etc.
  • #24 21814774
    efi222
    Level 21  
    Sam Sung wrote:
    This article is if only so that when I'm charging something in six months' time and an error pops up, I'll go on the electrode and see what it means

    An interesting way to archive documentation and manuals for your equipment,.... :)
  • #25 21814992
    sq3evp
    Level 38  
    Sam Sung wrote:

    sq3evp wrote:
    Adding an inverter to power from another battery in a "portable" fashion?
    A lot of modifications would be involved?
    Here I am taking advantage of the fact that there is a pulsating current coming out of the rectifier. Are you thinking of replacing the "safety module" in your project with something digital?

    No, rather that instead of supplying 230V from the mains you supply 12V from the battery and charge it via the inverter. It is probably better to use a DC-DC back boost converter.

    GGK wrote:
    >>21813971 there is also such an analogue PB137 I do not know if this would not be the simplest solution

    And it is - and it's cheap.
    The application is very simple - probably ideal for this purpose.
    13.7V 1.5A I think will do the job - the battery will be able to take a charge and there will be a current in the region of 0.15A after a few hours.
    Max Vin 40V, so there is no fear that something will not work.

    There is even an application:

    Schematic of automatic 12V battery charger with 13.7V charging voltage
  • #26 21815056
    bestboy21
    Level 40  
    sq3evp wrote:
    GGK wrote:
    >>21813971 there is also such an analogue PB137 I don't know if that wouldn't be the simplest solution

    And it is - and it's cheap.
    The application is very simple - probably ideal for this purpose.
    13.7V 1.5A I think will do the job - the battery will be able to take a charge and there will be a current in the region of 0.15A after a few hours.
    Max Vin 40V so there is no fear, that something will not work.


    And you can use the middle leg of the PB137 to do temperature compensation.
  • #27 21815060
    sq3evp
    Level 38  
    bestboy21 wrote:

    Well you can use the middle leg to do temperature compensation.

    They put a diode in series raising the voltage to 14.4V.
    Probably some temperature controlled reference voltage and it will be OK.
  • #28 21815077
    bestboy21
    Level 40  
    sq3evp wrote:
    bestboy21 wrote:

    Well, and you can use the middle leg to do temperature compensation.

    They put a diode in series raising the voltage to 14.4V.
    Probably some temperature controlled reference voltage and it will be OK.


    Well exactly, just a matter of adjusting the 'thermistor' to make it fit the curve.
  • #29 21815922
    Sam Sung
    Level 33  
    bestboy21 wrote:
    sq3evp wrote:
    I guess some temperature-controlled reference voltage and it will be OK.
    Well, exactly, just a matter of adjusting the 'thermistor' to make it fit the curve.
    Digitally, I can connect a DS18B20 sensor to the last free leg, or a TMP75 to I²C in parallel with the INA226, and write a freely fiddly function in ROM to compensate for the charging voltage limit from temperature.
    It turned out that, although the W79E2051 can't execute code from NVM memory, but after compressing the menu entry from 6 to 5 bytes, with 18 items I saved enough for the menu description board to fit in the unused part of NVM (behind the option values), and ended up with more than 100 bytes of program memory, so I can add more features.
    However, the automatic temperature compensation seems overrated to me. This is supposed to be a charger for recharging a car battery - without disconnecting it. So boosting the voltage could end badly.
    I'd rather expand the Bluetooth interface with override options and remotely "compensate" myself from a smartphone :)
  • #30 21816043
    sq3evp
    Level 38  
    Sam Sung wrote:

    I'd rather expand the Bluetooth interface to include override options and remotely "compensate" myself from a smartphone :)

    This is also a method - I was thinking more of using a PB137 and in series a diode (I mean on the GND leg as a reference voltage - depends if you want 0.3 or 0.7 boost) with a switch (can also be a simple jumper) to select the voltage: 13.7V or boosted to 14.0V or 14.4V.
📢 Listen (AI):
ADVERTISEMENT