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

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

2»

Comments

  • I was thinking about using a simple ADC but the only ones that I have are a 4 channel and a single channel ADC and they are all SMD components.  I would have to get a board to solder them to so I can bring them out to header pins.  Then the distance from the prop may be an issue for communication once I do that.  Both of my ADC's are 8 bit.  If I can set the circuit up correctly, I should be able to read from 11.1 to 14V correct?

    I am honestly not sure what the reed switch rate is.  I have a hand held o-scope, but barely know how to use it :(  I could read it on a volt meter and see if I can count the pulses per 1" and see if that works.
  • jmgjmg Posts: 15,173
    I am honestly not sure what the reed switch rate is.  I have a hand held o-scope, but barely know how to use it :(  I could read it on a volt meter and see if I can count the pulses per 1" and see if that works.


    The actuators I've seen were simple things - a basic worm drive and the reed-magnet (1?) is on the motor shaft, so it kicks once per motor rev. They usually also have limit micro switches.
    That's not 4096 ppr, but is probably fine for your purposes.
    The Reed edges should be quite well defined with a stable Motor voltage I'd guess a 'some degrees' which means you could interpolate if that really mattered.
    Both edges can be used, but they will not be 180' spaced.
    A multimeter with a lowest-motor voltage should give you the action.
  • The reed switch is 2 extra wires that I suppose I can feed 3.3V into and detect when it either opens or closes.  My problem is noise that may be picked up and counted as a pulse.  I currently have a header that has 5 prop pins connected to separate terminals.  Each terminal is pulled to ground using a 3.3K resistor and then has a 10K resistor after the pull down going to the terminal.  The next terminal over is a direct 3.3V from a separate VR than the Prop to help keep power draw on the Prop regulator down and keep the ADC circuit on the board with a good strong, clean signal.  It all works perfectly.  Maybe I can simply add a ceramic capacitor across the terminals to keep some noise down?
  • altosackaltosack Posts: 132
    edited 2015-07-22 23:08
    I would go ahead and hook up one of the 4-channel ADCs; that way, when you want to add temperature compensation, it will be more straight forward. 8-bit resolution will be fine for this application; you will need oversampling anyway to get rid of the PWM noise (bypass caps can't do it all), so you'll get a useful resolution boost from that. You'll find that your relative accuracy will greatly exceed your absolute accuracy until you add a voltage reference.

    A 10K/2.2K voltage divider will let you read from 0 to 18.3 volts at 3.3V for your ADC/prop, and will dissipate ~1 mA, which is reasonable.

    I don't think communication from the prop to the ADC will be much of an issue; I drive my MCP3304 @1 MHz on a daughter board with no issues. With 256x oversampling, you've still got way more bandwidth than you need, and you could always slow it down as much as you need to. Even 16x oversampling @ 8 bits will give you 10 bits, or ~20 mV @ an 18.3 V range.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2015-07-22 21:16
    eagletalontim,
    The capacitor across the terminals can help. I
    suggest adding a diode and small value resistor in series
    with the reed switch.  The purpose of the diode is to charge up the
    capacitor fast when the switch closes, but to allow slower discharge so as to reject
    switch bounce.  The purpose of the 220? resistor is to limit the current
    as the capacitor charges through the switch, important for life of the
    switch.  I'm not sure if I've understood correctly your arrangement at
    the 5 terminals.

    426 x 238 - 8K
  • For the angular sensor, why not utilize the rotational axis of your panel with a differential "butterfly capacitor" .. the shaft could be tied to GND (probably already is) in your circuit.  A simple oscillator circuit utilizing the cap could report the angle.  Use a differential approach, so that any ambient temperature variations. etc.. that could affect the circuit are electronically tracked and mathematically cancel each other out.
  • jmgjmg Posts: 15,173
    For the angular sensor, why not utilize the rotational axis of your panel with a differential "butterfly capacitor" ..


    Interesting idea. Got a Digikey part code ? ;)

    You could of course, make one using 2 PCBs, even scaling the angle coverage.
    A HC4046 can do Differential  -> Duty Cycle cheaply.
  • The following control scheme may make things simpler;
    a) Use a packaged MPPT module for the battery charging. Something like the LT3652.
    b) Create a lookup table of optimum horizontal and vertical panel tilt vs time-of-day and day-of-the-year for your latitude and panel orientation.
    c) Program a real time chip to (or some other time collecting device) give you accurate time-of-day and day-of-year.
    d) Place simple encoders on the vertical and horizontal axis and program an algorithm to match the horizontal and vertical tilt to the lookup table.

    If you really want to make this complicated and and location-independent then use a GPS and compass module to establish panel latitude and orientation and implement an algorithm to estimate optimum horizontal and vertical tilt for any location. There are some commercial systems that use this scheme. Just erect them and they automatically start tilting optimally! 
  • kwinnkwinn Posts: 8,697
    The following control scheme may make things simpler;
    a) Use a packaged MPPT module for the battery charging. Something like the LT3652.
    b) Create a lookup table of optimum horizontal and vertical panel tilt vs time-of-day and day-of-the-year for your latitude and panel orientation.
    c) Program a real time chip to (or some other time collecting device) give you accurate time-of-day and day-of-year.
    d) Place simple encoders on the vertical and horizontal axis and program an algorithm to match the horizontal and vertical tilt to the lookup table.

    If you really want to make this complicated and and location-independent then use a GPS and compass module to establish panel latitude and orientation and implement an algorithm to estimate optimum horizontal and vertical tilt for any location. There are some commercial systems that use this scheme. Just erect them and they automatically start tilting optimally! 


    Or you can forget about time, date, and location and have a program that seeks the optimal location. Rotate one axis of the panel until the power produced peaks and then drops for several readings, then return to the peak position. Repeat for the other axis. Storing and using the previous days peak power position for startup speeds up positioning since it only changes a bit from one day to the next.
  • But that method will use a lot of battery power searching for the peak. And with clouds, you could get false peaks. For fixed location solar tracking, a lookup table is best. I have a number of panels working that way and they are always facing the sun. Even when it is behind clouds or raining. And by adjusting the step size, you can control just how many moves are needed each day.  
  • jmgjmg Posts: 15,173
    Both approaches have their merits :
    * True MAX power is what you actually want, and that design has good KISS ratings.- It needs care to keep power cost low, to avoid hunting effects on coarse cloud etc
    * Lookup tables need database management, and storage, and they are in absolute terms.More custom geometry translation work is needed if the install axes are not level, or optimal, and the site often dictates that.GPS modules are getting cheaper, and they can tell you where you are and the exact time.

    A combination of the two can even be considered, where the system uses MAX power tracking to calibrate the Tables, for that site and installation case, even down to the individual Panel.GPS is used to lock the time base, and could even give a rough starting point for seek, but the daily pathway can be power optimised from previous days tables.
    I like the idea of self-powered tracking systems, which prove they have no hidden energy costs.

  • kwinnkwinn Posts: 8,697
    But that method will use a lot of battery power searching for the peak. And with clouds, you could get false peaks. For fixed location solar tracking, a lookup table is best. I have a number of panels working that way and they are always facing the sun. Even when it is behind clouds or raining. And by adjusting the step size, you can control just how many moves are needed each day.  

    True, it will use more battery power initially, but after that it should be very close to that of a lookup table. A well designed system will also compensate for shifting of the panel mounts or off kilter installations.
  • kwinnkwinn Posts: 8,697
    Both approaches have their merits :
    * True MAX power is what you actually want, and that design has good KISS ratings.- It needs care to keep power cost low, to avoid hunting effects on coarse cloud etc
    * Lookup tables need database management, and storage, and they are in absolute terms.More custom geometry translation work is needed if the install axes are not level, or optimal, and the site often dictates that.GPS modules are getting cheaper, and they can tell you where you are and the exact time.

    A combination of the two can even be considered, where the system uses MAX power tracking to calibrate the Tables, for that site and installation case, even down to the individual Panel.GPS is used to lock the time base, and could even give a rough starting point for seek, but the daily pathway can be power optimised from previous days tables.
    I like the idea of self-powered tracking systems, which prove they have no hidden energy costs.



    Good points. I like the combination system as well. If i were to install one for my use I would add GPS and use an initial calculated table based on the GPS location and then fine tune and modify that table by auto-seeking for the maximum power points.
  • pjvpjv Posts: 1,903
    @ Tracy Allen,

    I believe the diode in your circuit is redundant. When the switch opens, the circuit stops charging and is high impedance. There is nothing for the side to block.

    Also, for maximum effect, the capacitor should be to the right hand side of the 10k resistor. Or, better yet, have one in both places. The right hand capacitor of course needs to be sized to be compatible with whatever the reed duty cycle is.

    My thinking on this is that the Reed switch approach tis the simplest and best answer for this project.

    Drive the actuator to one end until Reed pules stop. Then drive it in the other direction until pulses stop. Count the pulses, and inteolate the position from there. Have a small lookup table to normalize pulses to angle.

    Cheap and effective.

    Cheers,

    Peter (pjv)
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2015-07-25 16:29
    Good catch Peter.  The diode is not necessary.   I was half thinking about how I dealt with reed switches on the BASIC Stamp.  Three circuits appended. The diode was important because of leakage.  Reed switches outdoors (rain gage, traffic counter, flow meter, position sensor) would tend to get wet or moist across the surface, and the leakage resistance would would cause the circuit to fail.   It could be the switch itself or or the connections leading out the the switch.   With the Stamp, I was using the capacitor to store the fact that the switch had closed, and the Stamp was polling the input looking for the low, and then resetting the capacitor high in firmware.  No counter module or cogs in the Stamp!   Leakage was especially important when using a capacitor as a memory element.  

    A different issue happens when the switch feeds counter inputs that don't have schmitt trigger inputs.  A slow capacitor edge can lead to multiple counts.

    984 x 262 - 4K
  • jmgjmg Posts: 15,173
    The series resistor has gone ?  - Switch contacts straight across a CAP are not a good idea.
    I've seen designs that have 2 x 470 series R to remote switches, one in each wire, as that gives 'slip protections' to both wires, with no fault currents.
    With small Schmitts in SOT23, you can add them at low cost to a design, and also gains some ESD pathway protection.
  • Didn't someone post on here about making an angle sensor out of an R/C servo, hacking it so it couldn't move but reading how much it wanted to move to get to the neutral position?
  • For an angle indicator my first thoughts were to use a Throttle Position Sensor from an auto scrap yard or from a boat scrap yard get a Rudder Angle Indicator.  Both are potentiometers housed in weather proof enclosures and are designed for heavy use.
  • You know, a TPS is not a bad idea.  There are some that are pretty cheap and a simple dual channel ADC could handle the rest.  The only problem I can think of would be how to attach it.  The way my system is designed, I don't have much to attach a TPS to for the panel tilt.  The array tilt would be easy.

    I did mess around with reading the actuator reed switch and got an accurate reading for awhile till the actuator flat out died.  A brand new actuator that is supposed to be IP66 rated was full of water.....
Sign In or Register to comment.