Help - Search - Members - Calendar
Full Version: Controllers alike... Here is another one
Nano-Reef.com Forums > System Setup > Do It Yourself

newhobby
Hello Everyone,
I have been trying to get my project in the forums, but for some unknown reason, I always get interrupted and can't show what I have been working on. My first post got lost in the last forum data loss, then I tried a second time and had to leave and then finally yesterday when I was midway of the writing, IE crashes and I loose everything I have typed.... lol
Anyway, I was looking at the posts of others playing around with microcontroller and being an electronic engineer, who don't work with microcontrollers for more than 10 years, I decided that I was gonna have some fun with one of those too. So, here is another implementation of a reef controller based on ATMega 328 (AKA Arduino).
I started off with a ATMega328 which has very limited pinout and memory size, but I thought I'd start small and try to accomodate what I can. Well, I soon found out that the program memory is indeed very small. 30K is not nearly enough to get lots of features I wanted in it. Many of the features couldn't fit in the program memory, so I cut down to the most basic features. The pinout limitation was overcome with an expander IC.
I didn't like the way the Arduino bootloader behaves on USB connection, so the final version won't have the bootloader and if no bootloader, there is no point of even having the arduino hardware, therefore a custom PCB will be fabricated and I'll have a ATMega328 circuitry redesigned.
For testing purposes, the bootloader is awesome and very very convenient, so I'm sticking with the Arduino hardware for the testing phase.
More to come.... I'll be breaking down the writing to avoid loss again... lol

Roberto

Initial Screen


Proto Board
newhobby
Hardware


Arduino Board
More

Arduino Duemilanove is being used in the testing phase due to its awesome bootloader, making it easy to upload sketchs and test the code.
I started off with this simpler version just to get my feet wet and soon realized that my next controller will need to be more robust... lol
So, this version will have limited capability.
The pinout I have is:
A0- Joystick Vertical
A1- Joystick Horizontal
A2- PH Probe
A3- Salinity Probe
A4- I2C SDA
A5- I2C SCL
D0- RS232 RX
D1- RS232 TX
D2- LCD Backlight
D3- LCD CS
D4- LCD SCL
D5- LCD SDA
D6- LCD Reset
D7- Joystick Select
D8- Temperature sensors
D9- Daylight PWM
D10- Actinic PWM
D11- LOW Level ATO
D12- HIGH Level ATO
D13- Alert/Buzzer

Thumb Joystick
More

This nintendo-like joystick has a button built in to use as select function. I prefered this as opposed to digital joysticks that could take up to 5 pins. I know it is using precious 3 pins (2 analog and 1 digital), but it fit in this project, since I had 2 analog pins not being used. One solution to digital versions is that it would only need 1 pin configured as interrupt, but the interrupt pins on Arduino are digital and I had none left and I even had to expand I/Os. And besides, I like the analog joystick better. smile.gif

Color LCD
More

This color LCD display has 128x128 pixels and uses serial 9bit SPI comunication. It requires 4 pins to communicate and a 5th to control backlight. The 5th pin is not a must, but nice to have it, especially after a reset or to promote energy savings when in idle.
This is a tricky interface, because it uses 3.3V logic and ATMega328 uses 5V logic and 7V backlight power supply, so in order to interface it, I would need to build a 3.3 to 5 conversion and have 7V to power the backlight or build a booster to 7V.
To make things easier and faster on this prototype, I opted to buy a canned display instead of building the circuitry. It was 3 times more expensive, but I had a board ready to be interfaced with 5V logic.
Since all communication is serial based, there is a slight delay when using large graphics.
The driver this board has is the EPSON, which seems to be a little simpler to interface than the Phillips. I need to get a hold of one Phillips to play with it... Hum... On second thought, I'm thinking of 320x240 pixels when I step up to a meatier controller. That way I can dedicate 8bit data interface to the display, which would take up almost all the pins on this ATMega328. lol

Temperature Sensors
More

