Programing Picaxe

Ok so what I want to do is program my picaxe to turn my power head for my reef tank on and over evry 5 seconds aka run 5seconds off 5 seconds. What do I need/need to do to get it to do this. Any help would be great!

If all that the PICAXE is

If all that the PICAXE is going to do is pulse a pin 5sec on / 5sec off then you might as well go with a 555 timer as you get them for $0.99 (free shipping) [3 chips] at eBay
http://www.doctronics.co.uk/555.htm

555

Or 20 for 1.90, Free shipping ;D

http://www.ebay.com/itm/20PCS-IC-NE555-DIP-8-Timers-NEW-GOOD-QUALITY?item=300667683451&cmd=ViewItem&_trksid=p5197.m7&_trkparms=algo%3DLVI%26itu%3DUCI%26otn%3D2%26po%3DLVI%26ps%3D63%26clkid%3D6873739089805941212#ht_2013wt_952

 

I love picaxe’s but geir is right

Look up 555 astable oscillators. There are calculators you can plug your on/off/time period numbers into and it will give you the resistors and capacitor necessary for the 555 chip to generate that pulse. Look into why and how to use a transistor or a FET as a switch. Then you need to hack into your powerhead and find the DC power supply line to the motor and insert a transistor/FET for the 555 to control.

If you’re dead set on having to program something to make this work, for a PICAXE it’s as simple as:

MAIN:

HIGH (whatever pin you chose here)

WAIT 5

LOW (whatever pin you chose here)

WAIT 5

GOTO MAIN

to make it act like a simple 555 timer. Seems a waste on so many levels.

Ok thanks guys!

Ok thanks guys!