Maker Pro
Maker Pro

Pic interface with sensor

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
I am using a PIC that has enough A/D channels but do not want to repeat the drive circuitry 5 times. Need to keep this common as i am restricted with PCB space.
 

Nanren888

Nov 8, 2015
622
Joined
Nov 8, 2015
Messages
622
What sort of sensor? What sort of drive? analogue? Digital? I2C? I2S?
That is, what do you want to multiplex?
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
I will do a block diagram. It is a gas sensor.
Drive is a pulse of 0.65V DC for 0.1ms. Then apply power and then read into A/D converter.
The pulse circuit is driven from PIC to gate a pmos FET, which is connected to 0.65V generated from a dcdc converter.
I need to drive 5 sensors, but the pulse circuit is common ti all. So i need to pulse each sensor after a delay.
Thanks for your help so far
Raj
 

Nanren888

Nov 8, 2015
622
Joined
Nov 8, 2015
Messages
622
Not quite sure what you mean by pulsing it, THEN applying power.
So, there's an analogue line (0 or 0.65volts) and a power line that you have to interrupt for some reason, then an analogue input back?
And you want to design a multiplexor that switches each of these lines?
Someone above suggested that you just get a bigger PIC. Sorry didn't really follow your response to that either.
So you have multiple ADC pins, so you don't have to multiplex the analogue back in, is that it?
That just leaves power (Maybe a FET switch each) and the 0 - 0.65 volt line for each sensor?
Fixed 0.65 volts? How accurate? Could that be another FET? Or analogue switch? What current are you wanting/expecting?
.
There's an experienced guy here who often explains to people that including full/enough information once is a good thing as people can provide the most help that way :)
 

davenn

Moderator
Sep 5, 2009
14,260
Joined
Sep 5, 2009
Messages
14,260
I am using a PIC that has enough A/D channels but do not want to repeat the drive circuitry 5 times.

what drive circuitry ?

Tis time you told us much more about your project so we all can help you better .... circuits would be a great start
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Sorry for the confusion.
Each sensor needs to be pulsed with 0.65V DC at time duration of 0.1ms (this is VHeater voltage). Then the supply VC is applied. After which the voltage out of the sensor is read back into an A/D channel of the PIC. This sequence is applied to each of the 5 sensors in turn.
Note: i have enough A/D channels on the PIC to read 5 chanbels, so this is not the issue.
To generate the pulse, i was thinking of using a LDO/DC-DC converter dropped down to 0.65V. A MOSFET p device connected to the 0.65V line. The gate to the PIC, so i pulse the gate and then get the required pulse out at 0.65V.

I am trying not to replicate the pulse circuit 5 times for each sensor. So how can i use one common circuit to drive the 5 sensors as above? I was thinking of a multiplexer.

Thanks in advance.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
I need to drive 5 sensors, but the pulse circuit is common ti all. So i need to pulse each sensor after a delay.
Why do you think you need to drive the sensors in sequence? According to the datasheet in your other thread you can drive all 5 sensor in parallel, the measure the 5 outputs. If the AC is not fast enough to sample all 5 sensors within the specified time after driving the sensor, you can easily convert the sensor outputs one after another while still using the same songle drive circuit for all 5 sensor. The sequence would look like this:
- drive sensor
- convert sensor 1
- drive sensors
- converrt sensor 2
-...

You do not need separate drive circuits for each sensor. Neither do you need a multiplexer for driving the sensors. The only 'disadvantage' is that you drive 5 sensors in each cycle but read only one sensor's output. That's a few milliwatts lost - a bargain compared to the circuitry saved.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Hi
Thanks. I was not sure that i could drive the 5 sensors all at the same time.
I have looked in the datasheet but cant seem to find where it mentions this.

I am using a dc-dc converter to drop the voltage to 0.65V DC. Then using a p mosfet high side switch. The gate is pulsed via the PIC I/O line. The source goes to 0.65V DC. The drain would be the pulsed 0.65V DC supply. There is also a resistor from gate to source to keep the p mosfet off. Does that sound ok?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
I have looked in the datasheet but cant seem to find where it mentions this.
You will not find this in the datasheet as it is common technique. Think of light bulbs in parallel. You don't need a separate switch for each bulb. One switch can turn on all bulbs.
Does that sound ok?
Show a picture, please. Describing a circuit verbally leaves so much open for (possibly wrong) interpretation.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
You will not find this in the datasheet as it is common technique. Think of light bulbs in parallel. You don't need a separate switch for each bulb. One switch can turn on all bulbs.

Show a picture, please. Describing a circuit verbally leaves so much open for (possibly wrong) interpretation.
Ok i will upload a schematic today.
Thanks for your help.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Hi
This is the curcuit i intend to use. But have the FET source connected to a 0.65V supply. Can you see issues?
I need to get the pulse width correct, which i presume can be done via programming timers of the PIC.
 

Attachments

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

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Hi i need to clamp a capacitor to 0.65V and then apply a pulse, then dischsrge the cap.
To get a 0.65V pulse output.
Thanks.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
What do you mean by "apply a pulse"?
Why "discharge the cap"?
What exactly is your question?
More details, please.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
I need to find a way of generating 0.65V DC. Cheap with minimum components. So thought i could charge a cap to 0.65V (diode drop) then discharge. Hopefully giving me a pulse output.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
Why do you keep creating new threads for the same topic? Please stay within thread for one topic.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Sorry, i will keep it everything in this thread.
My issue now is the drive to the heater. Looking at the datasheet the heater has a resistance of 1.8ohm (when cool) and i presume this will increase slightly when the 0.65V DC pulse is applied.
I need a circuit to drive this low kmpedance 1.8ohm heater, the current is around 150mA. This cant ve generated from a micro I/O port.
Hence one idea was to use a buck mode dc dc converter that can go down to 0.65V, supply atleast 200mA. However i am not sure on how to pulse this.
My other idea was to use a potential divider set to 0.65V connected to the Micro I/O line, then a voltage follower via an opamp, but even this probably will not have the drive capability, to drive the heater resistance at 1.8ohm.
Any help would be appreciated.
Thanks
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
Hopefully giving me a pulse output.
That would give you a pulse, but with decreasing voltage. Set up a 0.65 V regulator, controll the timing of the puls eby a MOSFET and the µC, as discussed earlier.

Hope is not a good way to design circuits.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Ok. I will try and use a psu set to 0.65V.
I have no idea if i should use a p or n mosfet for the switching.
Could you assist. I think n mosfet would be easier to drive and it might have lower rds on.
Can you advise?
 
Top