Connect with us

New Project: "Universal Environmental Systems Controller"

Discussion in 'Microcontrollers, Programming and IoT' started by Blackandchrome, Aug 14, 2013.

Scroll to continue with content
  1. Blackandchrome


    Aug 13, 2013

    I am building what I have decided to call my "Universal Environmental Systems Controller" or "UESC" for short. Based around an XMega128A1 for no better reason than it is the most powerful Atmel AVR that I got in the auction lot of AVRs I bought (See "For Sale" section). As I have chips coming out of my ears sound advice is rewarded with further discounts and maybe even free stuff.

    The XMega128 Sports 78 I/O pins, 12 SPI, 16 ADC, 4 DAC, 24PWM, temp sensor and 8 Timers. It also happens to be the largest AVR I have used with the dip-28 Atmega168 via Arduino in a very distant second. Although I have used the Atmel AVRISP to burn bootloaders and programs to those chips in addition to through the Arduino Dev board. So I am hoping that other than configuring the ungodly amount of registers it will be similar.

    I am basically looking to design a board that can handle anything and then populate the components I need for each project and program it as I go. Something that can run everything from my 125gal Reef tank LED dimming and wave control system, to this fully automated charcoal smoker I'm building, even to data collection for the greenhouses my family owns. I'm even thinking onboard Xbee RX/TX for remote data collection and onboard SD for logging :cool:

    Anyway I will try to make the questions concise and in a format that can be simply answered. No need to get to elaborate, a short answer is better than none ;)

    1. The XMega Manual lists a "Real Time Counter" that uses a 32.768KHZ crystal and can be prescaled to 1Hz. It also lists a battery backup configuration for the counter. Can this be trusted for clockwork with decent accuracy or should I still look into implementing a temp compensating RTC with external battery backup?

    2. I would like the ability to use a large number of thermocouple probes but that's pretty expensive after you get an individual TC Amp IC(~$10) for each one. Can I use ultra low loss MOSFETs to switch which probe is attached to the thermocouple amp then software compensate for the Vdrop? Thermocouples would be for heating (meat and smoker temp) while greenhouse and aquariums would rely on more accurate IC temperature sensors.

  2. Solidus


    Jun 19, 2011
    1. Unless you need to put a satellite into orbit or measure relativistic quantities, the consumer-grade crystal and onboard RTC module will be of enough precision. Typically crystals range from 50-100ppm aging which is acceptable precision for all but the most intensive instrumentation.

    2. Yes, but if you want decent accuracy you will need to probably use a potentiometer or some adjustment method to calibrate it. Thermocouples are individual devices; usually they hold within each other but there is no reference temperature usually; that is, there isn't usually a set temperature where a set voltage exists. You will have to calibrate for that.

    Also, I suggest you check the datasheet, you don't have that many interface pins it doesn't look like - most are digital GP/IO only. It is also worth noting that both are the AVR8 architecture - they will have a similar number of registers, scaled slightly for amount of peripherals.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day