Help with resistor calculation

Hi Guys

I've designed the circuit below and built it, but my PS2501 isn't switching. (I need the arduino input--connected to pin 16 on the PS2501--to go low when ~8 to ~15v is detected on the input of the PS2501)

I measured 12v between pin 1 and 2 on the 2501, but still get 3.3v between pin 16 and 15. R1 is doing double-duty as pull-up for digital input on arduino and current limiting.

Can anyone shed any light on where the problem might be?

My thoughts are (assuming the general design is valid) either:

  • Not enough current to trigger input of PS2501
  • Problem with use of R1 or it's value
  • Ground issue - three separate grounds?

TIA

Mark

I suggest that your R1,R2 values are too low.
Try 10K.

Also, at first, have them disconnected from the Arduino pins (why are you using Analog pins? don't tell me) and test for hi/lo that way, then connect them and see how that works.

Vin, where you have this BEC 5V connected to is, usually, for 7-12V. Is there a "5V" pin on that "Moteino"? (If so, the BEC-5V ought to go there.)

I measured 12v between pin 1 and 2 on the 2501

Well... That's NOT right! :frowning: Pins 1 & 2 are an internal LED, which should have about 1.5V across it. With 12V into the series resistor, the remaining 10.5V should be dropped across the resistor.

If you have 12V (forward) across an LED, the LED is BAD! Make sure the series resistors are really 1K. If they are too low, or if you connected 12V directly across the pins 1 & 2, you may have killed it.

It's unlikely that the opto-isolator was defective, and even more unlikely that all 4 internal optos are defective... assuming you got it new from a reputable supplier.

•Ground issue - three separate grounds?

Three??? Each side of the opto-isolator can have it's own separate/isolated ground, so you can have 2-separate grounds (if you also use an isolated DC/DC converter) but I don't think you can have 3 isolated grounds. (You may not need isolated grounds at all.)

Also, at first, have them disconnected from the Arduino pins (why are you using Analog pins? don't tell me) and test for hi/lo that way, then connect them and see how that works.

the pins on moteino are dual function. They are configured for digital

Vin, where you have this BEC 5V connected to is, usually, for 7-12V. Is there a "5V" pin on that "Moteino"? (If so, the BEC-5V ought to go there.)

Specs say
Input Voltage (recommended) 3.3V-9V
Input Voltage (limits) 3.3V – 13V

I've run it off 5V on breadboard and maybe even 3.3v (was a while ago)

DVDdoug:

I measured 12v between pin 1 and 2 on the 2501

Well... That's NOT right! :frowning: Pins 1 & 2 are an internal LED, which should have about 1.5V across it. With 12V into the series resistor, the remaining 10.5V should be dropped across the resistor.

If you have 12V (forward) across an LED, the LED is BAD! Make sure the series resistors are really 1K. If they are too low, or if you connected 12V directly across the pins 1 & 2, you may have killed it.

It's unlikely that the opto-isolator was defective, and even more unlikely that all 4 internal optos are defective... assuming you got it new from a reputable supplier.

•Ground issue - three separate grounds?

Three??? Each side of the opto-isolator can have it's own separate/isolated ground, so you can have 2-separate grounds (if you also use an isolated DC/DC converter) but I don't think you can have 3 isolated grounds. (You may not need isolated grounds at all.)

I think I've completely messed if up then and probably have killed it. I tested it on a breadboard with 12v input, but in a slightly different config.

I was looking for a way to take a varying DC input (from automobile) and safely use that as an input to drive the arudino; hence, the opto coupler. Clearly, the latter is possible, but it seems the former is not. I just re-read the spec and see that the collector-emitter voltage is 80v, not the input.

Given that I'll have a varying input (probably 11-15v, but would like to add 20-30% either way), could you suggest a suitable device that would take this analog input and give me an isolated logic level output?

Thanks

Mark

See the attachment here (you have to be logged in) --
http://forum.arduino.cc/index.php?topic=188974.msg1398117#msg1398117

The device used there is a 4N25.
(It worked for him, once he got dialed in.)

[I'm not well-versed in *Moteino*, I make no apologies. Analog inputs are useable as digital inputs on a standard Arduino. Just trying to make sure that you weren't trying to analogRead them with this. You have a couple of Sujects on this matter, now.]