ADC Values for ATtiny85

Discussion in 'The Projects Forum' started by jerseyguy1996, May 15, 2011.

  1. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    Hello,

    With BBQ season coming up I thought I would take a crack at a temperature regulator for my BBQ smoker. I have seen online that some individuals have attached a servo to the damper and use a microcontroller and a PID control loop to maintain a constant temperature in the smoker box. I am very novice, having built only a few circuits in my life and would like some guidance on the appropriate way to measure the temperature with the ADC on an AVR microprocessor. I have drawn up a simple circuit using a voltage divider consisting of a thermistor and a 10K 1% resistor to present a voltage to the ADC pin for measuring. I have put together a spreadsheet that shows what the ADC should be outputting based on the temperature of the thermistor. I would be greatly appreciative if someone could take a look at the work to see if I am on the right track or if I am missing something important. The files are attached below and the datasheet for the thermistor is here:

    http://www.specsensors.com/pdfs/ntc_radial_glass.pdf

    I'm using the G_1396 thermistor.

    This will be my first circuit design so any additional help (i.e. where to put all of the capacitors that I always see between everything and ground as I still regard the sizing and placement of those as voodoo) would be appreciated.
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    From your diagram I sense that you are still in the early stages of this project. If that is indeed the case then I have a suggestion that I think will vastly simplify your project.

    I don't know what your experience level is for micrcontroller hardware design nor do I know what programming skills you may possess. That said, I would suggest you take a look at the Arduino Uno board such as the one shown here. The ability of this board to take you from the drawing board to a completed and functioning project is impressive.

    Not only is the hardware ready to use but the software needed to develop your program is free. Add to that the fact that there are tremendous number of already available libraries including one to get you operating using a PID algorithm waitng for you to exploit.

    hgmjr
     
  3. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    I actually have that board (well the freeduino version of it that I bought off of ebay many years ago). I considered using that but I really wanted to use this as a chance to design my own circuit and then design and etch my own pcb. I am also hoping to use this as an opportunity to brush up on my C code versus the arduino version of C. In the end I may just use the arduino board but I was hoping to use this project to actually learn a bit of EE.

    And yes this is definitely the early stages of the project. I just thought about doing it this morning :)
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Nothing wrong with taking on the project for all the reasons you have indicated. AVR is a good choice since you have access to the free AVRSTUDIO4 software development IDE. However, the ATTINY85 may not have sufficient program memory to code the PID algorithm in C.

    Coding a PID is not to be undertaken lightly.

    hgmjr
     
  5. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    I'm thinking I would probably write the code before buying the microcontroller but even if I run out of space it was a $1.50 for the chip so no big loss. I picked that one because I really wanted to try to use an 8 pin package and I needed two timers (one for the PID algorithm and one for the PWM to signal the servo) as well as 10 bit ADC.
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Sounds like you have a solid plan.

    Be sure to keep us in the loop as you go through the project design. We are here to assist where we can.

    hgmjr
     
    jerseyguy1996 likes this.
  7. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    Thanks! I am guessing I will be posting lots of questions before I am done.
     
Loading...