Shop OBEX P1 Docs P2 Docs Learn Events
Solar powered motor controller with forward and reverse. — Parallax Forums

Solar powered motor controller with forward and reverse.

eagletalontimeagletalontim Posts: 1,399
edited 2012-07-22 20:33 in General Discussion
This is a strange project I am working on and am not even sure if it will work the way I am hoping. What I have is a DC water valve that connects to a water hose for a sprinkler system. The motor is a 6 volt DC motor which needs the polarity changed to turn the water on or off. I have figured out how to do the polarity reversing and I have figured out how to get the motor to activate from a 6 volt solar panel. The 6 volt solar panel charges an array of caps that is used to discharge to the electric motor. This works perfectly. The polarity reversing circuit is 4 NPN transistors and 4 diodes wired to create an H-Bridge. There are 2 wires that need to be either high or low to set which polarity is needed. I will call these the "polarity selecting wires" since I don't know how else to reference them.

There are 3 problems that I have run into...

The first is when I connect the solar circuit to the H-Bridge circuit, the caps don't stay charged even with the "polarity selecting wires" low. I have a diode in place between the solar panel and the caps to ensure the caps don't drain back into the solar panel. Does an H-Bridge circuit really use power even when in "stand-by" mode? Is there a way to hold the charge in the caps until needed?

The second issue is I need to be able to just send a pulse of power to the water valve for about 1 second. The caps discharge enough to deactivate or activate the water valve when needed so I need to some how bring one of the polarity selecting wires high for 1 second only for each cycle of the outside AC condenser (on / off). I need to have some sort circuit that checks the voltage of the 24V AC side of the condenser and as soon as there is power, the water valve circuit activates for 1 second to discharge the caps and activate water flow. As soon as the 24V AC is removed, the water valve circuit needs to be activated again for 1 second to turn off the water flow.

The third issue is when the water valve is on and the sunlight is going down, it needs to automatically deactivate the water valve to ensure it is off for the rest of the night. I am not sure how to do this without using an IC chip of some kind and a photocell.

With all this being said, I don't know how reliable a circuit like this would work just running off of solar without an IC chip like the SX or Prop. I have both available to use if I have to. The only other option I have is to use one and just use the solar panel as a charger for batteries. I am not 100% certain, but I believe the solar panel is a small 6v 0.5A from RadioShack. I do know it outputs close to 6V in moderate sunlight. Full sunlight, it is close to 8V with no load.

Any help with this project is appreciated!

Comments

  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-21 21:30
    Fixed the capacitor discharge issue :) Come to find out, I did not have a good connection on a wire. Now I still have to figure out the last 2 issues above.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-22 13:43
    Since no one has replied, I decided to go a different route thinking the above project is just too complicated. I am going with solar cells that will charge 8ea 1.2V 2500mAh rechargeable batteries. This will help keep the power source available over night while the system is in standby which should be no more than 20mA when using the SX28.

    So for a new question..... Since I have 8 each 1.2V 2500 mAh Ni-MH batteries, I need to know how to trickle charge them using solar power. I have an LM317 handy since I know I will need it, but still can't figure out the current or voltage needed to properly trickle charge the batteries. Could someone help me with this please?
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-22 16:12
    From what I have been reading on other sites, trickle charging ni-mh batteries is not recommended for long periods of time. Having read this, I think I need to create some sort of automatic charger that can use solar as the input voltage.

    Could I PLEASE get someone's help on figuring out how to charge these batteries using solar power? I now have 2ea 6v 1.5W solar panels which output 13.7v with no load in moderate sunlight when run in series with each other.
  • kwinnkwinn Posts: 8,697
    edited 2012-07-22 16:27
    To charge a 6V battery (5 x 1.2V) would require a voltage higher than 6V so it would be pretty hard to do with a 6V solar cell. A 6V SLA battery needs about 6.75V to charge, and a Ni-MH probably needs a voltage similar to that. Add some circuitry to control the charging and you probably need at least 8 to 9 V in to charge the 5 batteries. Short of going to some fairly complex charging circuitry you will need either 2 solar cells or a lower voltage motor.

    The simplest charging regimen would be a constant current of 250mA until the battery is fully charged. Recharge time is about 14 hours for a fully discharged battery. For trickle charging 25mA or less is good, but the exact current depends on the current drawn by the motors and the length of time they are on.

    For critical circuits I measure and record the current draw from the batteries and monitor the length of time the current is drawn. From that information I can calculate the number of mA hours used, and calculate the time required to fully recharge the batteries without over charging them.
  • kwinnkwinn Posts: 8,697
    edited 2012-07-22 16:43
    Take a look at this site for an explanation of charging your cells. http://talkingelectronics.com/projects/ChargingNiMH/ChargingNiMH.html

    The last circuit in the article should work for you. If the motors are on for a short period of time an 18 to 22 ohm resistor should produce the required trickle charge
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-22 17:19
    The cells are 6V each which make "12v" in series. I tested them in moderate sun which showed to be 13.7v with no load. I have read over that link previously but have also read that trickle charging NI-MH batteries is a bad idea. I thought I had seen a circuit that will only start charging when the batteries are at a certain percentage and automatically shut off when they are full.

    The battery voltage is 9.6v since I have all of them run in series. This is to be able to power the SX28 and the motor when needed. The motor comes on for no longer than 1 second.
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2012-07-22 17:36
    Ill make a few pointers here

    The Best way to ever measure mAH used In or out is a DOC WATSON meter .. 60 dollars 60 Amps and 60 V max.

    Does watts amps volts KWH and AH/mAH. takes allll the guess work out of DC power systems .

    Second Please dont use a 317 , I was a HUGE fan of that chip
    Until ll the MC 34063.,.. Yes its switchmode. but its so simple and a bajion more eff then the LM 78XX or 317.

    I am still wishing I knew of it years ago .. I mean I have used SMPS chips in the past for big projects but not one that was just as easy as a 317 ..
    I have 50 of them on order and If i need a reg I use it from now on .
    \
    http://appnote.avrportal.com/calculator/mc34063-stepup


    8ea 1.2V 2500mAh rechargeable batteries. This will help keep the power source available over night while the system is in standby which should be no more than 20mA when using the SX28.

    So for a new question..... Since I have 8 each 1.2V 2500 mAh Ni-MH batteries, I need to know how to trickle charge them using solar power. I have an LM317 handy since I know I will need it, but still can't figure out the current or voltage needed to properly trickle charge the batteries. Could someone help me with this please?




    Ok lets see I assume this is cycle charged ..

    NiMH HATES to be trickle charged and will fail ( I did a paper on this )

    NiCd is more happy with trickles . and that whole memory thing is not a issue with this kind of app ,.

    the issue is not current .. as long as you cut the charge befor you over charge you can shove Quite a few amps in a NiCd or NIMH cell .
    Pre LITH RC was all Nixx based and the shovd 10 amps in to there cells for races for 15 MIN
    I dont advocate 10 amps but I doubt you will explode a cell off a dinky solar array I mean you are not useung a house panel 120W

    its some small book sized thing under 5 Watts ..

    With all this being said, I don't know how reliable a circuit like this would work just running off of solar without an IC chip like the SX or Prop. I have both available to use if I have to. The only other option I have is to use one and just use the solar panel as a charger for batteries. I am not 100% certain, but I believe the solar panel is a small 6v 0.5A from RadioShack. I do know it outputs close to 6V in moderate sunlight. Full sunlight, it is close to 8V with no load.


    HA no way That will smoke a pack of 8 AAs you are safe .

    What you described was right . 8Voc is right for a 6Vnom panel. so really you need to boost it to your batt full charge voltage

    So lets say I am charging a 5AH AGM lead bat .. This is a Vmax of 14.4V I use 14.2 as the temp can dictate some slight changes .
    You need to make the reg sit right at your final charged voltage . . So for you a 8 cell NiCD pack 11.6 to 11.5 V or so .
    Remember current won't flow if the 2 voltages are the same .. So as soon as the batt hits 11.5 its not gonna suck any more current and this is not a on or off gig . it tapers .

    I would never advocate a Micon for this simple of a charge . but to bag on parallax a PICAXE with its A/D and PWM and being only 8 pins not 80000 pins might be worth it for those whom need a better brick wall for voltage control ( sorry Ken but I flat our refuse to waste a 20 + pin GOOD micon on such a simple task ,,,,,,,,,,,, ( we need a prop 12 Pin for small jobs :)

    Peter


    Ill draw up in that digikey Sw thingy for you Right now ! a full BOM for a solar charger !


    give me 30 min or so I have never used it before


    would you like to have me use the switching reg ?

    Peter...



    EDIT

    http://www.seekic.com/circuit_diagram/Power_Supply_Circuit/Power-Supply_Circuits-Fixed/MC34063_22V_6V_Boost_to_7V_circuit_diagram.html

    this might help ,,,, use pot in place of the REF divider to "dial in " your disired charge voltage .

    the reason I push that chip is that it has a TON less loss then a LM analog chip . you cant afford to not have it in solar apps . and that you need to boost UP not cut down your voltage so this way you can !
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-22 18:32
    I did see that chip you recommend, but I don't want to spend any more money on this project as I could have already bought a manufactured version for $20. Mine is a just a project because I think I can do it with what I have around my shed. The more things I use that I already have, the less clutter I will have once I am done :)

    So after reading your post, I can see that if I do use an LM317, I can set the voltage to 11.36 (1.2V per battery = 1.42 charge voltage * 8) and not worry about the amperage correct? If this is correct, how do I stop the charge once the batteries are full to prevent a trickle charge on my batteries? If there is a simple way to do this, that would help. I did think about using some sort of RCTIME or ANALOGIN function with the SX to read the voltage of the batteries. Once they hit 9.6V it would shut off the charge circuit. If they hit 8.0 volts, it would kick the charge back on if there was enough light to provide enough voltage to charge. Is this a feasible option or is there an easier way?
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2012-07-22 18:49
    you don't need to do anything about the current :) it will stop on it's own . . and as soon as the batpack is under 11.5V then it will charge at a super small rate
    proportional to the amount the batt is dead . more dead more current. its that simple . up to the max the panel can put out.


    Peter
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-22 18:59
    Ok, so I need to some how configure the voltage to always be at 11.36v or 9.6V? If the voltage of all 8 batteries in series is 9.6V, I should set it there correct? What about current limiting? I know I read somewhere there is a way to have the LM317 set to a constant current. Some circuits I see have an NPN transistor that I guess shuts off the charging? Is this needed for what I am doing?
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2012-07-22 19:18
    11.5 V out the reg.

    again you don't need to worry about overcharging those cells as much as you think . If you want to add a 10 OHM 10 WATT resistor to eat up the spare V drop .'
    Iam doung one RIght now ~

    Attachment not found.

    Attachment not found.
    I am makeing a Inboard charger and Bat pack for my Defibrillator ( no joke )

    I have a 15V SMPS that Iam adding IN the case to line power it . and charge a 12V AGM batpack.

    Peter
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-22 19:30
    Ok, so if I set the output voltage (with no load) to 11.5, I should be set to just connect the batteries and forget about it? Is there a certain way the LM317 needs to be connected to properly charge or just the basic setup as this image :

    http://www.electronics-lab.com/articles/LM317/LM317.gif

    This is how I have mine wired and the POT I am using is set to regulate the output voltage right at 11.48v right now.
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2012-07-22 19:35
    Bingo !


    again if you want you can add a 10 OHM after the whole reg If you want..

    how much will your device draw most of the time ??


    Peter
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-22 19:52
    I don't expect it to draw any more than 20ma most of the time. I cannot get an accurate reading of how much is required to activate the water valve though since it only takes 1 second to switch the water flow on or off. It is a simple DC motor like you would find in a small toy car.

    So from what I gather from everything said above, the way I have the circuit wired and set to 11.5V, the batteries will not be under a trickle charge since the LM317 will match the voltage / current requirement of the batteries when fully charged meaning current will no longer flow to the battery. Once the battery voltage drops a little, the LM317 will begin pushing power back into the batteries till they are full. Is this correct?
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2012-07-22 20:21
    TADA!


    bingo!

    the only hitch is that as the pack approaches full the charge rate will be VERY SMALL!

    the curve is Just like RC time constant !
  • eagletalontimeagletalontim Posts: 1,399
    edited 2012-07-22 20:26
    Ok, well, it looks like I have that part of the project completed. Going to do some testing with it and see how well it holds up to running a few LED's over a day or so. Is there a way to indicate when the batteries are being charged like an LED indicator? Sorry for all the questions, just learning as I go :)
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2012-07-22 20:33
    I am glad I could help ! Batts are my thing so any time I can I love to help .

    Peter
    * back to My project for the night *
Sign In or Register to comment.