![]() |
#5
|
|||||
|
|||||
![]() As I stated earlier this will also control my dosing system so it has more than you need for this project but....
![]() To make it all work I used the Arduino Digital Blink Program. /* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); } void loop() { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second } According to this code the arduino will send a signal to the digital pin 13 to turn it on and off every 1000 milliseconds (1 sec) I modified it to every 15000 milliseconds for our purposes. You will need to connect one of the wires from your relay to the 5v spot on the arduino and the other to the digital pin denoted in your program. Every 15seconds the arduino will turn on the pin and complete the circuit which will activate the relay. When the relay is active the power will be given to the NO wire on the receptacle and when the pin is off (relay off) the power will be given to the NC wire giving you alternating pulses to your power heads. I ended up getting a nice little 1" wave in my tank and my frogspawn moved to and fro. One of the koralia is loud so I need to look at that but oveall I am rather happy. Now on to the dosing side of it all.
__________________
210 Gallon slowly gaining population. Foxface, Naso, Coral Beauty, 2 Clowns, 2 Chromis, Orange Anthias, and Striped Goby. |
Thread Tools | |
Display Modes | |
|
|