![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hello everyone my name is Dan and im new to this. I dont have much of an understanding of how circuits work, but, I can use a soldering iron and a multimeter rather well and build/repair things with the aid of a good schematic. That being said, heres my problem: I need to build a timer to turn a 9v device on for 10min, off for 20min, on 10, off 20, and on another 10 min before shutting off completely.I need it to run off a regular 9v batt and be as small as possible.Thankyou for any help you can offer. | |
| |
| | (permalink) |
| You may want to use a microcontroller. I use the "Picaxe microcontroller". Very easy to program. 'Untested code for the picaxe microcontroller with no syntax errors. eg. Code: switch on 1 ‘ switches on output 1 for b1= 1 to 10 wait 60 ‘ waits 60 seconds, 10 times (10 minutes) next b1 switch off 1 ‘ switches off output 1 for b1 = 1 to 20 wait 60 ‘ waits 60 seconds, 20 times (20 minutes) next b1 switch on 1 ‘ switches on output 1 for b1= 1 to 10 wait 60 ‘ waits 60 seconds, 10 times (10 minutes) next b1 switch off 1 ‘ switches off output 1 for b1 = 1 to 20 wait 60 ‘ waits 60 seconds, 20 times (20 minutes) next b1 switch on 1 ‘ switches on output 1 for b1= 1 to 10 wait 60 ‘ waits 60 seconds, 10 times (10 minutes) next b1 switch off 1 ‘ switches off output 1 Last edited by Screech; 8th January 2008 at 12:42 AM. | |
| |
| | (permalink) |
| Ok, I did a little research and found out about the "picaxe" It seems simple enough, but which one do I need and how would I go about wiring it into my device? Can I still use the toggle switch already installed on the device and have it shut off after the 3rd cycle? What would be the best way to do this? Last edited by slopagafud; 7th January 2008 at 05:16 AM. | |
| |
| | (permalink) |
| You can use any picaxe chip. The bigger chips just have more outputs. Downloading the online picaxe manual will tell you all you nead to get started. | |
| |
| | (permalink) |
| Dan, I agree with Screech...A Picaxe could do exactly what you want...cheap and easy. Since you are only turning on only one 9v device, I would suggest the Picaxe 08M. This is an 8 pin Dip with one dedicated input pin, one dedicated output pin, and 3 selectable input/output pins. Two questions: What starts the timer? Since the Picaxe must have power to run, do you want it to continue to be powered after it shuts off the 9v device? Ken
__________________ "To invent, you need a good imagination and a pile of junk." Thomas A. Edison (1847 - 1931) | |
| |
| | (permalink) |
| What I would like to do is basically push a button,have the device run through the cycle and turn off completely.If possible I would like to set it up so if the button was pushed while runnung it wouldn't affect the current cycle. | |
| |
| | (permalink) |
| Dan, I have exactly that circuit for the Picaxe 08M. Ken
__________________ "To invent, you need a good imagination and a pile of junk." Thomas A. Edison (1847 - 1931) | |
| |
| | (permalink) |
| + side is switched already(toggle), and as far as draw goes I cant really see it being much. The device is called a "ZAPPER", it takes voltage from a 9v batt and outputs about 9v @ 30khz to two contacts on a dog harness. It is part of a treatment for my dogs heart disease. ![]() | |
| |
| | (permalink) |
| + side switched & not much draw at all. | |
| |
| | (permalink) |
| Dan, Attached is a Picaxe circuit I've used for a pushbutton start and program shut down. This could be used by adding a few program lines to screech's program. Ken
__________________ "To invent, you need a good imagination and a pile of junk." Thomas A. Edison (1847 - 1931) | |
| |
| | (permalink) |
| Im gonna give this a shot.Thank you so much for your help! | |
| |
| | (permalink) | |
| Quote:
I also have one other question, does this circuit have an output voltage of 9v,or will I have to use a relay? Thank you for any help you can give me. Dan | ||
| |
| | (permalink) |
| Dan The first thing you will need to do is make a programming cable. This can be found in the manual on page 27: http://www.picaxeforum.co.uk/docs/da...xe_manual1.pdf I've included a new schematic that includes the cable and two resistors (R6 & R7) that are part of programming circuit. The connectors P1/J1 can be any small 3-terminal connectors such as 3-pin headers, or miniature stereo heahphone connectors. This allows you to program your Picaxe in-circuit, and disconnect the computer cable when you are ready to use your treatment device. One thing to be carefull about when wiring and programming the Picaxe is the difference between the chip's physical pin numbers, and "pin" numbers in the program. Sometimes it causes confusion. The transistor Q3 will switch the 9v on and off to your 555 circuit. P1 will be used to turn on the power hold function. P4 will be used to turn your 555 curcuit on-off-on-off. I've added my power function to screech's program and modified it for the appropriate pins. This should get you started. Ken
__________________ "To invent, you need a good imagination and a pile of junk." Thomas A. Edison (1847 - 1931) Last edited by KMoffett; 13th January 2008 at 03:51 AM. | |
| |
| | (permalink) |
| Ken, thanks so much for all the help! I already started building the programmer with parts I had laying around, but I was thinking of just wiring direct instead of using the jack. The only problem I could see about that is that the cable would be dedicated to the 08M. | |
| |
| | (permalink) |
| Dan, 3AM epiphany Having the programming cable detachable would seem important if the unit has to be attached to a dog harness. I haven't bench tested my circuit with yours, so it may take a little tweaking of R4 and R5 to be sure you get a full turn-on and turn-off of the pulser. Since I have a little background in Biomedical Engineering...What's the purpose of you pulser? .........OKaaaaaa, I found this: http://www.loaves-n-fishes.com/zapper.html Code: Start: 'Turn on power-hold circuit High 1 OnOffOnOffOnOff: 'Operate pulser circuit Low 4 ‘ switches on transistor output for b1= 1 to 10 wait 60 ‘ waits 60 seconds, 10 times (10 minutes) next b1 High 4 ‘ switches off transistor output for b1 = 1 to 20 wait 60 ‘ waits 60 seconds, 20 times (20 minutes) next b1 Low 4 ‘ switches on transistor output for b1= 1 to 10 wait 60 ‘ waits 60 seconds, 10 times (10 minutes) next b1 High 4 ‘ switches off transistor output for b1 = 1 to 20 wait 60 ‘ waits 60 seconds, 20 times (20 minutes) next b1 Low 4 ‘ switches on transistor output for b1= 1 to 10 wait 60 ‘ waits 60 seconds, 10 times (10 minutes) next b1 High 4 ‘ switches off transistor output Terminate: 'Turn off power-hold circuit Low 1 Stop
__________________ "To invent, you need a good imagination and a pile of junk." Thomas A. Edison (1847 - 1931) Last edited by KMoffett; 13th January 2008 at 03:41 PM. | |
| |