I'm working on an experiment where I'd like to shift a 24V on/off signal down to 3.5V or 5V (i.e. suitable to use with an Arduino or Raspberry Pi).
For simplicity and safety - I really don't want to fry the equipment I'm working with - I decided to use an comparator rather than some sort of voltage divider. The ship I bought was a TI LM339N (datasheet here: http://www.datasheets360.com/pdf/4687091707087477802), as I have to eventually sense multiple signals.
As an experiment, I'm testing this with a 9V signal downshifting to 3V connected to an LED.
The wiring looks like this:
- Pin 1: 1OUT: connected to Resister & LED. Tested separately to make sure it works
- Pin 3: Vcc: 3V+
- Pin 12: GND: 3V-
- Pin 6: 1IN-: 9V-
- Pin 7: 1IN+: 9V+
So I'm pretty sure I'm on the right track here. But I'm expecting the LED to be lit up, the logic (in my mind) being that there's a 9V difference between pins 6 & 7, so pin 1 should be and be showing 3V.