LM35 and Heating Bed - power supply

Thread Starter

swmitchell

Joined Nov 14, 2013
18
Hi everyone,

Picked here because I think I have a power supply problem. (apologies if I guessed wrong).
I have an ATMEL avr 328pa chip and a lm35 temperature, a irfz44n and a 10ohm resistor (for heat).

My problem is that my lm35 analog signal changes as I turn on / off my heater. it jumps up and down by about 1V as that transistor ticks on and off.

The 1 power supply (5v) supplies power for everything. it's a little switch mode power supply (10W max it says).
I get the same problem if I only have the lm35 and the resistor on the same 5v power rail.

Of course I'll do a circuit if you like, but I think it's simple enough you get the idea.

If some could shoot the breeze I'd really appreciate it. I'm a tad stumped.
 

DickCappels

Joined Aug 21, 2008
10,661
Firmware wise, you can inhibit reading the ADC for a set amount of time after the transistor is switched, you can add a low pass filter to the ADC input, you can have the ADC routine average multiple samples.

Hardware wise, in addition to Raymond Genovese's advice about the bypass capacitor in post #2, consider adding a choke in series between the +5V power supply and the bypass capacitors.

Sometimes noise gets transferred from the working circuit up to the controller via the output port. What does your heater control circuit look like?
 

Dodgydave

Joined Jun 22, 2012
11,395
If you can post a circuit, i would put a diode in series with the lm35 supply pin and a 100uF capacitor across it's supply, that way when your heater kicks in the lm35 supply wont get a dip.
 

Thread Starter

swmitchell

Joined Nov 14, 2013
18
Gday' everyone,

Thanks for your responses! I'm a bit of a dunce, so I'm posting my circuit... and the purposed additions (I have not done them yet but will in coming hours) please correct me if I have the idea wrong - I'd really appreciate it. (and perhaps someone in the future will reference this problem)

I have a small extra bit of news. If I remove my heating resistor and use say boiling water I get the same output false readings... my theory is that the inductive coil of the heater (it's an inductive stove) interferes with the lm35. I wonder if the ceramic resistor has a wire coil inside that is giving a similar 'thing' to the induction stove<- knowledge vacuum in this space for clear communication. I guess it would be RF interference?! Could this be a thing?

I'll try the purposed additions and see if this stabilizes my readings and let you all know soon.

Thanks again.
 

Attachments

GopherT

Joined Nov 23, 2012
8,009
Gday' everyone,

Thanks for your responses! I'm a bit of a dunce, so I'm posting my circuit... and the purposed additions (I have not done them yet but will in coming hours) please correct me if I have the idea wrong - I'd really appreciate it. (and perhaps someone in the future will reference this problem)

I have a small extra bit of news. If I remove my heating resistor and use say boiling water I get the same output false readings... my theory is that the inductive coil of the heater (it's an inductive stove) interferes with the lm35. I wonder if the ceramic resistor has a wire coil inside that is giving a similar 'thing' to the induction stove<- knowledge vacuum in this space for clear communication. I guess it would be RF interference?! Could this be a thing?und

I'll try the purposed additions and see if this stabilizes my readings and let you all know soon.

Thanks again.

Move the Darlington transistor down to the ground and the 10 ohm resistor between the +5 V and the transistor. The 5V out of the microcontroller would (in your current format) be dropped by 1.2 v base to emitter (Darlington). and 10 ohm resistor will see only 3.8 v at most.
 

philba

Joined Aug 17, 2017
959
I've used that sensor in several projects. It's not the best around and tends to pick up a lot of noise. The datasheet recommends shielded cabling and a bias resistor, iirc, for long runs. I'd go there first before doing anything else. After that, I'd use some sort of FIR filter in software.
 

Thread Starter

swmitchell

Joined Nov 14, 2013
18
Move the Darlington transistor down to the ground and the 10 ohm resistor between the +5 V and the transistor. The 5V out of the microcontroller would (in your current format) be dropped by 1.2 v base to emitter (Darlington). and 10 ohm resistor will see only 3.8 v at most.

I think this is the problem! I think this is turning into a sort of voltage divider!... I'm off to do some testing. (update soon)

I added a complementary filter in software which 'kinda' delt with the noise.
 

Thread Starter

swmitchell

Joined Nov 14, 2013
18
Gday' again,

Big thanks to everyone. This has turned into a nice learning project for me.a
This is much more stable now. I have made a few changes. ALL the suggestions have improved the stability of this.
<correction... 10 samples per sec... not 1 sample a sec>

I thought I might share my changes. BTW, I changed that tip... to a IRFZ44N (magic smoke escape happened)

"Paint me thankful for everyone's help".

it works.jpg
 
Top