AquaticSuppliers.com     Golden State Discus

Results 1 to 8 of 8

Thread: Arduino Mega + Raspberry Pi controlled LEDs journal

  1. #1
    Registered Member
    Join Date
    May 2012
    Posts
    301

    Default Arduino Mega + Raspberry Pi controlled LEDs journal

    I am making an LED fixture for my tank, which will be controlled by an Arduino Mega board. I will also use a Raspberry Pi to make the settings adjustable.
    The first step was to get the minimum required components to check whether I can make the Arduino board talk with CAT 4101 drivers. So this is the setup:


    Other than the Arduino Mega board, everything else was bought from http://www.stevesleds.com/
    The driver uses CAT 4101 constant current driver IC which gives upto 1A o/p.
    Arduino Mega PWM is 0-5V at around 500 Hz. This is compatible with the CAT 4101 (100 Hz - 5 kHz).
    StevesLeds makes it easy, and gives a 5V output to drive the Arduino

    I have slightly modified the sample arduino sketch (Fading) so that the max PWM duty cycle is 50%. More over, the pot on the driver also reduces the intensity. Still the LEDs are too bright so I have covered them with an envelope
    Here is the video:


    Any feedback is appreciated
    ~Ashish
    http://ashtricusdiscus.blogspot.com/

  2. #2
    Registered Member
    Join Date
    Jul 2005
    Posts
    309

    Default Re: Arduino Mega + Raspberry Pi controlled LEDs journal

    Confused as to why you felt you needed to use the pi to get adjustability? The mega has lots of ability to do what you want. You should search the salt water forums like reef central and find lots of diy info for your project.

  3. #3
    Registered Member
    Join Date
    May 2012
    Posts
    301

    Default Re: Arduino Mega + Raspberry Pi controlled LEDs journal

    Well.... I have looked at those forums and my initial plan consisted of only using the Arduino. But then when I looked at the Pi... my ambition increased manifold!
    The main advantages of using a Pi is that I can control it from any device that I can get on my network .... I can make a web application that can reside on the Pi.... use keyboards and touch screens... and what not.... I know I can use the ethernet shield for Mega and put it on the network... but it cant beat flexibility provided by a full fledged embedded OS... I can also connect a camera directly to the Pi and access it online ... Oh... I can't stop imagining what I can do with the Pi.....
    ~Ashish
    http://ashtricusdiscus.blogspot.com/

  4. #4
    Registered Member Trevor W's Avatar
    Join Date
    Jan 2009
    Location
    Moose Jaw, SK
    Posts
    344

    Default Re: Arduino Mega + Raspberry Pi controlled LEDs journal

    Very interesting. Its all alittle over my head but I do know the basics because I am currently in the process of building my own diy led fixture. I currently have my heatsink, leds, and drivers. I am ordering my wire and all that good stuff this week and I am also purchasing a typhon controller. I am curious as to how you plan to tie it all together in regards to a project box or housing for all the equipment. Looking forward to seeing the finished product.

  5. #5
    Registered Member
    Join Date
    May 2012
    Posts
    301

    Default Re: Arduino Mega + Raspberry Pi controlled LEDs journal

    Thanks Trevor. I am not worrying about the project box yet
    All I know is... the LED drivers are going on the heat sink... which will be a square aluminum pipe through which I will use a blower fan to draw heat. It depends on my wife whether to enclose the heat sink in something "pretty".
    As far as the arduino and pi go... I have to work it out if I am going to keep them in the stand or on the tank.... I am leaning towards keeping them on the tank... in that case I will also have to worry about the moisture.... Lets see how the chips fall
    ~Ashish
    http://ashtricusdiscus.blogspot.com/

  6. #6
    Registered Member
    Join Date
    May 2012
    Posts
    301

    Default Re: Arduino Mega + Raspberry Pi controlled LEDs journal

    Was able to get to my second milestone.
    Modified the LED driver to control two channels independently. Connected the red LEDs to a different channel and used a different PWM arduino pin to control it.
    The code has a small glitch.
    ~Ashish
    http://ashtricusdiscus.blogspot.com/

  7. #7
    Gold Member FischAutoTechGarten's Avatar
    Join Date
    Apr 2003
    Location
    Green Valley, Arizona, USA
    Posts
    1,231
    Real Name
    Peter

    Default Re: Arduino Mega + Raspberry Pi controlled LEDs journal

    Nice Work!

    Actually, you can run webcode from the Arduino Uno/Mega as well... lots have done it. Look at the Automated Reptile Control System here:

    http://forum.arduino.cc/index.php?PH...topic=140740.0.

    I'm going this route with the Arduino Due..but I'm also including a 5" 800X480 LCD with touchscreen. Having some teething issues with graphics libraries and the I2C interface for some of my remotely located relay boards. And of course the Ethernet libraries are still a mess with the DUE...but there are a few of us working on them.

    The Rasberry Pi is fun. I just ordered a board from Atlas Scientific for interfacing pH/Conductivity/ORP/Dissolved Oxygen probes to the Rasberry Pi. Should pick it up from my Mailbox in Tucson AZ in a couple of weeks. I also have the PI-Face which is a daughter card that gives you a general purpose I/O interface for the Rasberry-Pi. But honestly, I just enjoy the Arduinos and haven't messed with the Rasberry Pi at all. (I have a school here in Guaymas Mexico..we've started an electronics workshop..so I'm hoping some of the students will want to work with the Rasberry Pi stuff).

    There's a guy from Brazil who developed a rather nice controller for his aquarium's LED lighting. He uses a touch screen with slider controls for dimming. You have to get through his Portuguese to see what's going on...but all of his C++ code is understandable. I don't know if I can find the link...wait here it is: http://reefcorner.org/forum/topic.as...83&whichpage=2 . He has another build log here: http://www.reefforum.net/showthread....631#post200631 . The guy is genius. He looks to be using a few Atlas Scientific Instrument Stamps...the same I am using.
    Last edited by FischAutoTechGarten; 07-09-2013 at 07:56 PM.
    Peter
    Cuerpo en Green Valley, Arizona, USA y Corazón en Alamos, Sonora, Mexico

    learning never stops

  8. #8
    Registered Member
    Join Date
    May 2012
    Posts
    301

    Default Re: Arduino Mega + Raspberry Pi controlled LEDs journal

    Thanks Peter!
    Yeah! I have seen both of them!!
    They are really awesome...... I think there is an english version.... a video... which I saw the second one... or may be not :P I have seen so many things...
    Initially I had planned to do everything with arduino.... Was looking for good graphics and stumbled across this: http://playground.arduino.cc/SmartGPU/SmartGPU But the cost, amount of work, extra circuitry to interface so many shields on the arduino.... made me think twice....
    It is much easier for me to use the Pi to do all the UI and OS things... and let the arduino handle the sensors and drivers and stuff....
    I am sure the Pi will prove to be a great motivation for the students.... I saw a video where an 8 yr old girl made her school project using the Pi... http://www.raspberrypi.org/archives/3359 Super exciting!!!
    ~Ashish
    http://ashtricusdiscus.blogspot.com/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Cafepress