Noise interfering with readadc10

I have a problem with the readadc10 command giving me some wierd values on my 28X1.

The circuit, powered by 12V DC battery supply, is a AD595AQ (K Type Thermocouple Amp IC) connected to the 28X1 (with a RC filter on the amp output pin 9). The PICAXE code performs the readadc command on this "10mV per degC" voltage signal and displays the readc10 Word on an LCD.

Using a DVM, the output from the AD595 is a steady eg. 172.6mV (not seeming to fluctuate any more than +/-0.3mV). Reference / Supply Voltage is 5.04V (not fluctuating any more than +/-10mV) via an 7805 voltage reg.

When I run the readadc10 in a loop and display it's result every 200ms on the LCD it displays a rsult of anywhere between 26 & 36.

A voltage of 172.6mV should be getting a steady 35 (172.6mV / 5040mV * 1024). A range of between 26 & 35 would indicate that the voltage is ranging from ~128mV to ~173mV but my multimeter shows that it's a steady 172.6mV

Can noise in the circuit affect the readadc10 so much? What in the circuit should I be changing to get rid of thoise noise??

Circuit I'm using :


Edited by - mearcat on 23/08/2007 04:39:20

Edited by - mearcat on 23/08/2007 04:39:51


Senior Member
The first thing I suggest is to isolate where the error is occuring... look at the AD595 output with a scope and then look at the output of the PICAXE to LCD with various constant voltages in and so forth. Also are all your inputs [high impedance pins] on the PICAXE tied to V- or V+? Is your thermocouple definitely well connected to the AD595 etc... so many possible sources of error! Anyhow one stage at a time...
It is either noise on the ADC line or noise on the picaxe power supply. DMMs can give a false idea that a fluctuating signal is smooth. Try a huge low pass filter on the ADC input - eg 10k/470uF. If that works, then gradually lower the cap value. For the power supply it may need a few filter caps.
I only have a PC based scope but hooked that onto the power supply and AD595 output. I'm not 100% on how to use an oscilloscope but the fluctations in main power supply seem quite erractic but the AD595 output doesn't seem very stable either (heaps more stable than the main power supply though). Damn DMM's are great at displaying an average voltege I guess.

I already have some decoupling caps either side of the 7805. Should I change the values of these, or add more caps?

Do I tie all spare/unused input pins directly to GND? Or do I need a resistor bwteen the pin & GND?
One thought: Do you get the same range (%) of error if you use the ReadADC command? Ie lower resolution.

This may help you find the problem: I'm not suggesting it as a final solution.


Senior Member
One test you can make to see if your power supply is fluctuating.

<code><pre><font size=2 face='Courier'>main:
calibadc b1 &#8216; read the 0.6V adc reading (or calibadc10)
debug b1 &#8216; display current value
goto main &#8216; else loop back to start </font></pre></code>

If b1 is steady you should be ok.
So if I try that code using the calibadc command and the b1 values are steady, then that means the power supply is also steady and I should be loking at change component values in the RC filter on the AD595 output? If they are not steady, more work should be put into filtering noise from the power supply - correct?
&gt;you could always average the readings...
I have already tried that, but the calculated temperature on the LCD constantly flicks back &amp; forth +/-2 degrees - very annonying. It was the fact the numbees were jumping around that made me realise that there was a problem with noise.
Hi, my thoughts are:

You've got an AD595A outputing a fixed 10mV per degree, independent of it's supply voltage (effectively), feeding a picaxe ADC input whose calculated values DO depend on the supply. So the stability of your readings all rely on the stability of the output of the LM805.

Did you mean LM7805?? Well I can't find any details on LM805, but LM7805 shows output voltage tolerance of +/- 4% for the 'CT' range and +/-2% for the 'ACT' range. So this is really against you.

One possibility would be to drive the LCD off a separate regulator. It's probably giving a variable load to the one regulator at the moment that isn't helping.

Also, back to averages, I'd have thought a simple smoothing formula could help a lot, averaging the ReadADC10 value before it's fed into your display routine e.g something like:

NewAv = OldAv * 9 + NewSample / 10

