Shop OBEX P1 Docs P2 Docs Learn Events
Measuring Time/Polarity Reverse — Parallax Forums

Measuring Time/Polarity Reverse

Shadowcasterx4ffcShadowcasterx4ffc Posts: 13
edited 2008-05-29 17:05 in BASIC Stamp
Does anyone have any code for measuring real·time on a BS2? For example, we want to turn on the sprinklers at 4:00 in the morning, and have it turn off at 4:30 in the morning, but we dont' know how to code it.

Now for something else:

We're using an actuator to open and close the roof of our greenhouse. However, we need the greenhouse to be self sustaining, so we need something to automatically reverse the polarity so the actuator can open and close the roof without our assistance. I was wondering if anybody knew where we could get a device that reverses the polarity of the current.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Eugene
Greenhouse Project

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-29 17:02
    1) The BS2 isn't suitable for keeping real time by itself. There are several real time clock / calendar chips available that interface easily to the Stamps and there's plenty of sample code on their use. The DS1302 and DS1307 come to mind. SparkFun has a "breakout board" for the DS1307 (www.sparkfun.com/commerce/product_info.php?products_id=99). Check out several Nuts and Volts Columns (go to the Resources tab on the main Parallax webpage and choose Nuts and Volts Columns). Both RTC chips include some battery backed memory that could be used for storing a schedule.

    2) A DPDT (double pole double throw) relay can be used to reverse the power to a motor. Nuts and Volts Column #6 discusses using a switching transistor to control a relay using a Stamp.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-05-29 17:05
    One of the purposes of an H-Bridge circuit is to enable reversing the voltage/current flow on the attached motor. That may be all you need.
Sign In or Register to comment.