Hi all:
I have a circuit that uses two gas sensors and I want to be able to
operate the sensor heaters with two options, a constant voltage and
a PWM voltage. So I use a switch that when it is on, the heater is at
5V and when it is off, the heater uses a square wave. Both sensors have
the same circuit but driven independently. The circuit pictures are enclosed
and the four possibilities of the response of the two sensors for the heater
truth table are shown in the Modulation.jpg file. Red is for sensor 2 and
blue is for sensor 1.
I know that PWM causes noise but this seems more like a coupling effect
that ties both circuits together. Am I missing something here? Do I need
to add a capacitor somewhere? I tried filtering the PWM signals but it didn't
change anything. Any help will be appreciated. Thanks,
Jose



Images:



Can you please repost the images, especially the circuits, in a readable resolution?
Thanks for your reply but if I re-scale them I won't be able to
attach them, it would exceed the total limit of 2MB.
this seems more like a coupling effect
that ties both circuits together. Am I missing something here?
Yes, neither the USB port, nor the Arduino 5V output are designed to power high current loads, like motors and heaters.
Use a separate heater power supply and connect the grounds.
Each sensor draws 160mA, so 320mA total. That's close to the 500mA maximum, but still under.
I can change that but that will it remove the Pwm coupling?
Your circuits do not show any filtering. I'd recommend you use a simple rc filter to reduce the pwm signal at A0, A1. Typically a 10k resistor and a suitable value cap.
You dont show the pwm frequency but basically you need a time constant that is long compared to the pwm, and short compared to the desired signal.
The frequencies are fairly similar - perhaps you could also increase the pwm rate.
There's a bit about pwm and filtering and changing rate on my page here.
ramos321:
Thanks for your reply but if I re-scale them I won't be able to
attach them, it would exceed the total limit of 2MB.
Then it might be necessary to add the images in separate posts (or as however many posts are needed) in order to convey the details properly in those images.
If after you post images, and if you yourself aren't able to make anything out of those images (obtained from this thread alone), then a reasonable question to ask oneself is ...... how is anybody else going to make anything out of them?
ramos321:
I have a circuit that uses two gas sensors and I want to be able to
operate the sensor heaters with two options, a constant voltage and
a PWM voltage.
Why? Those sensors are supposed to work with a certain heating power, messing with that may mess up the measurements themselves.
Just wondering, would it make sense to place an inductor & flyback diode (a fast one - Schottky or 1N4148 comes to mind) in between the heating element and the MOSFET? That should help smoothing out the current flowing through the heater.
If you use a separate heater power supply, the PWM coupling will be gone.
But, assuming your sensors are from the MQ series, there is no point in using PWM on the heaters.
Thanks to al who have replied. I had done some filtering on the PWM but that didn't help. Also, there is a
flyback diode on the mosfets. Today I created three separate grounds, one for the Arduino and one each for
the sensor circuits and the coupling disappeared. However, I still have some other issues, but I'm making progress.
Sounds like you are doing just about everything wrong.
Do let us know if this thing ever works.