Shop OBEX P1 Docs P2 Docs Learn Events
Solar Panel Project — Parallax Forums

Solar Panel Project

Hi, I haven't posted anything for some time, but I could do with some help with my project.
That is to rotate a solar Panel rather than buying more panels. I have chosen to use the Stamp BS2 to control the panel's movement and have completed the mechanicals.
I think some photos could help me explain my ideas, but I'm not sure how to post them on this medium?
Need some help. TerryR
«1

Comments

  • PublisonPublison Posts: 12,366
    edited 2020-07-26 17:17
    You can use the Image button in the top for the post create box if you have a URL where they are stored.

    I usually use the "Attach File" button at the bottom.


    I added the photo with "Attach File" option.
    421 x 349 - 108K
  • That's an old hydraulic drive buggy
  • PublisonPublison Posts: 12,366
    edited 2020-07-27 15:26
    DigitalBob wrote: »
    That's an old hydraulic drive buggy

    Yup. Parallax Quadrover.
  • Thanks Publison

    OK, With these photos one can get an idea of what I am doing. It's a cordless drill driving an M12 threaded bar with an Aluminium Running nut. The Running nut is connected to the panel shaft crank via a push/pull bar, which enables the use of a reasonably short threaded bar.
    The right hand bearing is of phosphrabrons from an old domestic meat slicer; interestingly it sits in a gimble and relieves any worries of alignement with the drill chuck. As can be seen I have cut the drill's handle completely off. It is just sitting on a piece of thick rubber matt and held down by a tree saplin rubber belt. Good points with the cordless drill is it's ratchet; anything goes wrong it justs ratchets and no damage is done, also it responds to pulse width modulating and gives good speed control.
    I am using the Stamp BS2 OEM for timing. Movement, one would like to get say 180 deg, but with this method that isn't possible.
    Relatively there isn't a lot of power from the Sun untill say 9.30 am. It rotates from South East to South West giving good exposure to the Sun from 9.30 am to Sun down. Nothing serious with programing the BS2, I'm simply using it as a timer 30 minute Do- Loop and 1.5 seconds travel time and Retire for Sleep for about 17 hours. All guess work, but seem to be working out ok. I've got it sleeping over night facing West and waking at about 9.30 ish and then returning the panel back to the East stop. Here is the problem the BS2 ignored the East stop and the drill carried on going fortunately it's got the ratched, which we heard.
    Fault The end stops are NOT wired with screened cable. Yes, all the BS2 I/O are held high and all In and Outputs are interfaced.
    But I could have a better salution if I monitered the Panel position. At present I'm only using four I/O pins so I think I need help to find a way of counting pusles and feeding them to the BS2. Any ideas?
    TerryR

    480 x 640 - 121K
    640 x 480 - 127K
  • W9GFOW9GFO Posts: 4,010
    TerryR wrote: »
    But I could have a better salution if I monitered the Panel position. At present I'm only using four I/O pins so I think I need help to find a way of counting pusles and feeding them to the BS2. Any ideas?

    Rather than counting pulses - which would probably not work too well with changes in temperature - I would try an accelerometer like this https://parallax.com/product/28017 to read the angle the panel is at and drive accordingly. You only need two pins and it is real simple to read using the PULSIN command.

    As a bonus you can use the same sensor to measure vibration, such as strong winds, and program it to automatically move to a safe position.

    I would also add a real time clock, the Basic Stamp is not going to be good at keeping accurate time. https://parallax.com/product/29125
  • W9GFOW9GFO Posts: 4,010
    Oh, wait. Your panel rotates, not tilts.

    In that case you could use something like a Sharp IR sensor to measure the position of the running nut (you have a nice mounting place for a flag). It would also be a good idea to put microswitches at each end for endstops.

  • TerryR,
    I did some investigation on a similar problem, and I found that many commercial units make use of real time clock data and latitude.
    For a given latitude, online calculators or solar formulas will give you the sun position for any day-of-year and time-of-day, and so a table of sun position data (or solar formula) can be established for your location.
    Complex commercial units will adjust the elevation and azimuth of the panel based on this sun position data depending upon the time value of the real time clock.
    You are only adjusting the azimuth, so you could create a much simplified data table and store it in eeprom or memory.
    There are many strategies for handling the azimuth tracking.
    One simple strategy is an encoder giving one pulse per revolution and a limit switch for the most oblique morning sun position.
    By observation establish the angle for one revolution for your setup.
    Sometime during the night, return the tracker to the morning limit switch.
    At sunrise time, wake-up the tracking and track the sun angle time-of-day from your simplified table of that day-of-year.
  • Hi, W9GFO and macrobeak

    Many thanks for your interesting and very good ideas, which I hadn't thought of. You have openned my eyes to gadgets I didn't know existed.
    And all at reasonable prices!
    I'll study these options, and probably test out most of them and come back with my results.
    Thanks again TerryR.
  • Very interesting contraption :)
  • Hi idbruce

    Thank you. Yes your right it is a contraption. I am one of those people who search the garage for anything that will adapt.
    The Cordless drill was a light bulb moment. Had not used it for years because of battery problems. No worries with fitting the threaded bar to the drill's hand tightend chuck, but my old lathe did come in handy as the chuck would only accept 10mm diameter, so I needed to turn a couple of mills off the end of the 12mm threaded bar. Yes, the bearing at the other end (from a discarded meat slicer) needed reducing 4mm to fit. I certainly was not out of pocket building this project. Many thanks for your interest.
    TerryR
  • Use hydraulics in your solar, Let's bring back the rover
  • In a previous life I maintained HF radios, with big ole rotating log-periodic antennas. The antennas would spin endlessly if the mechanical limit switch failed, and snap the antenna feed lines after only a few revolutions. My cheap-o solution was to use a single-shot timer triggered by an antenna-in-motion light that would latch the state of the light onto a relay circuit. If the light is still on after the time delay expires, energize the relay, and remove power from the motor.

    For your application, code it into the BS2 program to stop sending pulses after some maximum time. If the limit switch works, super, and if not, just let the drill click for a little while.
  • kwinnkwinn Posts: 8,697
    Simplest way to determine position would be to mount a fender washer with one or more holes around the perimeter on the threaded rod. Then you can use an opto-interrupter or led and phototransistor to produce one or more pulses per revolution of the threaded rod.
  • Disclaimer: Totally clueless about this stuff.

    But wouldn't this make more sense to be handled by a PID (+other logic), based on the output of the cells?
  • It looks like a lot of work, but wouldn't it be easier just to buy a linear actuator. You buy a new one on Ebay for like $25 includes remote and various lengths to choose from 1,300 lbs of pull.
  • Mickster wrote: »
    Disclaimer: Totally clueless about this stuff.

    But wouldn't this make more sense to be handled by a PID (+other logic), based on the output of the cells?

    Mickster, as a clueless observer you are on the right track there.

    Solar panels are very interesting from a control point of view.

    Firstly you should get optimum orientation to the sun i.e. the panel must be perpendicular to the sun's rays.
    This control can be achieved through well-known solar formulas.
    Other methods involve directional l

    Secondly, solar panels have a devilishly peaked power curve, so you have to adjust your power draw to find the peak power point, and then track it as the sun intensity varies (clouds, time-of-day).
    This is also known as the Maximum Power Point Tracking (MPPT).
    This control may be as simple as"'disturb 'n observe", or more sophisticated involving adaptive control, fuzzy logic or PID loops.

    The control strategy adopted is an economic trade-off, and only the largest installations will have both orientation and MPPT control.

  • My first choice would be to add another panel. Panels can be mounted in an east-west array. This provides consistent power throughout the day, kind of like a tracker. A tracker made from recycled parts, like this one, may be worthwhile.

    Adjusting the orientation of the panel to maximize power is equivalent to adjusting the load voltage to maximize power (electronic MPPT). The main difference is one needs to avoid unnecessary movement of the motor.

    The crank mechanism doesn't have a totally linear position to angle relationship. Although in practice it might be good enough. An electronic compass could work as a position sensor. It may not because of being mounted near to ferrous metal. The DC current from the solar panel could affect it as well.

    A simple solar position sensor can be made by shading some light sensors. As the sun moves, it will illuminate a formerly shaded sensor, signalling that it is time to rotate the panel. A lot of this is complicated by clouds. Some designs compare the brightness of 2 sensors to avoid this.
  • Thank you all for your ideas and thoughts about my Solar Panel Project.

    Many of your suggestions I have in place such as SaucySolition's solar position sensors and Kwinn's idea of a fender washer with holes on its perimeter using an opto isolator method; I have put one on the panel shaft, but I think kwinn's idea of putting it on the threaded shaft is a better idea, as the thread pitch resolution would be 1.7 mm per turn, so here I could use a small magnet and monitor each rotation with a Hall Effect device.
    My thoughts are to keep it simple. Yes extra solar panels would do the job, but no exitement in that. I have based my ideas on a couple of perameters. I think the modern Solar panel has quite a good receiving angle, so following the sun "spot on" is a bit over the top for my purpose. I'm looking to have the panel facing South East at about 10 am and moving after a 30 minute pause then moving, for say, 1.5 seconds until it reaches it's South West limit where it will stay until the following morning. For me this is just a challange, I am 83 and bits of me are packing in.
    It is programming the BS2 where I need help. What ever happens it would be an advantage for the BS2 to know the position of the panel.
    If I decided to count the position of the Panel using say the Hall Effect method would I use the BS2 or would I count the pulses externally?

    Many thanks TerryR
  • kwinnkwinn Posts: 8,697
    No need for an external counter chip when the BS2 can do the counting.
  • W9GFOW9GFO Posts: 4,010
    edited 2020-07-29 23:27
    I still like the idea of an IR distance sensor measuring the distance to the running nut. The BS2 could be turned off, then back on and would immediately know the position. Anything involving counting ticks will have to be re-initialized when the power is cycled.

    If you do go the encoder method; since high resolution is not important I don't think you need to make an encoder wheel, it would be easier to mount an optical sensor facing the drill chuck - with half the drill chuck painted black and the other half reflective.

    Another simple idea; mount a row of several micro switches under the running nut, and a semicircular "foot" that will sequentially press down on the micro switches as it passes over them. That would allow for N*2 - 1 known positions for the panel angle. For example, with six micro switches you could have 11 positions, two of them would be at the limits of travel.

    microswitches.jpg
    600 x 600 - 44K
  • A linear potentiometer or a string pot would work too.
  • W9GFOW9GFO Posts: 4,010
    JRoark wrote: »
    A linear potentiometer or a string pot would work too.
    Yeah, you could also use a regular potentiometer mounted coaxially with the mast, or offset it with a linkage. Even a compass stuck to the mast's lever would probably work well enough, but that would not be my first choice.

    Thinking more about the string of micro switches idea (or opto interrupters), you could get much more than 11 positions using six switches (64 I think) - if the "foot" had the right pattern of off and on spots.

  • The array of microswitches does have some mischief potential. And it would be fun to debug.

    Looking at the pictures in the original post, I’d be prone to use a Ping)) sensor to sense the arm position on the threaded rod. Put a mech switch on either end to prevent unpleasant surprises.
  • ChrisGadd
    I remember working with industrial SCRs these would normally require a single pulse to enable them, but our engineers would apply a train of pulses. So what you have said fits the bill.

    To bring the Solar panel to the East Limit, after sleep, My program read:

    IF (LmtE = 1) THEN Motor = 0 'motor ON
    DO WHILE (LmtE = 1)
    Loop

    IF (LmtE = 0) THEN Motor = 1 'motor Off

    So to give my BS2 more stop signals
    I have now put the motor Off instruction inside the loop and kept the outside section too. All working fine, but I don't trust it yet?

    TerryR
  • ChrisGaddChrisGadd Posts: 310
    edited 2020-07-30 12:57
    The point of my story was more to do with mechanical switches being a point of failure. Maybe some whiz-bang optical interrupter, or wheel encoder, or switching matrix, distance-measuring sonar, or the like would work, but it sounds like you simply want something that'll return the panel from Southwest to Southeast. If it takes x minutes to return to the home position, run the motor until it detects the limit switch -or- x minutes have elapsed. Heck, if you don't mind a little bit of wear on the drill clutch, you could eliminate the switches altogether and have the whole thing based on time.

    Oh, and engineers are still doing the train-of-pulses when one will do trick.
  • Hi- just a thought-

    Under the counting pulses system-
    have you seen the magnetic strip used on fridge magnets.
    It can be bought in longish lengths. It has alternating N-S-N-S... poles running along the strip which are easily read with a cheap hall effect switching sensor. I am guessing at four poles per inch.
    It is flexible and easily cut.
    I guess the snag is the hall device would have to be attached to the running nut on the threaded rod and have a longish flexible lead back to the processor. Not really a problem- bit fiddly perhaps?

    Dave
  • kwinnkwinn Posts: 8,697
    edited 2020-07-30 15:25
    Simplicity is the way to go for reliability. Fewer parts equals less to go wrong. The Hall Effect sensor on the threaded shaft and micro switches at each end of the travel are all you need for the BS2 to control the system. The east limit switch activated would be the start or zero position, the pulse count from the Hall sensor would give you the current position, and the west limit switch provides the end position signal. The time between pulses when the motor is powered can be used to detect a mechanical jam or defective limit switch.

    EDIT

    I would suggest returning the panel to the east position at the end of the day when the batteries are charged rather than the next morning if possible.
  • Hey Terry - good to see you back on the board! Looks like you're getting some interesting suggestions from the Forumistas.

    Let us know how your project turns out?

    Dave
  • TerryRTerryR Posts: 39
    edited 2020-08-03 13:29
    Kwinn, JRoark. Keep it simple, My very thoughts. I like it.

    tritonium. Not a bad idea, but if I can find room on the threaded bar I could attach a magnet and count the turns with a Hall device and calculate the running nut's position.
  • kwinnkwinn Posts: 8,697
    No need to mount it on the shaft. A tiny round neodymium magnet could be mounted on the drill chuck with the Hall device directly below it. A small hole drilled in the plastic cover of the chuck and a dab of epoxy or glue would hold the magnet in place.
Sign In or Register to comment.