MQ131 and MQ7 control by PIC

Thread Starter

Nik@

Joined Apr 1, 2021
29
Hi all
i am enclosing a pdf with the schematics for my questions. The drawing is about to control the 2 sensors with a PIC. I am not sure if my electronics disign is the proper one. What is incuded there:
A power supply (LM317T) with 2 outputs of 5v and 1.4v (which applied when the RD5 goes high, for MQ7). The sensors and the 2n3906 which controlling the sensors separately.
what i try to achieve: I monitor the air quality. This drawing is a part of bigger project and because of that i don't want to have the PIC microcontroller on power all time. So i decide to turn off the sensors as other modules also and activate when i want to get a measurement few times during the day.
My questions as follows:
1.If this is going to work at all.
2.If the 2n3906 schematic is correct and mostly if the base resistor is calculated correct(Not including calculations to be easy)?
3.The 2n3906 needs a pullup resistor to +5v?
4.Any suggestion for a better way to do it or improve the existing.
For convinience from 2n3906 datasheet the sensors each one pulls 100mA,power supply to them is 5v,hfe 30 and Vbe(sat)min 0.65 to 0.95 @50mA.

thanks
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,565
The circuit looks a lot like the classic "Figaro" brand of gas sensors.That part is sort of OK. But rather than use transistotor switches for the sensor heater current, I suggest relays to switch the sensor power on and off.
 

Thread Starter

Nik@

Joined Apr 1, 2021
29
The circuit looks a lot like the classic "Figaro" brand of gas sensors.That part is sort of OK. But rather than use transistotor switches for the sensor heater current, I suggest relays to switch the sensor power on and off.
Thank you for the suggestion. If i use relay am i going to drive it with a transistor? Or i can controle it direct from the pin?
 

MisterBill2

Joined Jan 23, 2018
27,565
What you need to drive the relay depends on the specification of the control signal. If it is a common 24 VAC HVAC control signal, just a relay. If it is a digital logic output, then possibly you would need a transistor. The I/O specification will reveal that. It esily could be either one.
 

boostbuck

Joined Oct 5, 2017
1,043
Generally a PIC has an output in the range of 20mA or so, which is insufficient to drive an electromechanical relay, so a transistor is required as a buffer.
 

Thread Starter

Nik@

Joined Apr 1, 2021
29
Generally a PIC has an output in the range of 20mA or so, which is insufficient to drive an electromechanical relay, so a transistor is required as a buffer.
Hi
How about using a MOSFET as switch driven by a transistor. I have here an irf840. Would be a good idea.
 

boostbuck

Joined Oct 5, 2017
1,043
You should use a MOSFET with a more compatible Vgs. IRF840 is in the order of 10V, so to drive THAT from a PIC you would need a buffer, I think.
 
Top