Author Topic: 5V -> 3V3 for 1PPS  (Read 1140 times)

0 Members and 1 Guest are viewing this topic.

Offline jailbirdTopic starter

  • Newbie
  • Posts: 9
  • Country: us
5V -> 3V3 for 1PPS
« on: January 17, 2020, 11:27:31 pm »
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!
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28013
  • Country: nl
    • NCT Developments
Re: 5V -> 3V3 for 1PPS
« Reply #1 on: January 17, 2020, 11:45:35 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: jailbird

Offline jailbirdTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: 5V -> 3V3 for 1PPS
« Reply #2 on: January 18, 2020, 02:15:15 am »
It is indeed 50 \$\Omega\$, sorry for not mentioning that!

Thanks for the help!
 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Re: 5V -> 3V3 for 1PPS
« Reply #3 on: January 18, 2020, 11:47:54 am »
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.

 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28013
  • Country: nl
    • NCT Developments
Re: 5V -> 3V3 for 1PPS
« Reply #4 on: January 18, 2020, 12:00:08 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Re: 5V -> 3V3 for 1PPS
« Reply #5 on: January 18, 2020, 12:20:34 pm »
No. Never ever use supply rails to dump overvoltage into.

You might want to re-read my post...
 

Offline EEEnthusiast

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: in
  • RF boards, Precision Analog, Carpentry
    • https://www.zscircuits.in/
Re: 5V -> 3V3 for 1PPS
« Reply #6 on: January 18, 2020, 12:42:28 pm »
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.
Making products for IOT
https://www.zscircuits.in/
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7007
  • Country: de
Re: 5V -> 3V3 for 1PPS
« Reply #7 on: January 18, 2020, 12:49:26 pm »
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?
 

Offline jailbirdTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: 5V -> 3V3 for 1PPS
« Reply #8 on: January 19, 2020, 02:53:22 am »
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!).
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 2033
  • Country: dk
Re: 5V -> 3V3 for 1PPS
« Reply #9 on: January 19, 2020, 10:08:51 am »
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!).

According to this , all Odroid-C2 gpio is 3v3 except analog pins.
https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors

I have an U4 (Samsung SoC)  , where all io was 1v8. I used an Altera MAXII CPLD as a expansion board & level shifter.

/Bingo
 

Offline jailbirdTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: 5V -> 3V3 for 1PPS
« Reply #10 on: January 20, 2020, 04:11:37 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf