Shop OBEX P1 Docs P2 Docs Learn Events
2 things...Ideas for angle sensor and a simple solar charging method for sealed battery? — Parallax Forums

2 things...Ideas for angle sensor and a simple solar charging method for sealed battery?

eagletalontimeagletalontim Posts: 1,399
edited 2015-07-20 01:45 in Propeller 1
Hello all once again!  I have a large solar panel array I have almost finished and need a few things solved before I can call this project finished.

  The biggest issue I have is charging the sealed battery that runs the circuit and actuators that move the array.  Not sure if a small 1A or 2A 12V solar panel is too much to connect directly to the sealed battery, but I need something working soon!  Idle amperage is 80mA.  Actuators draw between 2 and 4 amps but only run for 1 second or so except when the move to park mode.

  The second thing is I am needing a way to tell what angle the panels are.  The tracking system is controlled with the solar tracker I built using the Prop.  Since I don't have stop switches, I can't tell when the panels are at full mechanical tilt or when they are flat for park mode.  Is there a ready to go angle sensor I can easily wire to the prop to get the angle.  Sensor distance from the Prop is about 10ft.

Any help is greatly appreciated!
1670 x 939 - 197K
«1

Comments

  • I would try the 3 axis gyro sensor or use linear potentiometers
  • kwinnkwinn Posts: 8,697
    There are several ways to measure the panel angle. As DigitalBob posted there is the 3 axis gyros and potentiometers. You can also use accellerometers or optical encoders. The least costly would probably be potentiometers and capacitors and measure the rc time constants. Not the most accurate, but good enough. The most accurate would be to use encoders.
  • I don't think a gyro would help much but an accelerometer should do the trick. 
    If you positioned them correctly, you could use the $2 HMC5883L sensors as long as they weren't close to the motors. You may need to calibrate each sensor in place to compensate for the differences between sensors. I'm not sure how accurate the HMC5883L sensors are but if you average a bunch of readings from the sensor they can be very precise.
  • kwinnkwinn Posts: 8,697
    For charging the battery a simple switching regulator may be all you need. Really depends on the type, voltage, and current rating of the battery.
  • The battery is a 7Ah 12V battery commonly used for alarm systems in homes or backpack chemical sprayers, etc...

    For the sensor, I was hoping to find some kind of sensor that I could buy 1ea of and fix it to the back of one of the panels closes to the tracking circuit.  If there were something that could detect 0 degrees of tilt from X angle, that would be perfect.  Since the panel array tilts both left and right, and each panel tilts up and down, one sensor mounted on the back of any panel should read everything I need.  I do not have room for potentiometers.

    If I am not mistaken, a gyro only measure rate of change from a stable angle.  I don't think that would work :(

    Also... the linear actuators come with internal reed switches but me and reed switches don't go along very well.  I have always had a problem with noise being detected as a pulse or issues with debounce.  If there is a VERY stable way to properly read the reed switches, I could keep count of the pulses from one direction and that would be the known angle.
  • An accelerometer could be use to sense tilt. There are a bunch on ebay for about $2 shipped. This one includes both an 3-axis accelerometer and a 3-axis gyro.
    http://www.ebay.com/itm/MPU-6050-Module-3-Axis-Gyroscope-Accelerometer-Module-for-Arduino-MPU-6050-HS-/111711713254?pt=LH_DefaultDomain_0&hash=item1a028977e6

  • jmgjmg Posts: 15,148

    Also... the linear actuators come with internal reed switches but me and reed switches don't go along very well.  I have always had a problem with noise being detected as a pulse or issues with debounce.  If there is a VERY stable way to properly read the reed switches, I could keep count of the pulses from one direction and that would be the known angle.
    If they are there for free, best to try and use them.
    Try feeding one via an opto coupler - that gives spike filtering and a wetting current.
  • jmgjmg Posts: 15,148
     Is there a ready to go angle sensor I can easily wire to the prop to get the angle.  Sensor distance from the Prop is about 10ft.



    Accelerometers are the classic solution, but I also came across

    RPI-1031 / RPI-1045 / RPI-1040, which claim to be 4 Axis optical based sensors.

    I cannot find any transfer data information, but one application circuit suggests the two opto devices are used in Linear mode - I'm guessing with a pendulum of some sort ?

    Linear opto would be good for change sense, but not so great for absolute use, as the temperature variance of LED+PhotoTrx is quite high.

    Possibly two could be used (with one spun 180') to get a temperature tracking zero ?

    Has anyone seen Transfer info on these ? 
  • max72max72 Posts: 1,155
    Wind vanes use a resistor. I don't where you could get on ly the sensot part.

    As an alternative I tested a Melexis 2SA-10 sensor.
    It accepts a quite huge field, so I placed it inside a small cylinder with big magnets.Maybe more complex, but the results were really nice.

    Massimo
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2015-07-20 05:45
    For the charger, these sorts of modules usually include a temperature sensor to adjust the float voltage. http://www.ebay.com/itm/30A-PWM-Solar-Panel-Battery-Regulator-Charger-Controller-12V-24V-Auto-Switch-TR-/151382369189?pt=LH_DefaultDomain_0&hash=item233f17a3a5  is a 30A one which is probably overkill - there are 10A ones for low as $6. Search on ebay for pwm solar battery regulator
  • kwinnkwinn Posts: 8,697
    For a 7Ah 12V battery a 1 or 2 amp solar panel could be connected directly to the battery. It would not be too much as the typical charge rate is in the 1C - 3C (0.7A to 2.1A) range. The better charging circuits start at the higher rate and the current drops as the battery charges until the voltage reaches ~ 13.5 - 14.1V.
  • kwinnkwinn Posts: 8,697
    For a position sensor I would go with Duane's suggestion and use a 3 axis accelerometer. You may not need all 3 axis but having them gives you a little redundancy. The measurements for the 3 axis can be compared to each other as a form of "sanity check". At $2.00 or so each they are also a pretty good deal. The icing on the cake is that they are solid state, so more reliable than mechanical systems.
  • For a 7Ah 12V battery a 1 or 2 amp solar panel could be connected directly to the battery. It would not be too much as the typical charge rate is in the 1C - 3C (0.7A to 2.1A) range. The better charging circuits start at the higher rate and the current drops as the battery charges until the voltage reaches ~ 13.5 - 14.1V.


    !?!

    Do not connect a 1A solar panel directly to a 7Ah battery; you will badly overcharge it. Chargers are too cheap and simple not to use one.

    And a charging circuit that does as you describe is not a "better" one; it should only start to taper the current when the voltage setpoint is reached. "Smart" chargers do a passable job of charging a battery (once); they are not at all good for maintaining them (i.e., charging them every day).

    Use a real solar charger; it only takes two cogs: one to read the voltage and implement the charging algorithm, and the other to do PWM. Some day when I want a challenge, maybe I will make a one-cog version with co-routines; doing that with 100 kHz PWM and MPPT is an exercise left to the reader.
  • I am going to pick up a cheap harbor freight solar charger just to get it working for the inspection tomorrow.

    I am willing to give the reed switches a try if I can come up with a reliable circuit to weed out noise or pick up lightning strikes, etc...
  • Consider pots or absolute position encoders. The accelerometer will have a problem if it has no idea where the array is positioned to start. You can set optical sensors at the end of travel to tell when you get there, but you would have to pick a direction to go to find them. Some medical systems I have seen use both a pot and relative encoders to check position and by using both can act as a failsafe if they disagree by more than a few degrees. You may still want to use some form of switch or optical barrier (or current sense if the device can not mechanically drive past limit) to detect over-travel though.
  • hmmm.  Wouldn't this work : https://www.parallax.com/product/28017 for the tilt sensor?

    Harbor Freight solar panels are way too expensive and too big for my project.  I need a small 12V panel that can output at least 1A.  I did find a solar charger circuit but I don't think it will work for an SLA battery.
  • The best small solar chargers are from MorningStar; they usually have a dip switch for SLA vs. flooded. Or you should be able to get a panel/charger at your local auto parts store; these are not 3-stage chargers, but they work OK for SLAs.
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2015-07-21 16:51
    A good simple match to a 12V 7Ah SLA under the conditions you describe is the PB137 battery charger IC,
    https://www.parallax.com/product/601-00526
    It is simply a 13.6V 3-terminal voltage regulator optimized for float charging small SLA batteries.  Install it on a heat sink, and put a low drop diode in series between the panel and the input. It works fine with a 10W or 20W solar panel that provides around 17V a peak power.   A 20W panel will provide the 1A you want.   The PB137 does not adjust for temperature, so keep your charger/battery in moderate conditions.

    The Memsic tilt sensor would be fine.  Parallax #28017.  It is very rugged due to its clever thermal operating principle.




  • Heater.Heater. Posts: 21,230
    eagletalontim,

    Looking at your pictures above I wonder what is the idea here. It looks like when your panels are tipped over to face the sun they are also going to be casting shadows on each other, thus defeating the whole point of the exercise.

  • The panels move to follow the sun and the panels are spaced 6" apart and can tilt to a +/- 30 degree angle starting from the already 8 degrees of the down hill installation facing south.  The only time the panels will begin to shade each other is when the sun is almost set right around 8pm in the summer time.  The shading is about 1.5" of the bottom corner of each panel at this time.  Not enough to worry about.

    The entire array tilts and each panel tilts in both directions giving me full sun throughout the year....except for night time and clouds :P
  • Heater.Heater. Posts: 21,230
    edited 2015-07-21 19:00
    OK sounds good.
    Back in 1970 something, when solar power became the rage due to the oil crisis at the time, guys in my technical school were steering their solar power systems with clock work mechanisms. OK you have to wind it up every day but hey we are going green and that is what you have to do.
    Soon after that guys were steering their solar power collectors with a couple of LDR's and a few transistors. Worked a treat.
     
  • it is amazing how far technology has come.  This system is connected to my home network using the XBee Wifi Modules and I can control the panels via my web server which runs a socket server to instantly communicate with the panels.  Imagine that being done in the 70's :)
  • Heater.Heater. Posts: 21,230
    edited 2015-07-21 19:31
    eagletalontim,

    Yes it is. The year I was born saw the first transistorized general purpose computer, the MIT TX-0:

    tx-0.two_men_working_on_computer.1980.102631218.lg.jpg

    And the first hard drive, all 5 megabytes of it:
    1956_ramac_rjohnson_large.jpg

    Well, they are all a bit smaller now! And who uses rotating disks anyway?

    On the other hand you should not under estimate what one could do in the 1970's. Us kids used terminals to remote machines as matter of course. The task you are describing is simple enough that it does not need a billion transistors!




  • kwinnkwinn Posts: 8,697
    edited 2015-07-21 20:02
    Consider pots or absolute position encoders. The accelerometer will have a problem if it has no idea where the array is positioned to start. You can set optical sensors at the end of travel to tell when you get there, but you would have to pick a direction to go to find them. Some medical systems I have seen use both a pot and relative encoders to check position and by using both can act as a failsafe if they disagree by more than a few degrees. You may still want to use some form of switch or optical barrier (or current sense if the device can not mechanically drive past limit) to detect over-travel though.

    Why would the accelerometer have a problem knowing where the array is positioned at the start?

    Any sensor for solar panel positioning would need calibration so there is a known relationship between the sensor reading and the position of the panel. That is true for any absolute position sensor. Potentiometers are much more difficult to protect from ambient conditions than a solid state accelerometer would be.
  • If I can't get the reed switches to work that are built into the actuators, I think I will get me one of those sensors.  Maybe they will go on sale sometime very soon...hint, hint :P

    I do like that 13.7V charger component.  I may have to get me one or 10 of those to play with.  I wonder how long the battery would last with using one of those.  I am hoping to get at least 1 year out of a new one if not more.  I may also put a battery voltage sensor to get the prop to give me feed back of current battery voltage.  If the voltage is too low, it give me a warning and decreases the rate of the time between movements.  I use a "running average" to compensate for clouds and to limit the movement time.  I could temporarily increase the allowed array size to make it have a longer "wait to move" time.
  • kwinnkwinn Posts: 8,697
    For a 7Ah 12V battery a 1 or 2 amp solar panel could be connected directly to the battery. It would not be too much as the typical charge rate is in the 1C - 3C (0.7A to 2.1A) range. The better charging circuits start at the higher rate and the current drops as the battery charges until the voltage reaches ~ 13.5 - 14.1V.


    !?!

    Do not connect a 1A solar panel directly to a 7Ah battery; you will badly overcharge it. Chargers are too cheap and simple not to use one.

    And a charging circuit that does as you describe is not a "better" one; it should only start to taper the current when the voltage setpoint is reached. "Smart" chargers do a passable job of charging a battery (once); they are not at all good for maintaining them (i.e., charging them every day).

    Use a real solar charger; it only takes two cogs: one to read the voltage and implement the charging algorithm, and the other to do PWM. Some day when I want a challenge, maybe I will make a one-cog version with co-routines; doing that with 100 kHz PWM and MPPT is an exercise left to the reader.

    You are right, a poorly worded response. I should not have put "directly" in the post. There is a switch (relay or transistor) to disconnect the solar panel from the battery when it is fully charged, but the full output current from the solar panel goes directly to the battery when charging.
  • That is kind of what I was thinking as well since the charge rate would be nowhere close to C/3 or C/2 unless I went higher than a 50W panel.  Question is, how do I accurately read the voltage of the battery, even while charging?
  • kwinnkwinn Posts: 8,697
    That is kind of what I was thinking as well since the charge rate would be nowhere close to C/3 or C/2 unless I went higher than a 50W panel.  Question is, how do I accurately read the voltage of the battery, even while charging?


    Use a small microcontroller or the propeller to open the charging switch every few minutes and then measure the voltage. A comparator, rc circuit or sigma/delta adc can be used for the measurement.
  • jmgjmg Posts: 15,148
    edited 2015-07-21 23:24
    If I can't get the reed switches to work that are built into the actuators, I think I will get me one of those sensors.  Maybe they will go on sale sometime very soon...hint, hint :P

    What pulse rate do the reed switches give ? That still seems the best as they are already there (zero added cost) - with the right contact wetting current and schmitt noise filter, you should be solid on those.
    Can you drive to a stop/ limit switch to zero the system ?

    hmmm.  Wouldn't this work : https://www.parallax.com/product/28017 for the tilt sensor?

    Yes, but you might check the zero drift - they are also not cheap.

    The ROHM Optical Tilt sensors I mentioned above RPI-1031 / RPI-1045 / RPI-1040
    are cheap, and easy to quickly power Up/down, but there is ZERO info I can find on Transfer and Zero stability.
    You could buy one, and measure it.

    Addit: For serious angle sense, there is something like this encoder, up to 4096 steps for $23
    http://www.digikey.com/product-detail/en/AMT102-V/102-1307-ND/827015

    Could be useful to calibrate something cheaper.
  • You want to measure the charging voltage to know when to start the absorb stage; the resting (open circuit) voltage is not accurate or useful.

    I use an MCP3304 with 256x oversampling with the propeller, which will give repeatability of +/- 5mV @ 12V even without a bypass cap; an MCP3004/3204 would probably be good enough. If you want absolute accuracy, you'll need a suitable voltage reference, which is probably overkill for your application, but it sure is fun to get identical readings to a good multimeter.
Sign In or Register to comment.