5V -> 3V3 for 1PPS - Page 1
Forum section: electronics / projects

author: jailbird
author_rank: Newbie
timestamp: January 17, 2020, 11:27:31 pm
content: I know this is a stupid newbie question, sorry.So I picked up a FE-5680A GPS Discipline module from Tindie. The 1PPS output on it is 5V, while the GPIO inputs on the Raspberry Pi are 3V3. I need to make them happily coexist.Normally I'd use a level shifter, but I'm concerned on what effect that would have on the signal (eg, delay it, make it inconsistent, etc). I'm thinking maybe a pair of diodes and resistors would maybe make more sense?I'm sure this is a common issue, just wondering what people have used and recommend.Thanks!

author: nctnico
author_rank: Super Contributor
timestamp: January 17, 2020, 11:45:35 pm
content: What is the output impedance of the 1PPS? Chances are it is 50 Ohms so a simple resistor divider will do the trick. If you are going to attach it to a GPIO anything you put in between won't have any consequence for the timing accuracy. Likely you'll be looking at micro-second timing accuracy if you are lucky.

author: jailbird
author_rank: Newbie
timestamp: January 18, 2020, 02:15:15 am
content: It is indeed 50, sorry for not mentioning that!Thanks for the help!

author: MagicSmoker
author_rank: Super Contributor
timestamp: January 18, 2020, 11:47:54 am
content: Oh, there's a really simple solution to this sort of problem which won't affect timing at all: put a Schottky diode in between the two devices with its cathode connected to the 5V output of the GPSDO and a pullup resistor (100R to 330R - not critical) from its anode to 3.3V.

author: nctnico
author_rank: Super Contributor
timestamp: January 18, 2020, 12:00:08 pm
content: No. Never ever use supply rails to dump overvoltage into. Regulators only source and they don't sink so if you push more current into the rail than is being consumed you'll push up the supply rail.In this case a simple resistive divider will do just fine. A 100 Ohm resistor will load the 50 Ohm output enough to get into the 3.3V ball-park.

author: MagicSmoker
author_rank: Super Contributor
timestamp: January 18, 2020, 12:20:34 pm
content: Quote from: nctnico on January 18, 2020, 12:00:08 pmYou might want to re-read my post...

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: January 18, 2020, 12:42:28 pm
content: For what purpose are you using the 1PPS signal for?Adding a buffer or level shifter will always add some jitter to the timing edge and if this is critical, you may want to add a low jitter clock buffer.you may use a resistor divider and it should just work fine. It would add some noise but the jitter added would be minimal. Use a T or PI network so that you could maintain the 50 Ohm impedance as seen from the MCU.

author: ebastler
author_rank: Super Contributor
timestamp: January 18, 2020, 12:49:26 pm
content: As you feed the 1 PPS signal into a Raspberry Pi GPIO, presumably you want to either poll it in software or have it trigger an interrupt. In that case, timing variations caused by a level shifter seem to be negligible to the jitter in the Raspi's response to the signal.What do you intend to do with the 1PPS reference?

author: jailbird
author_rank: Newbie
timestamp: January 19, 2020, 02:53:22 am
content: Going to use it to feed ntpd/chronyd, currently as a NTP server for my LAN. Might use an ODROID-C2 or something instead of a RPi, but same problem there (actually, even worse, the ODROID's GPIO is 1.8V!).

author: bingo600
author_rank: Super Contributor
timestamp: January 19, 2020, 10:08:51 am
content: Quote from: jailbird on January 19, 2020, 02:53:22 amAccording to this , all Odroid-C2 gpio is 3v3 except analog pins.https://wiki.odroid.com/odroid-c2/hardware/expansion_connectorsI have an U4 (Samsung SoC) , where all io was 1v8. I used an Altera MAXII CPLD as a expansion board & level shifter./Bingo

author: jailbird
author_rank: Newbie
timestamp: January 20, 2020, 04:11:37 am
content: You’re completely right, sorry. I think I was thinking about my EspressoBin or HiKey. Too many damn SBCs laying around!Might end up doing something like:https://www.jackenhack.com/ntp-server-extreme-accuracy-for-under-200/eventually to help out with the accuracy isssue.