(although you've got to watch for overflow)

Edited by - jeremy leach on 23/08/2007 08:08:50


Senior Member
On your schematic, I don't see a decoupling cap at the Picaxe power terminals. Try adding a tantalum cap as physically near the Picaxe power pins as possible.

Good luck!

Please don't take this the wrong but if your circuit layout is as bad as the way you have drawn the diagram, it could well account for the problems. Analog and digital don't mix very well at the best of times and poor layout will only make things worse.

I don't see decoupling capacitors for the PICAXE. Are the low value capacitors on the regulator physically close to it with leads as short as possible.

Why do you have inductors and all manner of capacitors fitted to the thermocouple?
Are expecting a very noisy environment?
Those components will add a very significant error to your readings unless VERY carefully executed. For example, have you used the correct wire type for each of the inductors. The material must be the same metal as the thermocouple or you will introduce extra thermocouple junctions.


Senior Member
<i>&quot;What value cap should I have at the PIACXE power terminal?&quot; </i>

The larger the better. I used to use 16 uF tantalums until I got a good deal on a bag of 68 uF tants. That's what I use now.

The important thing is to bypass the Picaxe with a low ESR cap, and tantalums do the job very well.

68uF is very nice. I got a job lot of 33uF tants and 0.1uF bluechips. I use both in parallel on every picaxe. I also have a 470uF 6V3 electrolytic on the output of the 7805 (or 78L05). There is usually 1000uF on the input of the regulator. Total overkill possibly but it works.

If that is still not enough, do the above and also a ?10 ohm between the main power supply and the 1000uF on the input of the reg - this acts as a low pass filter.

Edited by - Dr_Acula on 23/08/2007 11:47:20


Technical Support
Staff member
One way to eliminate PSU noise issue is to temporarily run the 7805 from a suitable 12V battery pack. If readings are still unstable, it has to be noise from the circuit induced on the rails or on the input itself.
Thanks to all replies so far :

Beaniebots - yes I get a lot of noise. The chokes &amp; caps etc between the TC &amp; AD595 are because I was getting a lot of ground loop noise in the original design. A friend of mine helped me out with solving that loop noise issue. The error introduced by them is actually quite minimal thankfully (Testing the AD595 output compared to a thermometer) I'm not formally trained in circuit design or such so I don't take offence at any comments. It's all about learning :)

I've got a few things to try out now. will give an update soon...
ok, i got a few questions , is that lcd backlit and is it on,and what kind of backlighting?

my suggestion with power is to take the power off for the lcd nice a close to the regulator before c3 when using adc's in any respect it's better to have the power tracks in a &quot;star&quot; like format
what would be better is to isolate the picaxe altogether with it's own regulator

the other thing is that it does say in the picaxe manual that the download cable can cause some variation in adc readings
Orginally, I was getting variations of up to 16 (out of 1024) from the readadc10 command.

I've just tried a few things :
1) I disconnected the LCD and serial LCD board = variation of 0
2) Reconnected the serial LCD board but no LCD = variation of 6
3) Soldered in a 100uF electro &amp; 0.1uf Monolithic (all that I had laying around) right to the PICAXE feet, and left serial LCD board connected and LCD disconnected = variation of 1
4) Reconnected LCD (everything back to normal) = variation of 5

Conclusion : It's the LCD (LED backlit) that causing the noise.

Next step : Try some other cap types (Tanatlum) &amp; values to try and reduce the variation and also supply the LCD with a separate voltage regulator.

Thanks heaps to everyone for the help so far :)

Edited by - mearcat on 23/08/2007 14:28:34
demonicpicaxeguy - I have tried tapping the power supply for the LCD from directly after the 7085 but it's makes no difference. I think a 100mA 78L05 for the PICAXE and a separate 1A 7805 for the LCD etc is the go :)
MearCat, you not get any &quot;ground loop&quot; noise on a thermocouple because it should not be connected to ground at all let alone in two places to generate loop noise.
Maybe this is the root of your problem.
The TC wires should be twisted together and the tip (junction) should be isolated from any metal contact. That will ensure that any electrical &quot;pickup&quot; will be the same in both wires and hence cancel out at the amplifier.
Rather than fit an inductor (of wrong metal type) in each line, simply loop the TC twisted pair several times through a ferrite doughnut type core. The caps won't hurt but I'd be surprised if they actually do much. If C5 and C6 are not closely matched, they might even make things worse!
R6/C8 are the key components and they look about the right sort of value which does suggest that noise is comming in via the power supply.
A point to note is that the PICAXE reference voltage for the ADC is the power supply. Hence, any loading, such as an LED turning on/off will have an effect on the ADC value as well as any noise caused by supply ripple and logic switching.
Mearcat mentioned he wasnt a 100% on using a CRO.

My father encouraged me to get one a while back, I can say it is the most helpfull bit of gear I own and I couldn't encourage anyone who doesnt have one to get one enough. I was a bit daunted by all the knobs and buttons at first but they're quite simple to use.

Anyone who dosent have a CRO, GET ONE.

I got mine, (20 meg dual trace) from Dick Smith, they had a review in Sil Chip on it and highly recommended it. I think it was 3 or 4 hundred bucks.

I'm battling with a GSM module, I can see the SIM card signals, clock data in and out etc. It's great. I'd be absolutely lost with the CRO. You are not in the race without one.

A good little exercise is to hook the CRO to the PWM out pin of the picaxe and then make various changes to PWM and see the square wave on the screen change.