Building Arduino Controllers

Victoss

Member
Joined
Aug 6, 2012
Location
Kitchener ON
Seems there is more and more people who enjoy the idea of building their own controllers and trying their hand at programming so I thought I would start an Arduino Resource thread and share my Arduino controllers. I will be mainly focusing on the Arduino Uno but there is not many differences between boards.

Here is the Uno board and the labels on each pin can be seen.
[img=1400x967]http://arduino.cc/en/uploads/Main/ArduinoUno_R3_Front.jpg[/img]

Some pins of interest are the PWM (pulse width modulation) pins marked with ~ which is what I will be controlling my drivers with. I won't go into depth on analog but this is when the signal goes from 0-10V but PWM is digital and is when the signal is turned on and off really quickly. The quicker the pulse the shorter the width or period of the wave is.

The Arduino has a power jack where you can supply the power which in this case we want to be 9 or 10V because will will also be using the 10V off of the Vin pin to be the PWM signal (most drivers require 10V PWM where the Arduino can only supply 5V normally). The 5V and GND will be our power supply for the rest of the circuit.

This will be the basis for each channel, just 1 resistor and 1 transistor which gets it's PWM signal from the Arduino:
leddimming.png

(this setup can be done on the negative or positive of the driver but we will just stick to the negative)


I'll start off showing my Biocube controller which only does 2 channels (channels refer to the LED drivers that you want to dim separately, multiple drivers can be on one channel if they all dim together).
bc29ledcircuit.png

This schematic shows how this will be set up, but there is a new addition now, the real time clock or RTC. This circuit is what keeps the time for our Arduino, the RTC counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap-year compensation. Generally it can keep time for 5 years without needing correction. Without this the Arduino wouldn't know when to turn our lights on or off and because of the 3V watch battery it will keep it's time during power outages. This circuit can be made for cheap or bought from various sites labled as a DS1307 RTC.

If you buy it you will need to wire it like so...
600pxrtcmoduleschematic.jpg


This is what it looks like all done:
img0597yb.jpg

Some of the wires are run underneath so that's why the resistors in the top left (R8 and R9) look separated but are actually connected to the DS1307 chip and that black top rail is 5V where the bottom is ground. (Also there are 3 channels on this board, hence the 3 resistors and transistors)

Now you may be thinking that does not look like the Arduino and this is because it has a shield on top. You can get many shields for the Arduinos and they are boards you connect right on top of each other with the pins. This shield specifically is a protoboard (breadboard) that allows you to make your own circuits right on it keeping everything together and clean.
cytronarduinoprotoshiel.jpg
cytronarduinoprotoshiel.jpg

This one can be found here: http://www.robotshop.com/ca/productinfo.aspx?pc=RB-Cyt-100&lang=en-US

That's it! This is all you would need to make a minimum controller that would just do LEDs. Later I will be showing my full Arduino reef controller which has temperature probes, controls outlets, 4 LED channels, keypad and a LCD screen.

This thread is meant to help people in their own endeavours, if you have things you would like to add then go ahead and if you have any questions on the building of an Arduino based controller please feel free to ask!
I'll be adding some info on code in the future when I find the time. Thanks for reading! :D
 

Neopimp

Website Doctor
Staff member
Website Admin
Joined
Jun 9, 2014
Location
Sarnia
The power of these little units is awesome.  With a little research you can hook up/build ph modules, salinity sensors, temperature probes.  I have most of the stuff to do that, I have 3 BASIC Stamp boards at home leftover from school.  I decided to go with the Apex though simply because its proven, web interface, and ll the stuff is made for it ready to go.    I coudl build an EB8 powerbar but it probably would not be as reliable as what they have already. 

I woudl absolutley LOVE to see the basic programming language or something language supported by the APEX.  Nested If Then.. Do While... Sub routines.....  It woudl be awesome to have that.

I am definitley going to follow along.

I build a slinity probe when i first got into this hobby.  It worked pretty good.... until the salt started to corode my leads :)
 

Victoss

Member
Joined
Aug 6, 2012
Location
Kitchener ON
Thanks, for experimenting and doing projects the Arduino is great. I needed something to do in my electronics class in college and I thought get a reef controller and finish a project in one, win win. Also I imagined the budget would be less which in the end may be somewhat true but I gotta be honest, in the end if your not looking for a project and just want a full controller I would definitely recommend a real controller. Cost may be a little more but you get quality and reassurance that it will work let alone the thing not looking like it was built by me :). With that said, if your just looking for something for your LEDs then I totally recommend the quick build above.
When I get the time I'll post the full controller with the outlets, temp, lcd and keypad on it.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
Good job for this thread. I am building my controller with Mega. Maybe we can exchange software and ideas

Anyway, do you know if PMW drivers  can be tested with a 9V battery, instead of 10V? For a 100% output?
 

Victoss

Member
Joined
Aug 6, 2012
Location
Kitchener ON
scarlabo link said:
Good job for this thread. I am building my controller with Mega. Maybe we can exchange software and ideas

Anyway, do you know if PMW drivers  can be tested with a 9V battery, instead of 10V? For a 100% output?

Sure if you need any help feel free to ask, the code was probably the most time consuming part for me. I initially meant to post the basics of the code but have not had a lot of time on my hands.

The PWM drivers can be tested the same as the 0-10V drivers (even run the same too but with the potential of long term damage). The only thing is since it is 9V you will only be getting 90% of the total output which is probably fine for testing purposes.
 
Top