Go Down

Topic: Aquarium Reef Controller, stage 1, the LCD shield, (Read 41 times) previous topic - next topic

ludnix

I ended up ordering an arduino mega this weekend for $32 shipped of ebay. I was originally going to do the integrated chip route to expand if necessary, but since the mega has 54 digital i/o ports that's more than I could ever need and would be much easier to just use that than rig my own setup. I still might buy a new ethernet adapter though, the code for the ekitszone.com ethernet shield is pretty ugly and hard to use compared to the actual arduino shield library code.

ludnix

I've been running some lunar link moon lights on my tank for a long time now, but some of the leds are pretty dim and seem to be burning out. I am planning on replacing them, but figured it would be cool to make them dimmable via arduino at the same time. I'm thinking of using the PWM on the arduino to transistor to control the power to the LEDS. They need 6vdc according the transformer so I suspect the arduino can't power them on it's own, thus the transistor connected to the transformer.

Is that similar to what you're going to be doing for your leds? I know you'll be working with a higher wattage since you're controlling the main leds and not just moon lights, but I was curious to hear how you planned to dim them with the arduino.

Harlequin

My led set up is different Ludnix, Im using 10 3 watt leds, over a 15"x10"x8" tank (its the test pico, i have twin 250's over the 4ft marine)

And i have 5 Cree X-RE Royal blues and 5 Cree X-RE "R2" (whites), each string is regulated by a luxdrive BuckPuck (Each buck puck has a pot on it to dim the lights, but you can snip this off and supply a PWM signal to dim them) if you were desperate, you could wire up to 1-18(maybe a few more)  1 Watt led's to a buck puck and just supply a PWM signal if you cant get any further. but i bet you could wire them up and power them off an Arduino, even if they require 6 v , you could ether drop a few leds or use transistor (think thats the one) to beef up the voltage, failing that you could always salvage the Led's out of it, heat shrink them and just create a new 5V chain.

got my jump leads, and my Temperature probes in the post today, the RTC coding is giving me a bit of a head ache so i mgiht try and work on the Temp chips now they are here.

i desperately need to order some new bread boards but i cant bring myself to buy one of those large 2.5K point boards (like oyu have) that £20 could go to a complete new module/component :P

Harlequin

Well Im having Tonnes of trouble putting my RTC chip module together and to get it to work with my controller.

I assemble my RTC in the following way:



   Crystal leg---------[1      8] ----------5V(shared on a rail that has a
   Crystal leg---------[2      7]                   a pin to the LCD on as well)
       ------------------[3      6] --------- Pin 20 SDA
      |           ---------[4      5] --------- Pin 21 SCL
      |          |
      |          |  
      |          |
      -- +/- ----------------------Ground (shared with other pins from the LCD that need to go into the ground)


*note im using an Arduino mega, the SDA and SCL are located at pin 20 and 21, not pin 4 and 5 as in the previous/smaller models. im assuming that the wire.h library has the ability to distiqunish which board is in use (i.e. if its a mega and therefore use pin 20 and 21) this is the case as far as i can tell researching. Ludnix, your going to come across this problem i think as well, hopefully you'll jsut have to change your wire locations.

In the Duelmore models pin 4 and 5 had Pull up resistors built in again im assuming this is the case in the mega, but i could be wrong.
i need to go pick some 4.7K resistors up anyhow at some point. for my DS20BS18 chips.

can anyone see anything painfully obvious? with my hardware layout?

Secondly coding wise, for testing purposes i just used one fo the generic testing cases knocking on the net

When i run the code it doesnt set the RTC values to the values i set
i.e. RTC.set(DS1307_SEC,32);

but instead prints out

0:0:0 0/0/2007 DOW:0

and doesnt "incriment up" as time goes by, i can see the screen flickering as the screen is refreshed via the loop(); but the seconds just stay at 0, its not something stupid like me resetting the values to 0 each loop.

i even tried your code Ludnix (modified for my 16x2).

Anyone got any ideas?

a step by step would be nice if anyone has one in building a DIY RTC ;D (again i've looked at that one you posted ludnix time and time again and cant see what im doing differently...)

Help would be appriciated.

(next week we have Temp probes to work through XD (they came today))

pwillard

With I2C, you need to use use external pullup resistors, I have seen anything from 1k8 (1800 ohms) to 47k (47000 ohms) used.

Go Up