Maker Pro
Maker Pro

Pic interface with sensor

Harald Kapp

Moderator
Moderator
Yes, there is a size restriction, unfortunately I do not know what the limit is. Try a resized, smaller version of your image.
 
Last edited:

hevans1944

Hop - AC8NS
I am waiting for information from Nissha FIS at the moment too.
Waiting doesn't get anything accomplished. You have to be proactive. Did you read the Electronics magazine article that @Bluejets linked to? Did you try to find and read any of the references cited at the end of the article? Have you defined your range and resolution measurement requirements yet? What are they?

Other than you posting a datasheet, I haven't seen any effort on your part, Raj. Do please tell us what problem this particular sensor is supposed to help solve, and why you have chosen it as a possible solution to that problem. We need a dialog here, not terse comments conveying little or no new information, for a successful outcome to your project... whatever that might be. You haven't described your project yet. Now would be a good time to do that while you are waiting on a response from Nissha FIS.
 
The project is part of my PGC project. I am trying to design a gas alarm.
I only chose this device because a friend of mine has a gas alarm, which he kindly took apart and let me look inside. I wont mention which company it is though.
It uses a PIC and a DC-DC converter (I presume in buck mode) to supply power to the sensor.
I will also look at the links sent to me.
I hope that answers your some questions.
Thanks for all your help so far.
 

hevans1944

Hop - AC8NS
Thanks for all your help so far.
Your reply raises more questions than it answers, and it answers NONE of the questions I have asked. Based on the lack of any informed response from you, I don't see how anyone here has provided you with any help.

You say you are trying to design a gas alarm as part of your PGC project. What is a PGC project? Is this a school project? What does the acronym "PGC" mean? What gas do you want to detect? What is the minimum concentration of this gas that must be detected? What other gas, if present, could interfere with detection of the target gas, and how would you account for this? What are the consequences of "false negatives," the acceptance of null results when in fact gas concentration exceeds alarm levels?

To detect a gas you must measure its concentration, typically in parts-per-million, over a specific range of anticipated concentrations. What is this range of anticipated concentrations, and how many parts-per-million detection resolution do you need? The answers to these two questions, which you have so far not provided, are absolutely critical to enable a successful gas detector alarm design.

You mention you have already seen some of the components inside a commercial gas alarm, but you refuse to identify the manufacturer or the model of the device your friend allowed you to examine. Why is that? Are you violating some law if you were to tell us who made the gas alarm and what model it is?

The DC-to-DC converter, if indeed present, may or may not have anything to do with providing pulsed VH or pulsed VC power to the sensor. VH especially needs to be a small and regulated voltage pulse to avoid damaging the platinum heater element. You will need more than a DC-to-DC converter to achieve that. And what specific model PIC did you see during your examination? I hope you took plenty of high-resolution and in-focus pictures of the commercial gas alarm.

Knowing the specifications of a working commercial product would go a long way toward defining specifications for something you might be able to build. I doubt that you would be able to "reverse engineer" the commercial version. The code downloaded into the PIC has most likely been "locked" to prevent theft of that intellectual property. Some manufacturers even grind off the part identification numbers embossed on the surface of the PICs and other ICs to prevent reverse engineering of the circuitry. The fact that the gas alarm device is no longer in your possession for examination limits any possibility of duplication, even if you had the skills to do so.
 
Sorry, PGC is post graduate certificate. I want to be able to measure natural gas.
Not sure about ppm levels. Need to do some more reading.
My main concern at the moment is how to generate the 0.65Vdc pulse for 0.1ms.
Could i achieve this by generating a 0.65V dc supply via a adjustable voltage regulator. This will be the supply to a LOAD resistor for a n channel FET. The FET will be a logic level, so can ve controlled by the PIC. Pulsing the I/O line will pulse the FET on, hopefully giving a pylsed 0.65V supply. The source of the FET will be to GND. Gate fed to the PIC I/O line.
Could i do something similar with the pylsed 3V3 line?
I will upload a schematic.
 

hevans1944

Hop - AC8NS
A schematic would be good.

Are you "hoping" to somehow take the 0.65 V DC pulse from the drain of the FET? Is the drain connected, through an unspecified resistor, to the positive DC output of an adjustable voltage regulator, nominally set to produce 0.65 V DC? If so, there will be zero output voltage at the drain when the FET is ON and conducting to the grounded source.

If a regulated voltage of 0.65 V DC is applied through the unspecified resistor to the drain when the FET is OFF, and there is no conduction to the source, this voltage divides unfavorably between the drain resistor and the heater resistance. For example, if the drain resistor were half the value of the heater resistance, the 0.65 V DC would be only 0.325 V DC at the heater terminals.

I thought you needed to provide a voltage-regulated, low-impedance, 0.65 V DC pulse to the heater. Or have I visualized your circuit incorrectly? That is why we use schematic diagrams to discuss circuits here.
 

hevans1944

Hop - AC8NS
I do like the idea of an adjustable, low-voltage-regulated supply, with its output to the heater somehow controlled by an FET (MOSFET, really) without losing the voltage regulation. There should be a way to do this; you just need to find it. Meanwhile, I will try my luck with Google to see what I can find. The voltage applied to the heater probably needs to be inside a feedback loop that controls the output of the voltage regulator, perhaps with some convenient means to disable the voltage regulator when no output is needed. If a solution can be found, it will apply equally well to the measuring voltage as well as the heater voltage.

Continue with your research! Next thing to do is to find out what a dangerous concentration of natural gas is. There are two kinds of danger: danger from an explosive mixture being ignited, and danger of suffocation by the displacement of oxygen from the air. There should be some information available regarding when (and how) to detect and protect people and equipment from both dangers.
 
