I wanted to start making projects that i could actually use and not just take apart when I'm done with them. So i decided to buy some extra ATMega chips and an ISP shield for my arduino. I figured out how to burn the bootloader and program my new chips and was able to put them in my project. I started with just a simple binary thermometer that outputs the temperature value to five LED's. I first made my project using my arduino and then transferred it to a seperate ATMega. However, when I put the new chip into my project, I am now getting different analog values out of my thermistor than when i was when using my arduino as the brain. The values i am getting are not accurate so obviously this is a problem. Why might this happen and how could i fix it?
Do you have a multimeter?
Try applying a known voltage to see if you get the correct ADC value. You can use a potentiometer, or a voltage divider (2 resistors) if you don't have a pot handy.
For example, with a 5V supply and the default 5V reference, 2.5V into the analog input should read about 512.
If you don't know how to do that, take a look at the [u]Analog Read Serial Example[/u].
You can also try reading the voltage at the analog input (with your multimeter) to see if there's a difference.
DVDdoug:
Do you have a multimeter?Try applying a known voltage to see if you get the correct ADC value. You can use a potentiometer, or a voltage divider (2 resistors) if you don't have a pot handy.
For example, with a 5V supply and the default 5V reference, 2.5V into the analog input should read about 512.
If you don't know how to do that, take a look at the [u]Analog Read Serial Example[/u].
You can also try reading the voltage at the analog input (with your multimeter) to see if there's a difference.
I am using an L7805 voltage regulator with a 9V battery on my breadboard for my separate ATMega. I measured the output voltage of the regulator and found it is only supplying 4V. I'm assuming this is the problem. I searched the internet and tried to find a solution but everything I found just suggested that it was connected wrong. I have a 100uF capacitor between the input and ground rails, and a 10uF capacitor between the output and ground rails. What am I doing wrong? I also tried multiple regulators so there is nothing wrong with the IC.
Have you any 0.1uF ceramic capacitors across each large electrolytic?
Have you got them also across both Vcc pins on the processor? And another one on the Aref pin?
Did you measure the output of the 9 V battery under load? it might be dropping to 5 V or so.