Lithium house bank. Affordable from China?

Discussion in 'OnBoard Electronics & Controls' started by DennisRB, Nov 14, 2012.

  1. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Hi boradicus, Hereby attached all the information. My project is a type of prototype basis and I am experimenting for my next bigger boat to see how to do it on a larger scale with batteries. I have abolished my idea about how to pack the batteries and have taken Jeremy Harris 's proposal and have packed the lithium batteries 10 parallel and 4 in series. Now, with a 40 - 45 Ampere normal inexpensive computer power supply, it is possible to make a charger for the future, which can charge 40 - 50 LifePo4 batteries parallel. The powersupply I use at present can handle 20 Ampere.

    Flowdiagram.jp is what I have done, although the solar charger I still have to mount on the 3rd layer where all the electronics is placed. I charge the Li batteries manual.

    circuit.jpg is how I charge the batteries in group of 10 at a time. Bear in mind that I will only use the boat on the water for at the most a week-end. Thus I charge the batteries in group of 10 , which takes about 5 hours, all in all 1,5 days.

    Switch2.jpg is how I have done the electronic switching between 24 and 36Volt at up to 80 Ampere. In view that I could use a separate battery for driving the gate's of the Mosfets, I have 2 x floating DC to DC converters instead of only one.

    In principal, one could make an explosion proof switch for 200 or 300 Ampere and not too expensive to make. Even 1000 Ampere, provided one starts to cool the Mosfets.
    I do use Schottky 80 Ampere diodes between the plus line and the batteries and also from the Solar charging busbar to the batteries.
    Trust that this is what you like to have from me.
    The photo's are
    Layer1 , 001.jpg the deep charging batteries. Layer2, 002.jpg the layer with the LiFePo4 batteries and layer 3 , 003.jpg the electronics. (Solar Charger and the in future the LiFePo4 charger not yet mounted)

    Unfortunately I will be for a week again in Cape Town and have no access to reply to any question, you have to wait for a week.

    Here is my simple assembler program for the PIC12F675
    Bert


    include "f675.inc"
    List p=P12F675
    ; Author : BerKu
    ; : GQRSoftware
    ; Date : May-16-2013

    level equ 20h
    level2 equ 21h
    cnt equ 22h
    cnt1 equ 23h
    cnt2 equ 24h
    cnt3 equ 25h
    cnt4 equ 26h
    #define reading gpio,0 ; input battery voltage
    #define led3 gpio,1 ; LED green
    #define led4 gpio,2 ; LED white ; gpio,3 not used
    #define charger1 gpio,4 ; charging 400 mA + red led2
    #define charger2 gpio,5 ; charging 35 mA + red led1



    org 00h

    ; nop ;save your osccalc here. (internal factory calibration)
    ;must always be the first command! (movwf osccalc)
    goto init
    org 10h ; startup vector

    init

    bank1
    movlw b'10000000' ; oscillator adjusted to center 4 Mhz frequency
    movwf osccal

    movlw b'00000001' ; trisio register AN0 (pin cpio0) = input cpio 1-5 = output
    movwf trisio

    movlw b'00110111' ; all pins are weak pull up, except pin 4
    movwf wpu

    movlw b'00000001' ; set Fosc/02 and PIC12F675 pin 2 set as analogue input
    movwf ansel

    bank0
    movlw b'00000001' ; settings for Input output, all pins are high
    movwf gpio

    movlw b'01000111' ; digital i/o
    movwf cmcon

    movlw b'10000001' ;Settings for Analogue to Digital, right justified
    movlw adcon0
    bsf adcon0,go ;start ADC

    clrf gpio ;Init GPI0
    clrf pir1
    clrf pcon
    clrf level
    clrf level2
    bsf charger1 ; switch charger1 and Red led1 off
    bsf charger2 ; switch charger2 off Red led2 off
    bcf led3 ; switch green led off
    bcf led4 ; switch white led off
    goto start
    start
    bsf led4 ; switch white led on indicating charger is switched on
    bsf gpio,4 ; switch charger1 and red led1 on;
    ; *************************************************************************
    ; compare module
    ; *************************************************************************
    again
    call ReadADC
    movf adresl,w
    movwf level
    sublw b'11110110' ;subtract 1/3 part from maximum voltage allowed "1011101011" = 3.6 Volt
    btfss status,0 ; if equal or higher, go to next step
    goto equal ; 1/3 x 3.6 Volt = 1.2 Volt = binary (246) "11110110" which fits in a 8 bit register
    btfsc status,2
    goto larger
    bsf gpio,4 ; switch charger1 on;
    goto again
    equal
    goto larger
    larger
    bcf charger1 ; at this point, current charger1 get stopped
    ; switch RED LED 1 , off
    bsf charger2 ; at this point, current charger2 get switched on
    ; switch RED LED 2 , on
    timeloop
    movlw 0xFF
    movwf cnt
    movwf cnt1
    movwf cnt2
    movwf cnt3
    movwf cnt4
    loop
    decfsz cnt
    goto loop
    decfsz cnt1
    goto loop
    decfsz cnt2
    goto loop
    decfsz cnt3
    decfsz loop
    decfsz cnt4
    decfsz loop
    nop
    finish
    bcf charger2 ; at this point, current charger2 get stopped
    ; switch RED LED 2 , off
    bsf led3 ; switch green led3 on
    loop2
    goto loop2 ;endless loop! unit to be switched off, when li battery is taken out


    ReadADC
    btfsc adcon0,not_done
    return
    bsf adcon0,go ;start ADC
    return

    end


    001.jpg

    002.jpg

    003.jpg

    Flowdiagram.jpg

    CIRCUIT1.jpg

    SWITCH.jpg
     
  2. groper
    Joined: Jun 2011
    Posts: 2,483
    Likes: 144, Points: 73, Legacy Rep: 693
    Location: australia

    groper Senior Member

    Why use mosfets bert? Have you considered Insulated gate bipolar transistors instead?

    To cut and paste from wiki - The IGBT combines the simple gate-drive characteristics of the MOSFETs with the high-current and low-saturation-voltage capability of bipolar transistors by combining an isolated gate FET for the control input, and a bipolar power transistor as a switch, in a single device. The IGBT is used in medium- to high-power applications such as switched-mode power supplies, traction motor control and induction heating.
     
  3. boradicus
    Joined: May 2013
    Posts: 171
    Likes: 2, Points: 0, Legacy Rep: 10
    Location: USA

    boradicus Senior Member

    Bert - that is interesting - thank you for posting. What is the benefit of using LiPos versus a deep cycle marine battery bank in your opinon? I wouldn't think that the weight difference in light of the cost difference would be too much of a consideration - is there some other benefit to stroing with LiPo?
     
  4. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Hi groper,
    I just came back from Cape Town and quickly answer your question. I am buggered after the operation 4 weeks ago and a long drive home. I personal prefer MOSFET's , because if I place 10 MOSFET's parallel, my power dissipation and losses are reduced by 10 fold i.e. total current 100 Ampere rms x 8 milli Ohm divided by 10 = 100 x 100 x 8 / 10 x 1000 = 8 watt. The reason is that I place 10 resistors parallel.

    If I place 10 IGBT parrallel, the collector to emitter saturation voltage is NOT reduced by 10. i.e.it stays practical the same for all 10 devices. Although the current is divided by 10 over the 10 IGBT, the overall power dissipation is basically the same for all 10 together.

    Although both devices have a gate voltage as "opening and closing" of the device. If I use more than 150 Volt, I will use IGBT. If I use MOSFET's 10 parallel, the need for cooling is much easier to achieve. I also bought some 200 at the time for 1 dollar each. Trust that this answer your question. Bert
     
  5. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Good morning boradicus (for me good morning now) . Like anything in life, something has advantages and disadvantages. If one can utilize the weight of batteries and has space. Nothing wrong with deep charging sealed acid batteries. They are robust and come in square casing's, easy to pack and utilize space. The cost per Kwh is also substantial less. The LiFePo4 batteries are mostly packed in cylinders and although weightwise lighter, one has a lot of dead air between the batteries, which could have been utilized for energy. Charging is more complex for larger powerpacks, because of balancing. I know of one manufacturer, who manufacturer large power batteries for the telecommunications industry http://www.eemb.com. Lithium is expensive and has its place. But I was hoping that the energy per volume would have tripled by now, that is only the case at universities who needs funds and make announcements and then it fades away. If one could buy Lithium batteries 500 watthr per Kilgram versus 40 watthr per Kilogram Sealed lead acid batteries. Then, yes the high price would be justified. Bert
     
  6. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Hi boradicus,

    OOOhhps, not a problem for my batteries, but it could be a problem for somebody who tries this program out and put accidental a fully charged or different Lithium battery in this charger. I made it as a simple 8 bit reading. But the problem is, should somebody be placing a battery which has a voltage greater than 8 bit, automatically the processor reads it as an empty battery. Before I fly to Europe, I will try to put a 10 bit reading into place.
    Bert
     
  7. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Latest update

    Here is then the final information. Although the Analogue to Digital converter is a 10 bit, I have decided to keep it simple to do left justified and not right justified. By left justified I then ignore the lower last 2 bit. The consequence is that the accuracy is no longer 4.88 miliVolt per step, but 20 milliVolt. Who cares. Nobody will argue whether a near fully charged battery is 20 milliVolt less charged.
    Unfortunately before I left for Cape Town in July, I loaded an old software program and when I came back from Cape Town, Boatdesign.net did no longer allowed me to change that.
    I have thus waited to get you the final software program and also the final concept.
    With 8 Mosfets, I will be able to attach the “cheap” up to 30 – 50 Ampere Lithium battery charger to a set of cells of 10 – 30 . Similar as I switch as per drawing in a previous thread from 24 to 36 Volt. At present I only charge 10 batteries parallel, but with 2 extra 0.33 Ohm resistors, one can extend the charger to up to 30 cells parallel. By switching, via a still to be written software program for a microprocessor, I will then charge the first set of 10 (up to 30) The micro will sense when the first set is fully charged and then switch over to the next set of 10 (- 30) batteries and then the third set and then the fourth set and when I wait a little while , the lithium bank is fully charged.
    One could with some small changes use a computer power supply for other Voltages, like a 6 Volt Lead Acid battery. Where the hick can one get a 30 -50 Ampere charger get for a few dollars and a little bit of work. Not easy anywhere.
    Would anybody have a circuit-diagram for a computer switch mode power-supply. Most of them are similar and then I could repair a 50 Ampere 5 Volt computer power-supply, which I still have.

    Attached files:
    1) 005.jpg the 10 cell parallel computer power supply with 2 pcb mounted on the box. In view that a power supply has lots of wires coming out, the same color are bundled, to give a high amperages.
    2) pcb-charger.jpg the pcb for the micro
    3) pcb2-charger.jpg the pcb for the 0.33 Ohm resistors and Mosfets. Please not that one has to strengthening the track with a thick copper wire to allow for high currents
    4) Charger.jpg is the next project to make a 10Kwh Lithium battery charger over a period of time automatically.
    5) Charger2.jpg is the near final circuit diagram. I have been able to charge the 40 lithium batteries (Thanks Jeremy Harris, parallel switching works very well) before I am flying to Europe.

    I have one small problem to sort out. After the charging is finished, I have somewhere a small leakage, whereby the Voltage very slowly creeps up.
    I could not select a good 5 watt 3.6 Volt zenerdiode to limit that, but I will see what the solution is when I come back.

    Bert
     

    Attached Files:


  8. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Sorry I forgot to include the latest software. Bert

    include "f675.inc"
    List p=P12F675
    ; Author : BerKu
    ; : GQRSoftware
    ; Date : May-16-2013

    cnt equ 20h
    cnt1 equ 21h
    cnt2 equ 22h
    cnt3 equ 23h
    #define reading gpio,0 ; input battery voltage
    #define led3 gpio,1 ; LED green
    #define led4 gpio,2 ; LED white ; gpio,3 not used
    #define charger1 gpio,4 ; charging 400 mA/10 ampere + red led2
    #define charger2 gpio,5 ; charging 35 mA/ + red led1



    org 0x000
    nop ; required for ADC


    goto init
    org 10h ; startup vector

    init

    bsf status,rp0 ; bank1
    movlw b'10000000' ; oscillator adjusted to center 4 Mhz frequency
    movwf osccal

    movlw b'00000001' ; trisio register AN0 (pin cpio0) = input cpio 1-5 = output
    movwf trisio

    movlw b'00110001' ; set internal osc A/D from PIC12F675 >>>> pin 2 set as analogue input AN0
    movwf ansel

    movlw b'00000000' ; settings for Option register
    movwf option_reg

    bcf status,rp0 ; bank0
    movlw b'00000001' ; settings for Input output. AN0 = input all other pins = output
    movwf gpio
    clrf gpio ; Init GPI0

    movlw b'00000001' ;Settings for Analogue to Digital, left justified
    movwf adcon0
    bsf adcon0,go ; start the analogue to digital converter
    bcf gpio,4 ; switch charger1 and Red led1 off
    bcf gpio,5 ; switch charger2 off Red led2 off
    bcf led3 ; switch green led off
    bcf led4 ; switch white led off
    goto start
    start
    bsf led4 ; switch white led on indicating charger is switched on
    again
    call ReadADC
    sublw b'10110001' ; subtract maximum voltage allowed 10 bit = "1011000011" = 3.45 Volt >> 5 Volt = 1023 = '1111111111'
    ; because we shift 10 bit to the left, we truncate 2 bit, what is left over = 8 bit >> adresh
    ; adresh = 10011001 in 8 bit version (10 bit left justified by 2 positions)
    ; if battery voltage is higher = '10110010' if battery voltage lower = '10110000' Because the 10 bit
    ; is truncated by the 2 lowest 10 bit digits, the accuracy is no longer 4.88 milliVolt but 4 x worse
    ; = 20 milliVolt. Who cares???

    btfss status,0 ; if carry bit is 1 skip i.e battery is higher or equal, if carry bit is 0 battery is lower or equal
    goto larger
    btfsc status,2 ; if zero bit is 0, skip , battery is low
    goto equal
    bsf gpio,4 ; switch charger1 on single 400 mA, 10 batteries parrallel or 30 Ampere with 10 - 30 batteries parallel
    bcf status,2
    bcf status,0
    goto again
    equal
    goto larger
    larger
    bcf charger1 ; at this point, current charger1 get stopped and switch RED LED 1, off
    bsf charger2 ; at this point, current charger2 get switched on switch RED LED 2, on
    timeloop
    movlw 0xFF
    movwf cnt
    movwf cnt1
    movwf cnt2
    movwf cnt3
    loop
    decfsz cnt
    goto loop
    decfsz cnt1
    goto loop
    decfsz cnt2
    goto loop
    ; decfsz cnt3
    ; goto loop
    goto finish
    finish
    bcf charger2 ; at this point, current charger2 get stopped
    ; switch RED LED 2 , off
    bsf led3 ; switch green led3 on
    loop3
    nop
    nop
    goto loop3 ;endless loop! unit to be switched off, when li battery is taken out


    ReadADC
    btfsc adcon0,not_done
    return
    bsf adcon0,go ; start the analogue to digital converter
    btfsc go_done,1 ; check whether A/D properly has read
    goto $-1
    movf adresh,w
    return
    return
    end
     
Loading...
Similar Threads
  1. Deering
    Replies:
    4
    Views:
    2,279
  2. oceancruiser
    Replies:
    34
    Views:
    13,006
  3. SailBella
    Replies:
    21
    Views:
    5,201
  4. Artem Klochko
    Replies:
    33
    Views:
    7,825
  5. Deering
    Replies:
    14
    Views:
    16,688
  6. markstrimaran
    Replies:
    1
    Views:
    1,628
  7. DennisRB
    Replies:
    68
    Views:
    10,571
  8. Landlubber
    Replies:
    10
    Views:
    4,821
  9. Paul Giani
    Replies:
    2
    Views:
    1,247
  10. 5teve
    Replies:
    7
    Views:
    2,084
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.