Is there anyway I can charge a capacitor through a diode (diode giving a voltage drop of 0.6 to 0.7V). Then discharge via a pulse operated from a MOSFET?
I do not know how to design this. Can anyone help?
 

hevans1944

Hop - AC8NS
@Rajinder: With almost no effort, I found this DC-to-DC buck converter with a wide range of adjustable output voltages. You might want to pick up a couple to "play" with. DigiKey will sell you two for about $17.00. Here is a link to a page where you can view or download the datasheet for the OKR-T/6-W12-C.

The thing I noticed about it is the ability to turn the output on and off using a logic-level input for control. You still need a MOSFET switch circuit to control the output pulse width because I don't think it turns on fast enough. I couldn't find a spec on how fast it turns off, but the fact that you can turn it on and off provides some lee-way in the pulsed output circuit design. I am looking at p-channel MOSFETs as a possible high-side switch, but an n-channel MOSFET with the appropriate integrated circuit driver might be a better route to take. I have no experience in this area yet, so I will need to purchase some p-channel MOSFETs to experiment. Since this is your post-graduate certificate project, I suggest you set up a small work area and do the same. I may lose interest if I don't see any effort on your part.
 

hevans1944

Hop - AC8NS
I do not know how to design this. Can anyone help?
Why would you choose a project requiring design skills that you haven't developed yet? There are plenty of off-the-shelf commercial gas sensors available. How are you advancing the state of the art by trying to re-invent this particular wheel? Does someone hand out Post Graduate Certificates like jelly beans, without any demonstration of work or competence? Or is this a team project, where EP members are supposed to carry the load while you receive the glory? What is your part in this project?
 
It is a team of 3. One hardware, firmware and mechanical.
I am doing hardware.
The PIC interface is ok. Analogue electronics is a bit weak :(
Hence asking for some help.
I will do some simulations in Simetrix on the pulse generation tomorrow. I will let you know how i get on.
 

hevans1944

Hop - AC8NS
It is a team of 3. One hardware, firmware and mechanical.
I am doing hardware.
The PIC interface is ok. Analogue electronics is a bit weak :(
Hence asking for some help.
I will do some simulations in Simetrix on the pulse generation tomorrow. I will let you know how i get on.
Whew! It is nice to know that you DO have some help. This would be quite a project for a production team of, say, six or seven experienced members, to include marketing and sales people who would decide how to place the end product for maximum return on investment. School is different. Most post-grads I have worked with are content with doing just enough hardware/software to demonstrate feasibility and proof-of-concept, sometimes only breadboarding a concept and then writing a paper about it. Very few have gone on to produce anything remotely useful, other than the Masters or PhD degree they are awarded for their efforts. Those who do put forth the extra effort are often rewarded with nice jobs and a boost in their career, but it has to be in a area that someone wants and is willing to pay a little extra to obtain. Not too sure that applies to gas sensors, but PIC programming skills and knowledge of analog electronics is valuable.

Remember what I said about choosing to use a very high resolution analog-to-digital converter, typically a sigma-delta converter, with enough dynamic range to encompass your entire raw data signal. If you digitize and convert the raw data to floating-point arithmetic, you can do ALL your offset and scaling functions in software and not have to worry about analog electronics... except for best construction techniques to avoid introducing noise into your data.

Sounds like you are well on your way to getting this successfully finished.
 
Hi,
I have tried doing some simulations in SIMetrix. (see attached)
The PMOS switches when VGS < Vgs(threshold). For the IRF9530, it begins to turn on at -2V. So Q3 is off since, Vgs = 0. (Gate is 5V, and Source is 5V).
When the transistor Q2 is switched on (with a pulse), we get -5V- source at 5V and gate at 0V, hence this switches Q3 on.

I used a TL072 as a dummy load.
The red trace is at input to R3 i.e. 3V pulse
The green trace is at the drain of Q3.
Note; This is with a 5V supply.
Why is the green trace not going to 0V?

I will try the voltage at V1 to 0.65V, however I do not think it will work.

Can anyone help?
 

Attachments

  • simulation.gif
    simulation.gif
    179.1 KB · Views: 7

Harald Kapp

Moderator
Moderator
I used a TL072 as a dummy load.
Probably not a good idea. One never knows how a complex model behaves if it is not operated under correct conditions (i.e. without powre supply). This kind of model often includes internal sources which may lead to the observed effects.
Replace the OpAmp by a resistor. The resistor value should be such that at nominal operating voltage (drain of Q3) the current though the load is equivalent to the nominal current of the sensor (which you are modeling by the resistor).
 
Hi all,
I have a common set of electronics, basically a PIC and drive circuitry (pulse drive) to test a sensor. The output of the sensor is fed back into the PIC A/D.

The project has evolved and now requires me to test 5 sensors. Obviously i do not want to repeat the drive circuitry 5 times, as it is common.
I think the best way to achieve this will be through a multiplexer. Driving one sensor, waiting for a time, then driving another sensor etc.
My question is how do i gate the common circuit pulse through the multiplexer so it goes to the different sensors?

Thanks in advance
 

davenn

Moderator
I have a common set of electronics, basically a PIC and drive circuitry (pulse drive) to test a sensor. The output of the sensor is fed back into the PIC A/D.

So why not upgrade to a PIC with multiple inputs ?

The Microchip PIC30F3014 used in my digital seismograph ( earthquake recorder) has 8 inputs, currently Im using 6 inputs
form different types of seismic sensors
 
Top