question

mike-donahue avatar image
mike-donahue asked

Voltage step down for D+ signal to Digital Input

Hello,


I've got a question about reducing an alternator D+ 12v signal to a 3.3v signal. This on a Raspberry 3 running Venus 2.94.

The Digital Input 1 is all configured for PIN29/GPIO5. Applying 3.3v to the GPIO triggers it perfectly.

I'd like to use an optocoupler but I'm not getting the results that is supposed to happen. Can anyone help with the wiring? I've attached a diagram but it has fried 2 RPis so far.

I also have "Anmbest 10 Pack 3 Pins AMS1117-3.3 DC 4.75V-12V to 3.3V Voltage Regulator Step Down Power Supply Buck Module" but half of them didn't change the voltage from 12v so I'm not ready to use these. NOTE: I've accidentally fried a RPi a month ago, so I'm being very cautious this time.

Thank you in advance!

untitled-drawing.png

cerbo gx
untitled-drawing.png (132.1 KiB)
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kevgermany avatar image kevgermany ♦♦ commented ·
@Mike Donahue oving this to the modifications space.
0 Likes 0 ·
2 Answers
Sten avatar image
Sten answered ·

Take a look at this page. It describe with illustration how to lower your input voltage with a zener diode and a resistor.

https://www.electronics-tutorials.ws/diode/diode_7.html

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Mike Dorsett avatar image
Mike Dorsett answered ·

Part of the problem is the REAL behaviour of the D+ signal on the alternator. Usually, this is the field Excitation input to the alternator, and sits at about +6V when the ignition is on, but the engine is not running. This is enough to turn on an opto coupler. Once the engine is running, this input rises to 13.8 - 14.4V, depending on state of charge of the battery.

In order to properly detect "engine running", you need to wire the opto between battery positive (+ signal to opto) and D+ (negative signal to opto), the LED wil then GOOUT when the engine is running - but also when the ignition is off!! so you may need a second opto wired with the ignition switch.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.