SDI-12 Communication - 3.3V Microcontroller Level Shifted Up To 5.0V For Data

Thread Starter

Mahonroy

Joined Oct 21, 2014
357
Hey guys, I have a 3.3v based microcontroller that I am wanting to use to communicate with SDI-12 sensors. For reference, SDI-12 sensors are 3-wires (12VDC for power, ground, and then a data line that is 5V). 5V is logic 0. 0V is logic 1.
Here is an example from the SDI-12 specifications:
http://www.sdi-12.org/current_specification/SDI-12_version-1_4-Jan-30-2021.pdf
sdi-12_question_1.jpg

Am I on the right track with using a circuit like this? This uses a p-channel mosfet, and an n-channel mosfet.
sdi-12_question_2.jpg

I'm guessing it might be better to use 2x mosfets on the top portion so my logic doesn't get inverted? What about for the lower portion?

Thanks and any help or advice is greatly appreciated!
 

Ian Rogers

Joined Dec 12, 2012
966
I have just been through this... I was running SPI from 3v to 5v to a max7291.. BUT!! the mosfet style logic level convertor was not fast enough and the 5v was never being reached... So (as Yaakov just said) I bought a couple of 74hc244's... Perfik!!!

Edit*** The mosfet convertors were running common gate..
 

Thread Starter

Mahonroy

Joined Oct 21, 2014
357
Maybe consider this: sn74lv1t04.pdf Available to ship at Mouser: 9745933
I have just been through this... I was running SPI from 3v to 5v to a max7291.. BUT!! the mosfet style logic level convertor was not fast enough and the 5v was never being reached... So (as Yaakov just said) I bought a couple of 74hc244's... Perfik!!!

Edit*** The mosfet convertors were running common gate..
How would I use these components in this situation? I basically have one GPIO that I am using to both receive and transmit SDI data.
 

Thread Starter

Mahonroy

Joined Oct 21, 2014
357
Would a circuit like this be more preferable? This is more of a standard 3.3V to 5.0V level shifting circuit, I just didn't know how well it would play with the 500 ohm, 200K pulldown, etc.? p.s. that is a N-channel mosfet:
sdi-12_question_3.jpg

It seems like that 10K pullup resistor to 5.0V kind of messes this up... because when the GPIO is set to input to read, and the SDI-12 needs to drive the data now, ideally that 10K would not be there for this part.
 

Thread Starter

Mahonroy

Joined Oct 21, 2014
357
So I came across this in the SDI-12 specifications for an example circuit:
sdi-12_question_5.jpg
I updated my level shifter like this. Will that 10K resistor matter? I also removed the last 510 resistor because it was causing issues with the mosfet:
sdi-12_question_4.jpg
 
Top