These are DS18B20 1-wire maxim 12bit temperature sensors. They have a laser address embedded to it, which makes it possible to communicate with them with just 1 pin. I didn't have enough analog pins to use with thermistors and measure temperature, but these are actually a lot more accurate and a lot easier to work with than it seems. I'm very happy to have gone with these sensors. The resolution is incredible and the only drawback to these are that they require 750ms to calculate temperature. For real time applications, they wouldn't be the best choice, but in my case, I'm pulling data every second which makes it more than the 750ms necessary to calculate and a very nice addition to the project.

PH/Salinity Probes
I don't have those yet. What I did was interfacing the input pins to some thermistors to emulate analog input and test the logic of my program.
As soon as I have some time and money, I'll start looking for those.

External EEPROM Memory
More

Since ATMega328 is very limitted in EEProm memory, I addded this 24LC256 EEProm memory.
They use I2C interface and have 256Kbits or 32K bytes of storage. I'm using it to store graphics and data log.
With this much external memory, I'm using ATMega's internal memory to store pointers to where my data is stored in the external memory.
I'm actually only using a little over half the storage with all the data and all graphics that I stored. I have a lot of free external memory left.
I'm logging parameters every 6 min, which gives me 240 logs in a 24 hour period. After that, It will start recycling memory. So each parameter has a fixed and predetermined allocated memory space to log data to.
I decided to go this route instead of letting it grow and have memory leak and uncertain results. And besides, 6min log is not bad and having last 24hrs of data is plenty in my opnion.

Real Time Clock
More

These little guys only need a crystal and a battery to keep current time with no loss.
They also interface through I2C, so no extra pins are required.
After I bought this IC, I got to find out that the DS3231 is actually better option, but is only on smd form. DS3231 comes with built in crystal and makes it very reliable with no fluctuation of crystal interferance and accuracy. On the final project, I'll definitelly be using them.

I/O Expander
More

I had to use this IC to expand the I/Os of the ATMega328. With all the different types of communication protocols, I had not many left for anything, so I used this IC to have 8 I/Os added to the project.
They also use I2C communication, so no additional pins were used and in return I got 8 output pins. They are configured to drive the relays that will turn stuff on and off. Since they will only be used as output pins, I don't need the interrupt pin to be monitoring for input changes.
Whacked
First of all, whoosh!!! way over my head but I like pretty pictures smile.gif and shiney things
following what it does, cool! its great to see projects like this even if I dont understand everything.

Second of all
QUOTE (newhobby @ Jul 23 2009, 06:41 AM) *
IE crashes

Therein lies your problem. get Firefox smile.gif
Vancouver Reefer
Nice start. I know what you mean about the lack of memory. Thats why i upgraded to the Arduino Mega, and ive just about filled the I/O on that now too!!!

Keep us posted on all your progress and keep the pics coming!!

VR
cdelicath
I'm watching...
I'm trying to build one myself but I don't know the first thing about electronic components and I am having to learn the coding from the beginning too. Needles to say It's been sitting in a box for the last 4 months.
I just ordered some new stuff and I am going to dive into it again though. It's good to have you pro's around to help us noobs over the speed bumps.
Love the joystick and LCD BTW. Can't wait to see more info
newhobby
Features


Continuing with the project scope, I'm gonna present the features I managed to implement.
In the main screen, I have put the time, relay output status and parameters being monitored, which are 3 temperature sensors, PH and salinity, as well as a graph with last 24hours of data.
They are color coded, so you can refer to the color of the reading and graph.


With the joystick, you can change the graph to show only one parameter at a time by moving up or down


The Features I could fit in before I started running low on memory were:



1- Feeding mode
Stops all pumps, skimmer and ATO for 15min


2- Water Change Mode
Stops all pumps, skimmer and ATO until cancelled


3- View Log
Shows the last 9 log entries in the screen


4- Set Date and Time
Sets the date and time of the real time clock


5- Set Dawn and Dusk
Sets the time for dawn and dusk.
If PWM is not used, at dawn actinic will turn on first and daylight 30 min later and at dusk daylight will turn off 30 min earlier and then actinic goes off at dusk time.
If PWM is used, daylight and actinic will ramp up and down at dawn and dusk in a period of 60 min.


6- Lights Overheat
Since I did not have enough pins to control fan speed, I decided to go with those self controlled fans that have a built in temperature sensor and it controls fan speed by itself. In the case of fan malfunctioning and temperature gets too high, the controller will kill the lights to avoid any damage to lighting system.


7- LED PWM Control
This will set the operating PWM of daylight and actinic when in normal operation. PWM ramp will adjust to go to this setting when doing dawn and stop at this setting.


8- ATO Timeout
This will set the maximum amount of seconds that ATO can remain on. After this many seconds, ATO will be disabled until manually reset.


9- Wavemaker
This will set the wave timer and pattern of the relay output. This is an AC relay and not DC pump controlled. I still need to figure out a way to have an AC pump doing waves. I was thinking of putting a stop on the Koralia propeller to avoid having it hitting the end of the shaft when the pump starts. This will be a next project. Maybe someone has a better idea that are not too expensive.


10- Temperature Sensor
This will point the 1-wire address to the correct parameter.


11- Dump Log to PC
This will send all 100 previous logs to the USB port to be captured by a PC application.

12- Dump Parameters to PC
This will send the last 24hrs of the parameter logs to the USB port. There are 240 entries of each parameter.

13- Calibrate PH
This will calibrate the PH probe. Dip the probe in a 7.0 PH solution and then dip the probe in a 10.0 PH solution. It will record the values and calibrate the readings accordingly.


14- Calibrate Salinity
This will calibrate the Salinity probe. Dip the probe in a 0ppt salinity solution (RO water) and then dip the probe in a 35ppt solution (marine salt water). It will record the values and calibrate the readings accordingly.
newhobby
And there it is. My little controller.
Next stage will be put this in a project box and put it to the test.
I'm actually on vacation at my folks home for the past week and had plenty of time to work on it.
I'll be back home this weekend, so early next week, I'll be looking for boxes and probes.
Everything looked to be working fine on the proto board, but you know that when you start using it for real, there is always some bugs and issues to be resolved.
If everything works out fine, I'm gonna start looking for a more custom box and start planning on a PCB design. At that point, I'll probably be looking for some beta testers. I already have some local guys interested on testing it too.
If anyone have any comment or input to give me, please let me know. I'd love to hear them.
Thank you very much for reading a very long and extensive report of what I have been working on in the past 2 weeks.

Roberto.
121a
wow that looks really good. especially the LED control. good luck and looking forward to more updates!
reeftankguy
Sweet! Very nice job and presentation!

Me like to be a Beta Tester! cool.gif
hcsceo
awesome keep it up. There are a lot of arduino controller projects going on right now. It gets me excited. I like that screen and joystick setup.
Urchinhead
Well done. What do you plan to do in terms of wavemaker control? Gear motor controller? Same with sensors? I did a bit of looking a while back when I was going down this road and found some items out there that lend themselves to monitoring what you (and I) was looking for but found them to be rather expensive or not able to handle a marine environment...
streetlamp
Would love to help out with this project if you need any more beta testers. Also can donate any graphic design work you might need done for the project.
spipedong
Beautiful work. Looking forward to where this goes. It looks more mature than many of the 'big boys' products.
Whacked
wow oh wow oh wow!
Looking awesome
cptbjorn
QUOTE (newhobby @ Jul 23 2009, 05:41 AM) *
My first post got lost in the last forum data loss, then I tried a second time and had to leave and then finally yesterday when I was midway of the writing, IE crashes and I loose everything I have typed.... lol


Looks like you know how to kick out some code but you use IE? wacko.gif

Seriously though looks great so far.
davidr2340
ohmy.gif

AMAZING BUILD BRO!!!
Of course most of that went over my head!!! sleep.gif
newhobby
What do you guys think about the salinity monitoring?
Hcsceo is messing with the circuitry and I have done my research too.
It just seems to me that it takes a lot of work to make it somewhat reliable for very little benefit.
Wouldn't it be better to have a ipod size screen with touchscreen instead?? I could use my time trying to get a larger screen with touchscreen instead of messing with salinity monitoring. What do you think?
newhobby
I decided to dump the salinity out of the project unless I find something that changes my mind as far as circuitry and reliability.
Here are photos of my unit in a project box already.


DB9 connector to communicate with outlet/relay box. After I had it installed, I decided that db9 is not the best choice. It just increases the project cost and does not bring any benefit. So, my future version probably will have standard network cabling and I'll split the relays in 2 boxes.


Not the best cutout, but this is just a prototype anyway... lol


Sensor connectors.
The top most is the PH, the middle ones are ATO high and low and the bottom ones are temperature.


mabviper
I like this project ^^. I think you have the cleanest GUI I've seen not to mention it's graphic. I'm not sure how easy it is to design a gui with Arduino but w/o a gui builder, it must've been alot of programming.

Keep us updated ^^. I hope this controller works out for you.
newhobby
Hey all,

Today I got the sensors encapsulated and ready to be used. Hopefully they are good enough.
I'm gonna wait until tomorrow to let the silicone cure.
So, I started with a stereo cable used in any audio device, like headphones.

I cut the plugs and stripped the wires

With the exposed wires, I soldered them to the sensor

For the Lights sensor, I added shrinkwrap

And encapsulated it with a spade terminal, which can be mounted on the heatsink of the lighting system (too bad I still don't have a LED system yet mad.gif )

For the Water sensor, I used one Bic ball pen tip and encapsulated the sensor with silicone inside

And put another layer or silicone with shrinkwrap

For the Room sensor, I just shrinkwraped the soldered wires

And connected them to the controller for testing

They work!!! YAY!!!! smile.gif
I'm gonna place in the tank tomorrow and start a live test of the controller smile.gif Wish me luck!!! smile.gif

Roberto.

cdelicath
ninja.gif I will be watching

Looking good
FiRsT-aNd-LaSt
Amazing, way over my head also, but I will follow, keep up the amazing work.
James411
If you don't mind, what is the total cost to date on this build?

Your controller is awesome.

If I only had your skills....
spk9
Would love to know the cost of your set up. It is pretty darn slick!

Are you planning to post your components, wiring, code so we can try to replicate it?

I would love to do something like this, but not being an EE I am having a hard time getting started.


QUOTE (James411 @ Aug 16 2009, 09:01 AM) *
If you don't mind, what is the total cost to date on this build?

Your controller is awesome.

If I only had your skills....
newhobby
Hi guys,

I don't know how much I have spent. Probably a lot to have bought a reefkeeper, but that was because I had to buy a lot of stuff on 1 unit purchases and wasn't too concerned on money spent, but to get something working at first. It's been many years that I don't work with microcontrollers and wanted to make sure I could handle it too, so I bought many things in many units just to make sure that what I bought wasn't defective and I was just pulling my hair out because of a bad component.
Anyway, if I were to reduce cost of the electronics, I could get it pretty darn cheap.
What would cost the most would be the non electronic stuff, like case, cables, adapters, connectors, plugs etc.
I do plan to have this out to you guys, just don't know exactly on which terms. I know hsceo is going open source on his controller, so if you really want an open source controller, he's the man!!!
I'm getting pretty close to having something more concrete made. I wrapped up the last of my circuits yesterday, which was the PH meter.
Here is a pic of it:

Also, I have finished putting the controlled outlet box topether.
Because I missed the fact that I wanted to have overrides on the box itself,I calculated 8 wires for each controlled outlet and 1 return common wire. Well, when I was building the box yesterday, I realized I'm short by 1 wire to have the override ON capability on the box. So, The box only has right now the AUTO, OFF positions working, The ON is non functional. sad.gif... I knew I should've chosen another cable instead of serial db9 from the beggining. Well, the final prototype version will have totally different type of cabling.
Here are pics of the outlet box:

The override switches:
(ON=Up, OFF=middle and AUTO=Down)

Power Inlet:

Controller communication adapter:
This is where my mistake was. I still have to find out which adapter will accomodate all of the wires and not cost too much.

My thoughts were to include a LED driver in the outlet box too. I have already bought the components for the circuit and just need to test it.
So, the final prototype might have LED driver in it too. Or maybe the next generation controller. Who knows??? lol
I think I have a very stable and working circuit so far and I'm now at the phase of identifying the best adapters, cables, cases, plugs and the works to make this a very reliable unit.

Thanks for looking.
Roberto
newhobby
All right....
I'm at the stage of trying to identify the case for the project and have been hammering my head over and over for the past 3 weeks. I just can't find a nice case and have the screen, PCB and joystick to fit and look nice and in harmony. I have revised my PCB so many times and have gone through several different types of cases. So, hopefully I'll find one soon and I can move along and send my PCB to manufacture.
I have also added a watchdog to the circuitry, because there is never an error free code. Safety always first.
Then, I was messing with LED drivers too.
I had one made to see how easy and practical it would be and it's actually a pretty simple and cheap circuit.
I'll be definitelly including it to my final version.
This is a buck type of driver.
I calculated it to run at 0.9A and in this protoype version, I only had 3 Q5's on 12V power supply.
Here are some pics:






That's it for now.
Hopefully I can identify the case soon... smile.gif

Roberto.
halfpint
Awesome build! I'm tagging along. Depending on the price, I might be interested in purchasing one, once complete.
jm82792
Very nice,
I just bought a arduino for a PWM Koralia wave maker but I'm extremely exited just to have it and will probably/hopefully much further with it smile.gif
1337TANKHAX
I'm on board with this one. Looks great so far!
halfpint
I forgot to click the subscribe box. tongue.gif



Any updates?
evilc66
Maybe I missed it, but what driver chip did you go with?
zjharva
awesome! id def. be interested if the price is right! already looks like better than some of the basic reefkeepers!
newhobby
Hello All,

I know it has been a while since my last post, but I just decided to work on the project and post an update when I have something to actually show.
I have been working on the PCB board for the past 3 months and after many prototype boards later, I got it finally done.
The main modifications I've made to this project was:
1- Removal of salinity circuit.
I decided that the salinity circuit was going to add an enormous cost to the project compared to the small benefit that you would get out of it. Maybe to many it is a very important feature, but this circuit can always be added later if the interest is there.
2- Addition of bootloader
I have made a major change in the way this project was being approached and decided that the ability to have a custom mod to the device was going to be available. So, I have decided to provide all the pin out and Eagle files of the boards to the final user. This way, the user can mod it or make a custom software and upload it to the device for infinite flexibility.
Although my controller software will only be provided as a compiled version only for now, I will provide all the codes and examples to use the device, so you can easily make your coding.
The bootloader is a variation of the Arduino bootloader compiled by me, but it works just the same way and you can even use the same Arduino IDE to write your own code and upload the sketches.
3- Removal of the watchdog component
With the inclusion of the bootloader and the ability to write custom codes, the watchdog had to be removed to avoid reset of the board if the original software was removed.
Now, I am at the point that the final prototype boards are made and placed in a somewhat finished case.
I still have to estimate the cost of the final device, with all the components, cases and cables included, in case someone wants to purchase it already made and ready to work out-of-the-box.
When I have all the cost compiled, I can give you guys a better idea of how much one of this little guys will cost and I'll be releasing the files at that time too. Keep tuned.
I was planning on having my own LED driver included in this release, but I made these boards to accomodate the Meanwell drivers. So, my own LED driver circuit is not going to be realeased on the initial realease.
I decided to use and publish my own driver because I just got my Meanwell a week or so ago and I really was disappointed with the way it was designed and the issues I'm having with them. The two issues that really bothers me is the flashing of the LEDs when power is cut off and the inability of dimming less than 25%. If you are OK with those problems, then the relay box board is already made to accomodate the Meanwell drivers.
I have only made 2 prototype boards, so I do not have any to spare, but I'd like to know if there are any people that would beta test these boards. Depending on the interest, I can calculate the cost to get all the parts and contact any interested party with the cost.
I can almost guarantee the cost will not beat a reefkeeper lite. Many people might even think why not just buy a reefkeeper lite instead. Well, I can just tell you to go ahead and buy one of those and you most likely will have a very nice device and be very happy with your purchase, but you will not get a device that can be fully customizable to your own taste and requirements. So, keep that in mind.
The conditions would be that you need to:
1- Be somewhat DIY because I don't have the cases template done yet, so they will not be routed. You would have to drill and cut the box yourself. All the cuts and holes I've made were by hand. I do not have a router.
2- Keep in mind that the cost might be a little higher because I'm gonna be doing it as a small scale and not as a very large scale production.
3- Know how to solder, as the temperature sensors won't be pre-made.
4- Have a minimum knowledge of AC wiring and don't get electrocuted as the relay box require wiring and soldering too.
5- Be patient as I'm only one guy and some of the parts have a 2 week lead time.

Here are some of the pics of the final prototype
Main controller board






Main controller box
As you can see, the side tabs are still not routed.
Oh, don't mind the scuffs and small blemishes in the case as I had only one box to work with and I had to cut the box by hand.






Relay Box
The override switches and little indicator LEDs was something I made it to my own box, but it is really labor intensive and might not be available in the final purchase version. You would still be able to do it yourself, as the pads are all the for you to wire it.
The sides of the box will have the Meanwell driver. I'll post the picture of the box with the driver next week.




Everything together


That's it for today guys.
Please let me know what you think and also if you are interested on my beta test program.

Thanks,
RI
PIPS
First of all I have no idea how all of this works.
But from the pictures that have been presented infront of me, I can say that I like this thread !!
B16Drag
SIGN ME UP! Holy crap!

I can't believe all of these bigger companies can't put all their marbles together and just build one like this!!!!

****SIGNS UP FOR BETA TESTER STATUS!****
lukeluke
hello, this is a beautiful project !!!!

what was the probe for salinity and PH ?

THANKS
gregzbobo
hehe, love the Dual Shock analog stick you are using to program it with.
Jake42393
this is amazing!
Sign me up for beta please:)
lotekfish
Unbelievably clean and professional job! I'm building my own arduino-based controller and I know there is no way it's going to look that good. You definitely need to find a way to share this with others and make some money for your efforts. Heck, my controller is almost done and I'd consider buying one of yours.

I have a question- did you consider using a round DIN connector for the cable? I just ordered some 8 pin DINs to try out. I know they aren't as secure as the D connector you are using since they don't screw in, but they are much smaller in size.
AdrianBryce
pm sent
newhobby
Hi, That probe is for PH only. No salinity will be included in this release.
I do plan in the future to include it if the interest is there.

RI
QUOTE (lukeluke @ Dec 29 2009, 01:30 AM) *
hello, this is a beautiful project !!!!

what was the probe for salinity and PH ?

THANKS

AdrianBryce
it would be awesome to see PH, salinity, and temp! I hope the comes to pass!
newhobby
I can't find any supplier for ATMega328P microcontroller chip now. sad.gif
Mouser and Digikey have 0 stock and a 16 week lead time.
If anyone knows any other supplier, please let me know. smile.gif

Thanks,
RI
gregzbobo
QUOTE (newhobby @ Dec 30 2009, 04:20 PM) *
I can't find any supplier for ATMega328P microcontroller chip now. sad.gif
Mouser and Digikey have 0 stock and a 16 week lead time.
If anyone knows any other supplier, please let me know. smile.gif

Thanks,
RI


found http://evilmadscience.com/partsmenu/145-atmega328p
and: http://store.gravitech.us/atwiar.html
also: http://www.moderndevice.com/products/ardui...atmega328-chips

Not certain if that's the precise chip, and those sites don't seem to have any type of live inventory tracker, so not sure if in stock or not.

Saw on one site that stated backordered till January '10, another said 9 week manufacturer lead time, so the 16 weeks could be a highly pessimistic estimate.
newhobby
Thanks for the effort greg, but the chip is not the one I need.
It is the same model, but I'm using SMD components, so the package is different.
I still couldn't find any source, but I'll keep trying.

Thanks.
RI

QUOTE (gregzbobo @ Dec 30 2009, 11:00 PM) *
found http://evilmadscience.com/partsmenu/145-atmega328p
and: http://store.gravitech.us/atwiar.html
also: http://www.moderndevice.com/products/ardui...atmega328-chips

Not certain if that's the precise chip, and those sites don't seem to have any type of live inventory tracker, so not sure if in stock or not.

Saw on one site that stated backordered till January '10, another said 9 week manufacturer lead time, so the 16 weeks could be a highly pessimistic estimate.

pschmitz
Hello Roberto,


I was wondering if you could give me some details about your relay box and its interface. I am designing a simple controller and am in the dark as to what Im going to do about power! I would like to keep things as simple as possible, but really like the idea of a manual on/auto/off option for the various equipments. If you could explain the relay box in more detail Im sure Im not the only person here who would be grateful.

I will also send a PM just in case. smile.gif

Thank you,
Peter
newhobby
QUOTE (pschmitz @ Jan 3 2010, 12:15 PM) *
Hello Roberto,


I was wondering if you could give me some details about your relay box and its interface. I am designing a simple controller and am in the dark as to what Im going to do about power! I would like to keep things as simple as possible, but really like the idea of a manual on/auto/off option for the various equipments. If you could explain the relay box in more detail Im sure Im not the only person here who would be grateful.

I will also send a PM just in case. smile.gif

Thank you,
Peter


Hi Peter,

I'll get back to you on that. I need some time to compile the pictures and drawings.
Roberto.

Hi Guys,

I got the relay box finished today.
I added the LED driver to it.
Here are some pictures.

Roberto.





newhobby
QUOTE (pschmitz @ Jan 3 2010, 12:15 PM) *
Hello Roberto,


I was wondering if you could give me some details about your relay box and its interface. I am designing a simple controller and am in the dark as to what Im going to do about power! I would like to keep things as simple as possible, but really like the idea of a manual on/auto/off option for the various equipments. If you could explain the relay box in more detail Im sure Im not the only person here who would be grateful.

I will also send a PM just in case. smile.gif

Thank you,
Peter


Hi Peter,

There are many ways of doing what you are trying to do.
In my opinion, the simplest way is this:

You have to use an ON-OFF-ON switch. What that does is connects the center pin to either the top pin, bottom pin or none at all.
So, position 1would always be on, center would always be off and bottom would be auto.
You can use a pull-down resitor to keep it low if you would like when you put the switch on the center position. I didn't find it necessary.
The chip is ULN2803. It's a relay driver capable of draiwing the 80mA required to activate the solenoid. You get 8 channels in each chip.
You can also do it with a simple transistor, but just make sure you add a recirculating diode to draw the current when you switch the relay on and off, otherwise it can backfire on you and send it straight to the arduino pin.
I hope this helps ya.

RI
newhobby
Hi Everyone,

I have complete my comparison on my LED driver and the meanwell and I'm actually very impressed with the way my own driver handled the job.
Advantages:
- Can run at 300mA up to 1200mA
- 5VDC to 48VDC Input voltage to accomodate many numbers of LED string from 1 to 12
- It DOES NOT flash when power is cut off.
- Full 100% dimming capability, from 0 to 100%, which makes dawn and dusk much more pleasant and accurate.
- Very cheap
Disadvantages:
- You need to supply DC power to it.

I may be adding it to the Relay Box.... Let's see... biggrin.gif

RI
Marian
QUOTE (newhobby @ Jan 5 2010, 09:00 PM) *
Hi Peter,

There are many ways of doing what you are trying to do.
In my opinion, the simplest way is this:

You have to use an ON-OFF-ON switch. What that does is connects the center pin to either the top pin, bottom pin or none at all.
So, position 1would always be on, center would always be off and bottom would be auto.
You can use a pull-down resitor to keep it low if you would like when you put the switch on the center position. I didn't find it necessary.
The chip is ULN2803. It's a relay driver capable of draiwing the 80mA required to activate the solenoid. You get 8 channels in each chip.
You can also do it with a simple transistor, but just make sure you add a recirculating diode to draw the current when you switch the relay on and off, otherwise it can backfire on you and send it straight to the arduino pin.
I hope this helps ya.

RI




... schematic is OK if you are using mechanical relays. If you are using SSRs you don't need a transistor to command them. Arduino output (digital pins) is more than capable to do it. As far as On/Off switch you can modify the keyboard header file and select key or combination of keys that are gone turn HIGH or LOW an Arduino pin (too much work for adding a switch on the power pack).

Nice and clean work though. Congratulations !

my two cents,
Marian
Pages: 1, 2, 3, 4

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Copyright © 2001-2012 Nano-Reef.com | Invision Power Board © 2001-2012 Invision Power Services, Inc.