Дата на публикуване: Sep 22, 2010 2:35:4 PM
In the beginning the project was develop only around one main board responsible for :
Realtime clock - setup, display;
Generating realtime PWM software signal for light control;
Navigate in main menu for setup various parameters;
Controlling TECs, mist generator, additional light.
Taking reading from rotary encoder for navigation and setup;
Using I2C hardware to "talk" to the temperature sensors;
Calculating the current temperature which shoot be for the give hour;
Battery monitoring and charging control;
AD conversation for measuring the humidity.
The problem was, that I want to have 50 step PWM with frequency of 300Hz.So this makes 66uS between two interrupts for handling the PWM generation.This leads to "cutting" all software to small bits that have to be execute during this 66uS.
Second.For light control I need 5 PWM channels( Warm White, Cold White, Red, Green, Blue) .If the main mosfets are located at the main controller I have to put a lot of cables to link the cover to the PCB.
That's why I decided to make two controllers.One in the cover of the vivarium, responsible for generating 8 channel, 50 Step PWM and AD coversation connected to the main controller using I2C.
Main Controller
Slave Controler
Real time Clock
Temperature monitoring
Handle the inputs from the user
Control of the relays
Calculating desired temperature
Monitor battery voltage
Controlling main power supply
Master I2C
8CH, 50stps, 300Hz PWM
ADC
The system will work on battery ( 12V 7.2Ah) when all the PWM channels are below 25 and battery supply voltage is correct.
When at least one of the conditions aren't true the main controller will switch on the switching power supply and will charge the battery or will supply the TECs.TECs aren't supplied from the battery due to the high current load ( 7 Amps).
Slave controller PCB.There are 3 cables.The blue one is for the POWER connector +12V DC, TECs supply.The cables behind the mosfets are for the lighting and the RJ45 is for the +5V DC and I2C communication.
The main controller with the LCD and few relays.
Sensors PCBs that I made. Top ones are for the temperature (MCP 9803), lower ones are for the humidity sensor.At right the temperature sensors.First I thought that this digital temperature sensors will have slow response time, but actually they can detect my finger above them in less than 2 seconds :).