Shop OBEX P1 Docs P2 Docs Learn Events
Simple Digital Programmable Timer? — Parallax Forums

Simple Digital Programmable Timer?

garyggaryg Posts: 420
edited 2013-07-17 14:12 in General Discussion
I like to keep things simple.
Since about year 2002, I've been using a simple programmable timer that could be purchased for
approx. $20.00.
The Timer is Intermatic Model DT17.
You could program up to 14 on/off cycles per day.
These appear to have gone by the wayside.
I have 6 of these timers operating different functions in my garden at different times and days.

Lately I've started to look for a simple timer that would work like the Intermatic timer but,
would be battery powered.

All I really need is accurate clock with several outputs happening per day.


Does anyone know a source for a simple timer with output?

I have an ongoing garden pest deturrent quest.
My latest gizmo is a Garden Owl that uses a Parallax PIR sensor and Radio Shack 20 second sound card
and glowing LED eyes to chase nighttime pests out of my garden.

I've thought about building a timer with LCD display using a Parallax Prop, but I'm thinking that
somewhere out there, someone manufactures a simple programmable timing device that would work for
simple control.

I'm starting to ramble here, so I'll end here.
Any suggestions or comments will be appreciated.

Thanks

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-07-17 02:30
    Well, the Parallax Propeller QuickStart Board clocks at 80,000,000 intervals per second.

    The nature of micro-controllers are to do things very quickly and you appear to want a 24 hour timer of some sort. So to use a Propeller, you would would primarily have to create delays to provide you with a much slower tick.

    And then, there is the addition of input and display interfaces. An LCD can be attached. The QuickStart already provides 8 touch switches.

    I presume you are asking here because you want to build your own rather than try to locate a commercial replacement. There are lots of commercial timers that run on 120VAC and use a synchronous motor to time a 24 hour cycle... they will even directly turn on and off AC.

    Your Intermatic may no longer be available, but something similar is. If that is what you want... visit your local hardware store and ask about a timer to turn on and off lights when you are leaving your home vacant for two weeks on vacation. The simple truth is that microcontroller just has not been able to make inroads into this market as the devices have everything in one package, been around a long time, and are UL approved. There are even better timers that are made for outdoor sign lighting displays and store security.

    If you do indeed want a battery operated device, you could use ONE QuickStart Board and a 8x relay board from EBay. My personal favorite is to program the Propeller in Forth.

    All of the Forths on the Propeller provide a 1 millisecond delay. With PropForth, one cog is used for Serial i/o and 7 remain for you to create separate timing cycles as you wish. I believe that TachyonForth is about the same with 7 cogs available. Pfth might be a little more involved to use multiple cogs.

    You now have 6 devices at $20 each or $120 total, and it all is replace with one QuickStart and an 8x relay board. I imagine the nicest thing would be to have a much safer low voltage wiring scheme in your garden. 120VAC doesn't work well for safety around water.

    Of course, if you want 6 QuickStart and relay setups, the cost is much higher.

    With Forth, you don't really need the LCD display. You can use a laptop computer to program the devices via a USB port and have no display when operating. The QuickStart does provide 8 LEDs that can indicate any status combination you desire.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-07-17 08:47
    the logging extension in propforth should be able trigger and log as many events as you can dream up.


    it has micro second resolution. the timer wont roll over for years. you should have 6 cog left for your application(s)


    PM me if you are interested or need help
  • garyggaryg Posts: 420
    edited 2013-07-17 09:50
    Thanks guys
    Now I know why my local big box store does not stock the Intermatic DT17 currently.
    Loopy,
    What you are describing using a Quickstart is pretty much what I was thinking about.
    What I was hoping for is a Programmable timer with relay output that could be used to control
    the on/off times of my projects without them being powered by 120Vac.
    I'm thinking that building the timer as opposed to connecting a timer to the microcontroller would be a pretty time intensive
    project.
    Say I want to power up my microcontroller at 5PM on Tues, Thurs, Saturday.
    The microcontroller would take care of all needed control of level sensor, pumps running, PIR output control etc.
    After a 3 hour long cycle, the timer could disconnect my microcontroller and all sensors from my battery supply.

    This is a photo of one of my timer applications:
    IMG_1621 - timers trimmed.jpg


    This one uses 120Vac

    I think I'm going to check out PropForth.
    Prof, I'll PM you. I need to find the PropForth Syntax documentation so I can read a bit
    before trying it.
    1024 x 768 - 68K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-07-17 11:41
    Ah... so you have some 'fear of programing' of the Propeller.
    That is the primary reason I suggested Forth. You have a very user-friendly interactive programing environment. Results for something like this can evolve very quickly.

    For a week worths of schedules, you just create a word... say WEEK.

    If you want a clock with a 365 day calendar, it can easily be done. Or if you just want a weekly cycle, you just have to set the DAY of the week and the actual time.

    To call a weeks worth of different timing, you just have a word called Week like this and the main loop would seek out the right day at midnight and use that routine.

    : Week Monday Tuesday Wednesday Thursday Friday Saturay Sunday ;

    So then you create a word for each day with the timing of events you want to have on and off.

    Sure it requires some study to get started, but this isn't C programing and you can test everything as you go.

    Besides, if you switch to driving it at the Xtal alone, it will clock slower and save some power for battery use.. but still be accurate at 5Mhz rather than 80Mhz. Why waste juice on delays?

    If you want really low power battery operation, use Latching relays. They just require a Pulse to switch state... not continuous power to hold one position.

    Be careful, you might just have fun and really like what you have created.

    PropForth syntax? Here is the Lexicon PF_QUICK_REFERENCE Ver 5.5_prelim_b.pdf
  • garyggaryg Posts: 420
    edited 2013-07-17 12:21
    Ah... so you have some 'fear of programing' of the Propeller.

    Loopy, You are correct to a point.
    I have QuickStart board, LCD and other components.
    I actually had some success in displaying some text and incrementing a count based on pressing one of the
    touch switches.
    I'm attempting to use OBEX objects when possible.
    For some reason, understanding Spin still makes my head spin.
    I believe I'll get over it, once I have a few successes and get a good feeling for how it all works out.
    I'll definitely look into PropForth documentation to see If I feel more comfortable with that.

    Erco.
    My Garden Owl also has motion sensing.
    It works good during the evening hours, but misfires during daytime with full sun on my plants.
    I turn it off each morning and on again each evening.

    https://vimeo.com/69782341
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-17 12:31
    It's pretty simple to create a software clock with the Propeller.

    I know there have been several posted to the forum and I'd be surprised if there isn't a software clock in the OBEX.

    Here's a picture of my sprinkler controller. I haven't added a permanent display or case to it yet.

    SprinklerControl130717a.jpg


    I'm planning on using a wireless fob as the main input device but a few buttons to for setting timers would also work.

    A really easy solution would be to use a notebook or netbook as the interface if you don't need to program the timer very often.

    If you're interested in using a software clock on the Prop, I could help you find the required objects.

    I posted some software on my 6" LED clock project.

    attachment.php?attachmentid=89375&d=1328635740

    If you use any software from that project make sure and let me know. I think there may be a bug or two in the software clock portion and if you want to use it, I'll double check the code for bugs.
    587 x 790 - 230K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-07-17 12:45
    garyg wrote: »
    Ah... so you have some 'fear of programing' of the Propeller.

    Loopy, You are correct to a point.
    I have QuickStart board, LCD and other components.
    I actually had some success in displaying some text and incrementing a count based on pressing one of the
    touch switches.
    I'm attempting to use OBEX objects when possible.
    For some reason, understanding Spin still makes my head spin.
    I believe I'll get over it, once I have a few successes and get a good feeling for how it all works out.
    I'll definitely look into PropForth documentation to see If I feel more comfortable with that.

    Erco.
    My Garden Owl also has motion sensing.
    It works good during the evening hours, but misfires during daytime with full sun on my plants.
    I turn it off each morning and on again each evening.

    https://vimeo.com/69782341

    Well, to be a bit candid... Spin just about had me abandoning the Propeller completely.

    Forth came to the rescue... just because I can now confirm very quickly how things work and what things do. I just seem to have an easier time with an interpreter mode of programing than with a compile mode.

    By all means... explore PropForth. If it is too much for you, there is pfth. I am finding that very rewarding for my level of ability. Tackyon and PropForth are good, but there is a lot more to learn.

    Where to start? With Brodie's 'Starting Forth'. It is easy and good fun. But it never considered a micro-controller.. or multiple Cogs. So there is a Propeller side to Forth that is unique, powerful, and handy.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-07-17 14:12
    Where to start? With Brodie's 'Starting Forth'. It is easy and good fun. But it never considered a micro-controller.. or multiple Cogs. So there is a Propeller side to Forth that is unique, powerful, and handy.

    As Loopy says, Be careful, you can only go so far with Brodie on the prop. If you really want to study using Brodie, you should use a PC based forth, like F-PC etc. But this path may be tangental.

    If you really want to just get down and dirty using the prop, consider doing the examples in the manual (../doc/propforth.htm) and running the extensions from the /extensions directory on actual hardware peripherals. THAT will get your motor running and out on the highway.
Sign In or Register to comment.