Author Topic: Logic level from comparator to raspi gpio  (Read 635 times)

0 Members and 1 Guest are viewing this topic.

Offline PhelarNordTopic starter

  • Newbie
  • Posts: 8
  • Country: se
Logic level from comparator to raspi gpio
« on: December 25, 2019, 08:51:40 pm »
Hi!

Im doing a simple voltage monitor with a lm393. I´m going to use a raspbarry pi´s gpio´s to register the state of the comparator outputs but need some advice to translate the output from the comparator to
3.3v. Can i manage this with just a voltage divider or do i have to use something more solid.

Cheers
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13216
Re: Logic level from comparator to raspi gpio
« Reply #1 on: December 25, 2019, 09:07:10 pm »
The LM393 has an open collector output.  Simply use a 10K pullup resistor from its output to Pi +3.3V, and it will be logic level compatible. 

N.B. LM393 Gnd must connect to Pi Gnd. You can power its Vcc pin from Pi +5V.
 
The following users thanked this post: PhelarNord

Offline PhelarNordTopic starter

  • Newbie
  • Posts: 8
  • Country: se
Re: Logic level from comparator to raspi gpio
« Reply #2 on: December 27, 2019, 07:46:03 pm »
Thanks!

I´ll do this in the design :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf