|
||||||||||||||||
|
||||||||||||||||
|
|
#1 |
|
Algae Grower
|
Micro-controller project
I've been lurking on here for a long time now so i figured it's about time to post something
I have started working on a micro-controller project to manage/monitor my newest tank, a Fluval Edge. Architecture The idea is to have a modular system so that it can be "easily" modified and extended when i want to add functionality. Controller Atmel AVR running atomthreads, prototyping using ATMEGA1284p RTC will be handled using a DS1307 RS-485 IC to talk to sensors and other peripherals RS-232/USB/Bluetooth etc for status updates and to transfer logs to the computer LCD and a joystick will be the interface at the tank. Maybe a piezo electric speaker for audible feedback (over temp alarm, etc.) Sensor Atmel AVR, probably some flavor of ATtiny, all it needs to do is take commands over the RS-485 bus, collect sensor data and reply to the controller when queried. Sensor, probably just using the ADC to get readings RS-485 IC to talk to the controller Actor Atmel AVR, probably some flavor of ATtiny, all it needs to do is take commands over the RS-485 bus, trigger relays/change lighting/etc. and reply to the controller when queried. RS-485 IC to talk to the controller Scheduling As for the scheduling i'm starting out with the same schedule for each day of the week, later on i may add a real schedule or at least for each day of the week to have its own list of actions where the actions are things like: Turn CO2 relay on Fade lighting to a specified RGB value over a specified time etc. Current status FreeRTOS has been replaced with atomthreads and is running fine. The serial i/o is working fine, the LCD is also up and running with a menu system. Last edited by ullbergm; 07-20-2010 at 01:18 AM.. |
|
|
|
| Sponsored Links | |||
Advertisement | |||
|
|
#2 | |||||||
|
Algae Grower
|
Change Log
2010-07-19 Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Last edited by ullbergm; 07-20-2010 at 01:16 AM.. Reason: Updated changelog |
|||||||
|
|
|
|
|
#3 |
|
Planted Tank Enthusiast
|
sound like a great project
very interested to see how this turns out |
|
|
|
|
|
#4 |
|
Planted Tank Obsessed
|
Sounds fun, I would be interested in the cost comparision of this compared to a RKE or other preassembled units.
__________________
___My 120 Gallon___ EHEIM PIMP #407, 2x 2229, 2x 1250 Hobby Pumps, 1x Ecco 2236, and 1x Eheim Sludge Extractor
|
|
|
|
|
|
#5 |
|
Algae Grower
|
|
|
|
|
|
|
#6 | |
|
Algae Grower
|
Quote:
Hopefully i'll have some fun doing it and get something that does everything i want it to do |
|
|
|
|
|
|
#7 |
|
Algae Grower
|
I'll be interested in seeing how this turns out as well. I've always wanted to do something like this.
__________________
5.5G - Low-Tech Planted
20G - Nano Reef 55G - African Cichlids and Tons of Java Ferns 160G - Central/South American Cichlids |
|
|
|
|
|
#8 | |
|
Algae Grower
|
Quote:
RobotGuy http://www.plantedtank.net/forums/ta...cs-3-14-a.html and Mistergreen http://www.plantedtank.net/forums/di...ml#post1009586 Be sure to check those out if you haven't already
|
|
|
|
|
|
|
#9 |
|
Algae Grower
|
Currently working on running both FreeRTOS and FreeModbus for communication, looks like i'm going to have to upgrade to a chip with two 16-bit timers. I'll probably go with the biggest chip that is available in a DIP package so that i'm not hitting any walls while building this, i can always port it to something smaller in the end.
I have a atmega2560 that i'm using now but it is not available in a dip package so i'll probably pick up a atmega128 when it is available. http://search.digikey.com/scripts/Dk...EGA1284P-PU-ND |
|
|
|
|
|
#10 |
|
Planted Member
|
Let me know if you need anything for lighting controllers. PWM is my specialty
__________________
|
|
|
|
|
|
#11 |
|
Bow ties are cool
|
post pictures!
__________________
DIY High Tech Tank forum
http://aquatictechtank.net A forum dedicated to design and program aquatic tanks |
|
|
|
|
|
#12 |
|
Algae Grower
|
Not much to take pictures of yet....
I think I've decided to go with the ATmega1280, once it becomes available. Some of the reasons are that it has 4 timers, multiple USARTs and one of the timers is tweaked to be a real time clock (RTC). I'm ordering a 32.768KHz crystal for the RTC and various ATmegas / ATtinys for whatever i might need them for. Yes, i'm being lazy and 'outsourcing' as much as i can, RTOS, bus protocol, LED drivers, etc. Or at least that is the current plan since i can get some free sample ICs from the different manufacturers and they are pretty cheap (most of them are less than $1). The current task I'm working on is getting FreeRTOS running on the ATmega2560, which is basically the same chip as the ATmega1280 but with more flash. The unfortunate thing is that the 2560 has more than the 128k flash that FreeRTOS / GCC can address so some changes has to be made to FreeRTOS to get it to work. Luckily someone has already done the work, i just need to integrate their work into my toolchain. http://www.avrfreaks.net/index.php?n...wtopic&t=70387 After FreeRTOS and Freemodbus is working i'll be working on some of the other framework pieces, the scheduling framework, specs for the communication between components, etc. The reason i've postponed adding more components and moving the chip to a prototype board is that in the end i plan on using the 1280 but it wont be available for a couple of months. The silver lining is that i can get some of the mundane pieces done before i get the more fun and flashy stuff going, ie. less chance that i stop working on the project. (once you get the flashy stuff going you feel like you have overcome the hurdle and feel like moving on to new challenges. or atleast that is what i usually do...) |
|
|
|
|
|
#13 |
|
Algae Grower
|
Just as an FYI. You can order free sample parts from digikey, microchip, national instruments. They dont mind giving away a couple of pieces here and there, because if you invent something with their parts youre more likely to mass produce it with their parts. All you have to do is register on their websites prior to ordering.
I find that one of the most powerful and easiest to program chips is the PIC-18f4321. It has a decent amount of memory its got an adjustable internal clock, 32kHz secondary timer, high/low priority interrupt settings, decent flash space availalbe, 10 bit Analog/digital converter, fast serial connection, watchdog timer to help not waste power or get it stuck in long processes, and a great operating voltage range, and I cant remember if the I2C and serial use the same I/O pins or not.... I used the PIC18f4321 to control a self balancing robot. Ive wanted to do this for some time as well....Ive been looking for so decent peripheral sensors for cheap but Im not seeing too many out there. So let us know how it comes out! |
|
|
|
|
|
#14 | ||
|
Algae Grower
|
Quote:
Quote:
Flash (Kbytes): 128 EEPROM (Bytes): 4096 SRAM (Bytes): 8192 Max I/O Pins: 86 F.max (MHz): 16 Vcc (V): 1.8-5.5 10-bit A/D Channels: 16 Analog Comparator: Yes 16-bit Timers: 4 8-bit Timer: 2 Brown Out Detector: Yes Ext Interrupts: 32 Hardware Multiplier: Yes Interrupts: 57 ISP: Yes On Chip Oscillator: Yes PWM Channels: 16 RTC: Yes Self Program Memory: Yes SPI: 1+USART TWI: Yes UART: 4 Watchdog: Yes |
||
|
|
|
|
|
#15 |
|
Algae Grower
|
Yeah Ive been a defender of the microchip products since Ive taken a couple of classes at GaTech. Its their holy grail next to the Arduino (which I think is powerful but the programming interface confuses the be-jesus out of me).
My idea for senior design a few years ago was a fully automated tank, but my team shot me down. I wanted it to include: daytime/nightime light simulation with the lunar phases programmed in (use an LED array across the whole hood) temperature control co2 controller Auto dosing pH monitor (via sensor, also any other water parameter you can monitor via sensor) possibly a pushbutton chemical tester (a machine to extract tank water and add the testing chemicals automatically) web cam monitoring of the tank/ live feed of parameters remote/web control capabilities and auto feeder (not just flakes, but algea wafers too for my pleco) |
|
|
|
![]() |
| Tags |
| controller, lighting, schedule |
| Thread Tools | |
| Display Modes | |
|
|