3 Volt Sensor with 5 Volt PIC?


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Talking 3 Volt Sensor with 5 Volt PIC?

    Hi All!
    There are probably several ways to interface a PIC running on 5 volts to a sensor that has a maximum operating voltage of 3 volts. I understand the sensor may need its own 3 volt supply rather than a resistor divider off the 5 volts or 2 each 1N914 diodes in series with the 5 volts which may be another possibility? Okay so I think you can take the output of the PIC through a 1K resistor to the base of an NPN (2N3904) transistor and either place another 1K resistor in either between the collector and +3 volts or between the emitter to ground. Anyone know which method is best? Next question. The sensor has a pin marked "SCLK". My best guess is this is an "input" from the PIC? The sensor in an MS5541C and what I understand so far is that " SCLK " wants a 3 volt clock signal, " MCLK " is an input (Master Clock?), " Din " is "Data in" requiring a 3 volt signal and " Dout " is data out at a 3 volt level? Therefore SCLK, MCLK, DIN, will each require a transistor to provide a 3 volt signal and DOUT will need to feed a transistor to supply a 5 volt signal? Or should I go back to my doctor and have him adjust my medications?

    Thanks, Ed

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: 3 Volt Sensor with 5 Volt PIC?

    Heres one solution, note the schematic on this page.

    http://www.sparkfun.com/products/8745

  3. #3
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: 3 Volt Sensor with 5 Volt PIC?

    Thanks Mark!
    What a great device! Are my assumptions as to what is an input and what is an output correct?

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default Re: 3 Volt Sensor with 5 Volt PIC?

    A simple solution ...

    just need to adapt R4 to your requirements ...

    Note, the solution generally used is to run the Pic AND the sensor @ 3v ...

    Alain
    Attached Images Attached Images
    Last edited by Acetronics2; - 24th March 2011 at 08:23.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: 3 Volt Sensor with 5 Volt PIC?

    Thanks Alain!
    It is a great idea. This sensor is to measure the depth for a radio controlled submarine. It is one of a group of "sensors" that will be progammed into one big PIC. There is a tachometer on the port and starboard motors with temperature sensors, control for a sound module, a compass, internal flooding alarm, battery voltage and current draw, missile and torpedo status, and speed. Everything is to feed an on screen display as a overlay on the video from a periscope camera. The compass was my first project and turned out to be extremely accurate (.1 degrees). If you are interested, the compass is at http://www.robsonco.com/Dinsmore/Untitled_5.html.

    Best, Ed

  6. #6
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Wink Re: 3 Volt Sensor with 5 Volt PIC - Solved!

    Hi All!
    After reading up on the sparkfun product I became uncomfortable with the posts about how the 3.3 volt side was actually only 2.5 volts due to a resistor divider of 2 equal values (1/2 the 5.0 volts applied). From my experience when you start operating towards the lower limits of a device it will tend to become "spritual" (technical term) where sometimes it will work and sometimes it won't! A company called "Analog Devices" makes an IC called the ADG3304 which has one side that you give it your 3.3 volts and the other side the 5.0 volts. Another company called "Technological Arts" makes a model AD325V14 which takes this tiny IC and puts it on a board so it will plug in to a standard 14 pin DIP socket. The device has 4 bi-directional channels and they have other versions for upto 8 channels as well as a 4 channel open drain version. I hope this is useful to others.

    Best, Ed

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: 3 Volt Sensor with 5 Volt PIC?

    You might find this helpful also.

    http://ww1.microchip.com/downloads/e...hapter%208.pdf

    Regards

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts