|Today 08:18 AM|
Hi guys! I'm just about ready to jump on the bandwagon. Can someone confirm that the parts I've selected will get the job done before I pull the trigger?
Arduino UNO R3 board with DIP ATmega328P - $28
SainSmart I2C RTC DS1307 AT24C32 Real Time Clock module+board for AVR ARM PIC - $9.20
SainSmart LCD Module For Arduino 20 X 4, PCB Board, White On Blue - $12.29
Super-bright 5mm IR LED - 940nm - $1.50 (for two... Or I may just buy local)
So just over $50 for the majority of what I need.
Resistors (local purchase, once I confirm what's needed)
I have plenty of USB chargers and cables so I think power is not an issue. I have a couple of different soldering irons/guns (minor wiring, been nearly 30 years since I soldered a circuit board but I doubt much has changed). I think some wire for jumpers and perhaps a small breadbox is all I need to get going?
Does this current software do ramping on/off yet? I have the simple ramp timer but I want to incorporate sunrise and sunset lighting to the schedule, and perhaps moonlight for a couple of hours. It would be nice if I could still have the lights ramp on and off, though. A second lighting period that just brings the sunrise mode on for feeding time before work would be icing on the cake, else I can manually trigger it with the remote as I do now.
|Yesterday 06:20 PM|
|Curt_Planted||Perhaps the lower resistance is preventing the arduino from maintaining proper voltage accross the led due to overdrawing current. Try 200 ohms (im using 2 100 ohms in series) and see what happens.|
|03-09-2014 10:08 PM|
|Aquatechtoo||Thanks, Curt_Planted. I'm using the IR led from one of Indychus' first posts. Its a LTE-5208A and according to the spec sheet, the typical V_ir is 1.2 (there's no minimum listed). I am using a 150 ohm resistor. Based on the resistance formula, it is 190. However, I'm not sure what this tells me?|
|03-08-2014 09:24 PM|
If your range is that short you may have too high a resistance with the LED. Look at the spec sheet for the ir led and see what the voltage requirement (V_ir) is. Then subtract the voltage requirement from 5 (the output voltage from the arduino I believe). That will give you the voltage left across your resistor. Since you know the current you want through the circuit (just shy of the 20 mA limit for the arduino) then the resistance is just that voltage divided by the current.
In equation form: R=(5-V_ir)/.02
For my IR led: (5-1.35)/.02=182.5 ohms
The IR led I am using needs 1.35 volts (its the forward voltage lower limit on the data sheet), and I rounded the resistance I calculated up to 200 ohms which gives me 18 mA current (slightly below the limit on the arduino). I have about a foot or so range.
|03-08-2014 07:51 PM|
|Aquatechtoo||Thanks, it does, sorta. If I recall correctly when I was building the controller, the emitter only had a range of maybe an inch. Do I need to boost that signal strength by using different hardware?|
|03-08-2014 07:37 PM|
|Curt_Planted||Aquatech2, the emission angle is not that wide. I have my two receivers staggered diagonally so the clear part of them is right next to eachother as seen from the emitter. Even then I still have them about 4 inches from the emitter. HTH|
|03-08-2014 06:55 PM|
I used much of this code and equipment from @Indychus, @Dalhammer, et. al. original posts to build a controller that's firing to two Satellite LED+ fixtures. I'm wondering if you guys know why the emitter doesn't fire consistently to both of the Satellite IR receivers. I'm assuming the emitter is the problem because randomly, either one of the fixtures appears not to receive the command from the controller because that fixture will be on one of the previous settings from earlier in the day. Some days, both lights work fine. Other days, either light can be sitting on another light setting, generally from earlier in the day. As a visual, here is how the setup looks.
|03-08-2014 08:13 AM|
|Curt_Planted||On another note, I am working on a much broader plan to automate my tank with a pair of arduinos with full redundancy. My eventual goal is to have one arduino controlling lighting, dosing, water changes, and co2 as well as acting as a tank/hose leak alert system. The second arduino will act as a fail safe, using pressure sensors, redundant water level sensors and photoresistors to confirm directly conditions are within the primary arduino's parameters and implementing a limp mode to minimize damage/risk to fish. It will also control a redundant solenoid to shut down CO2 if needed, and will control a relay controlling the power supply for the dosing system to shut it down if it fails, and a tertiary sprinkler valve to shut off water for the auto water change system ( there will already be a mechanical valve for fill control and electrical controls in place from the primary arduino). It will also include an ethernet shield to send me text alerts in the event of a failure. I have already set up a web cam and remote control of my pc with my phone so I can check the tank at work to confirm any issues. I just finished an outline plan for different phases of each control aspect and the key coding/technical issues to be solved. See what happens when a rocket scientist falls in love with planted tanks? I want to build it so there is no single point of failure and I will know within minutes if something goes wrong. It all started with me reading about how unreliable CO2 solenoids were. People suggested using 2 series pairs in parallel, and all I could think was: well it's great it will keep working if a valve fails, but what good is that? if you don't know there's a problem to fix, you've lost redundancy and your just delaying a system failure. So I want to solve that issue using sensors, and extend that idea to other damage/fauna critical systems in the controller.|
|03-08-2014 07:43 AM|
Might be a bit on the RTC, didn't realize it was so small and after my small soldering iron died I attempted it with a more broad tipped one... that is so not happening on the IC, lol! So I have to order a new iron before I can even hope to clean up the solder mess I made of my RTC kit!
Anor: If you look in my code I have already coded the sunrise and sunset as cases as in the original code, they can also be directly called as functions! Look at the main loop. For the customaccent fade the only issue is updating all the other functions to keep count of the light trackers. There is no way for the arduino to know what the light level is without doing that. To get it somewhere you want it to be it has to know where its at. I will work on adding in light tracker updates to the other functions and comment/uncomment the right spots for full manual control so you can see what I mean (Case 33 and 34 are sunrise and sunset if memory serves.) Not sure what to do with the dynamic effects... can't really assign a light level to them so may need to terminate them with a full sunrise or sunset to get to a known light level.
bcarl: I think it would be pretty straight forward to add in random t storms. Just a random number generator that initiates a break from the if-else statements, starts the tstorm function and then returns to previous lighting condition after. The issue I have with doing that is having already observed how bad the flashes freak out my fish! I certainly wouldn't use it for fear of stressing them!
|03-07-2014 04:59 PM|
|bcarl_10gal||Curt do you think you could find a way to incorporate the random t storms in with your code?|
|03-06-2014 07:02 PM|
|Anor||@Curt_Planted , looking forward to your code including the RTC. Would love to have the dimming functions, as i just run the "plain" code from here (which is very nice but wish i had some dimming.|
|03-05-2014 01:45 AM|
|kman||Tagged. I need to put together a list of links to parts asap so I can give this a try!|
|02-24-2014 07:44 PM|
I actually just ordered an RTC. When I first implemented this code I didn't realize that the number of seconds in a day exceeded the max size an integer type could store. I came home at 1AM to a fully lit tank and assumed it was an issue with the internal timer. I impulsively ordered the RTC and then realized my seconds in the last hours of the day were negative! No wonder the lights were turning on! lol, so I will be adding an RTC although it is not needed as I fixed the issue with the code. It might drift by a couple seconds a day, but I figure all it takes is a quick upload after correcting the time to correct that, so having to do that every couple of months should be no biggie. The RTC was only 9 bucks though, so if you want to add one I should have the code updated for it in a week or so.
How's the code working for you?
|02-24-2014 03:56 PM|
Safe to assume I still need an RTC?
~edit: Oh! It doesn't use an RTC? Cool! Looking over the code now. Thanks for using lots of notes. I'm pretty solid in powershell, but still learning this.
|02-24-2014 03:38 PM|
|Curt_Planted||I have attached a text doc with the adapted code. Please copy and paste it into the Arduino editor. It should work without a problem on an Uno but I'm running a Duemilanove so you'll have to try it to confirm. Read through the code with special attention to the notes at the beginning and throughout the user defined variables area! All you need is an IR led and the appropriate resistors. You have to define your lighting schedule times, a custom accent lighting setting and the current time. That's it in the code! For your remote set the M4 preset to zero light and as before you will need to connect your led to pin 3. I'm running mine from a cell phone charger although my pc keeps power to the ports even when sleeping so I could just use that.|
|This thread has more than 15 replies. Click here to review the whole thread.|