Connect with us

Pic interface with sensor

Discussion in 'Sensors and Actuators' started by Rajinder, Jul 13, 2019.

  1. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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.
     
  2. Nanren888

    Nanren888

    111
    22
    Nov 8, 2015
    What sort of sensor? What sort of drive? analogue? Digital? I2C? I2S?
    That is, what do you want to multiplex?
     
  3. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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
     
  4. Nanren888

    Nanren888

    111
    22
    Nov 8, 2015
    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 :)
     
  5. davenn

    davenn Moderator

    13,288
    1,756
    Sep 5, 2009
    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
     
  6. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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.
     
  7. Harald Kapp

    Harald Kapp Moderator Moderator

    9,277
    1,878
    Nov 17, 2011
    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.
     
    Tha fios agaibh and Rajinder like this.
  8. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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?
     
  9. Harald Kapp

    Harald Kapp Moderator Moderator

    9,277
    1,878
    Nov 17, 2011
    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.
     
  10. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    Ok i will upload a schematic today.
    Thanks for your help.
     
  11. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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.
     

    Attached Files:

  12. Harald Kapp

    Harald Kapp Moderator Moderator

    9,277
    1,878
    Nov 17, 2011
    Looks o.k. to me.
     
  13. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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.
     
  14. Harald Kapp

    Harald Kapp Moderator Moderator

    9,277
    1,878
    Nov 17, 2011
    What do you mean by "apply a pulse"?
    Why "discharge the cap"?
    What exactly is your question?
    More details, please.
     
  15. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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.
     
  16. Harald Kapp

    Harald Kapp Moderator Moderator

    9,277
    1,878
    Nov 17, 2011
    Why do you keep creating new threads for the same topic? Please stay within thread for one topic.
     
  17. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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
     
  18. Harald Kapp

    Harald Kapp Moderator Moderator

    9,277
    1,878
    Nov 17, 2011
    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.
     
  19. Harald Kapp

    Harald Kapp Moderator Moderator

    9,277
    1,878
    Nov 17, 2011
    hevans1944 likes this.
  20. Rajinder

    Rajinder

    402
    7
    Jan 30, 2016
    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?
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-