Go Down

Topic: LED Indicator for pwm/ttl converter (Read 997 times) previous topic - next topic

raschemmel

Then they did it that way to maintain the positive logic.
Normally the pullup is on the collector (inverting the logic) but the way they did it it pulls high with a high
on the input , so no logic inversion.

pathogenex

Ok I reached a point where I thought I had this done. Built on a Breadboard and then found I was wrong. This is my current design cut into sub-sections.


Can anyone help out?

raschemmel

Kind ofhard to hep without knowing what's
wrong
Care to enlighten us ?

pathogenex

#63
Oct 17, 2020, 02:51 pm Last Edit: Oct 17, 2020, 06:03 pm by pathogenex
Kind ofhard to hep without knowing what's
wrong
Care to enlighten us ?
Ok so i tried Ltspice and it was a nightmare of a program that i'll have to spend another time learning.
The solenoid Sub-circuit still isnt working. Where can i test within the circuit to find the issue?
I've checked the following
Comp/Pins = VLow / VHigh
U3/5,4 = 0.00v / 5v
U4/5,4 = 1.5v / 1.5v  <<<----- Clearly this should be shifting with everything else but it is not..



4n35 Specs

I believe the problem might lie in the opto im trying to use?

my solenoid has a current rating of 250mA
The 4N25 has a Collector current rating of 50mA
The 4N25 has a Emitter/Base breakdown Voltage of 7v

In the simulation im running of the solenoid circuit. If i change the value of R3 to 16.4k the circuits "Trigger voltage" (Not correct term) changed to closer to the +24v end of the control signal which is ideal for this circuit.

Feeling more and more reserved about doing it this way.
Feeling like it would be alot easier to use an arduino nano to read the opto output and then have it trigger the MOSFET switching the solenoid like this...

What would be the simple/more efficient choice? PIC or Transistor/MOSFET?



It seems complete overkill to use a pic as a transistor but im loosing my mind trying to get this b****rd working...





raschemmel

#64
Oct 17, 2020, 06:42 pm Last Edit: Oct 17, 2020, 07:28 pm by raschemmel
Why did you change the schematic ?
Why did you move the solenoid circuit ?

If you are going to troubleshoot it by changing the schematic (which makes no sense), then I'm out of here,
otherwise remove the Nano and return the circuit to it's previous configuration.
I don't have time to explain why. 

I can't help you if you only give me partial information.
This:
Quote
I've checked the following
Comp/Pins = VLow / VHigh
U3/5,4 = 0.00v / 5v
U4/5,4 = 1.5v / 1.5v
doesn't tell me much except that U3 is OK.
as far as U4,  I need the following
R3 voltage drop
R8 voltage drop
R? value and voltage drop
U4-1= ___
U4-2= ___
U4-3='X Don't Care'
U4-4= ___
U4-5= ___
U4-6=___ (transistor base test input, used to test transistor irrespective of led,which apparently you didn't do...)
Conditions:
All supply voltages (and WHERE they were measured)
JP1 SWITCH POSITION
ALL INPUTS ON ALL INPUT CONNECTORS
JP1
JP2
JP3
Air Assist Switch Position

To be honest, I'm afraid to ask why you don't just test U4 on a bench with a solderless breadboard.
It's not rocket science.

I'm not sure if I'm going to be able to help.
It will depend on whether or not you do your due diligence.

pathogenex

I can't help you if you only give me partial information.
This:doesn't tell me nuch except that U3 is OK.
as far as U4,  I need the following
R3 voltage drop
U4-1= ___
U4-2= ___
U4-3='X Don't Care'
U4-4= ___
U4-5= ___
U4-6=___ (transistor base test input, used to test transistor irrespective of led)
Conditions:
All supply voltages
JP1 SWITCH POSITION
ALL INPUTS ON ALL INPUT CONNECTORS
JP1
JP2
JP3
Air Assist Switch Position

To be honest, I'm afraid to ask why you don't just test U4 on a bench with a solderless breadboard.
It's not rocket science.

R3 voltage drop = 0v (Why? Resistor still working but no V Drop?)
I'm assuming you want all voltages from U4 relative to ground?
Comp/pin = Low/High
U4-1= 0.01v / 24.1v
U4-2= 0v / 0v
U4-3='X Don't Care'
U4-4= 0v / 0v
U4-5= 1.49v / 1.44v
U4-6= 0v / 0v (transistor base test input, used to test transistor irrespective of led)
Conditions:
All supply voltages

J1 = 24v Constant supply Input
J2 = 24v Controllable/Variable supply Input
JP1 SWITCH POSITION = 2,3 closed/short

ALL INPUTS ON ALL INPUT CONNECTORS
JP1 = 0v
JP2 = 24v
JP3 = 24v
Air Assist Switch Position = closed

raschemmel

#66
Oct 17, 2020, 07:30 pm Last Edit: Oct 17, 2020, 07:43 pm by raschemmel
Quote
R3 voltage drop = 0v (Why? Resistor still working but no V Drop?)
I asked for the voltage across this resistor.
Please follow instructions and save your questions for later.

Quote
U4-1= 0.01v / 24.1v
This can't be correct.
Look at the schematic.
Pin-2 is connected to GND.
U4 is an opto coupler so Pin-1 is the anode.
Leds have an intrinsic forward voltage.
The voltage drop across a led inside an opto is the same as the voltage drop across any led.
Put a led in a solderless breadboard and connect the same value current limit resistor as R3

and then apply power and tell me the voltage on the ANODE of the led.


What is the voltage on the ANODE of the led ? (with the CATHODE connected to GND)
IT CANNOT POSSIBLY BE THE SAME AS THE POWER SUPPLY !
That's Electronics-101.
Something is wrong with the information you are giving me  or the led is OPEN (damaged)
If you tested the transistor like I said you would know that works.
If the led is damaged then U4 is bad and must be replaced.
There are no other possibilities.

Quote
I'm assuming you want all voltages from U4 relative to ground?
Yes, of course. I also don't want U4-4 connected to tha Nano.
Remove that connection and connect U4-4 to GND.

pathogenex

I asked for the voltage across this resistor.
Please follow instructions and save your questions for later.
This can't be correct.

I did exactly that. Possitive probe on 24v Variable input and neg probe on U4-Pin1. Reading 0v across it...
Simulated the circuit in http://www.falstad.com/circuit/

Kept getting a nan infinite matrix error until i put a diode between R8 and R4...

Look at the schematic.
Pin-2 is connected to GND.
U4 is an opto coupler so Pin-1 is the anode.
Leds have an intrinsic forward voltage.
The voltage drop across a led inside an opto is the same as the voltage drop across any led.
Put a led in a solderless breadboard and connect the same value current limit resistor as R3

and then apply power and tell me the voltage on the ANODE of the led.
Voltage drop across R3 should be 23.4v i know that it should...

What is the voltage on the ANODE of the led ? (with the CATHODE connected to GND)
IT CANNOT POSSIBLY BE THE SAME AS THE POWER SUPPLY !
I kid you not 24v running from pin1 through pin2 to ground....

That's Electronics-101.
Something is wrong with the information you are giving me  or the led is OPEN (damaged)
Seems likely to be the cause. I have one left thats still in packaging. What specs do i need to be paying attention to so that i don't pop this one? Specifications

If you tested the transistor like I said you would know that works.
Plugged it into my DMM and reading a clear 245 same as all 2222n's i have so either i got a box of duds or its fine.

If the led is damaged then U4 is bad and must be replaced.
There are no other possibilities.

Yes, of course. I also don't want U4-4 connected to tha Nano.
Remove that connection and connect U4-4 to GND.
Never connected just did that as an example. There is no nano in this circuit.

pathogenex

#68
Oct 18, 2020, 04:16 am Last Edit: Oct 18, 2020, 04:52 am by pathogenex
Can confirm opto is dead.
What inputs for the opto do i need to measure to ensure i dont kill anymore?
Would it be safer to add a diode on U4-Pin5 to ground so as to avoid any backvoltage?

raschemmel

#69
Oct 18, 2020, 05:32 am Last Edit: Oct 18, 2020, 06:44 am by raschemmel
"I kid you not 24v running from pin1 through pin2 to ground...

Obviously, if the led is OPEN , and the voltage across R3 is 0V (24V/24V=0V) then the current
through R3 =0A and there CANNOT be ANYTHING
"running from pin-1 THROUGH pin-2 (where the
OPEN led diode is ) to ground , because there IS
no connection BETWEEN pin-1 & pin-2.
The fact that you don't know the most basic law
of electronics (Ohm's Law, Google it) is an indication that this project might be over your
head. I don't doubt that you will persist until
you get it working but when you do I suggest
you take some time to learn Obm's Law:
V= I*R
R=V/I
I=V/R
P= I*V

And I told you to breadboard an led and resistor
and report the voltage on the  ANODE of the
led with the CATHODE connected to ground.
When you complete your homework I'll answer
more questions and not before.

"Would it be safer to add a diode on U4-Pin5 to ground so as to avoid any backvoltage?"

What does a diode on the collector of an opto
on the output side of a 5000V ISOLATION barrier
have to do with protecting a led on the OTHER
side of the 5000V ISOLATION barrier ?
Do you understand what an opto isolator is ?
Do you know what an isolation barrier is ?
Do you realize there is no electrical connection
between the led and the collector so it is IMPOSSIBLE to have BACKVOLTAGE ?

pathogenex

#70
Oct 18, 2020, 02:11 pm Last Edit: Oct 18, 2020, 02:14 pm by pathogenex
"I kid you not 24v running from pin1 through pin2 to ground...

Obviously, if the led is OPEN , and the voltage across R3 is 0V (24V/24V=0V) then the current
through R3 =0A and there CANNOT be ANYTHING
"running from pin-1 THROUGH pin-2 (where the
OPEN led diode is ) to ground , because there IS
no connection BETWEEN pin-1 & pin-2.

Across* would have been the correct word. I got ohms law down its just terminology about places on the circuit that i get lost on.
Eg. Across, through, within. Especially when im trying to do it at 3am...


And I told you to breadboard an led and resistor
and report the voltage on the  ANODE of the
led with the CATHODE connected to ground.
When you complete your homework I'll answer
more questions and not before.

I though i put that in my reply..
 Voltage across the LED+R is going to 24v... Because thats all the voltage there is...
Led Vd should be around 1.7v to 1.8v... standard for most LEDs
R Vd should be 22.2v


Is this simulation incorrect? Its showing only 0.5v across the optos LED...

"Would it be safer to add a diode on U4-Pin5 to ground so as to avoid any backvoltage?"

What does a diode on the collector of an opto
on the output side of a 5000V ISOLATION barrier
have to do with protecting a led on the OTHER
side of the 5000V ISOLATION barrier ?

My thought regarding this would be because of the two input voltages...

The opto has an output
Emmiter-Collector breakdown voltage of 7v.
Even though they share a common ground could the "ON/OFF feedback" from the the solenoid at 12v not overpower the 5v input and cause a reverse voltage?

So if somehow 12v gets grounded even for a second they would be a +7v diffence?


raschemmel

#71
Oct 18, 2020, 03:45 pm Last Edit: Oct 18, 2020, 04:17 pm by raschemmel
Post the corrected schematic.

"R3 voltage drop = 0v (Why? Resistor still working but no V Drop?)"
"Voltage drop across R3 should be 23.4v i know that it should..."


"Led Vd should be around 1.7v to 1.8v... standard for most LEDs
R Vd should be 22.2v"

All of those statements are yours.
Why is the second one wrong?
(24V-1.8V=22.2V)

You can reduce R3 to 1.8k or 2.3k to increase
U4 led current.

"Is this simulation incorrect? Its showing only 0.5v across the optos LED... "

You tell me. If the led forward voltage is 1.8V, would it be on at 0.5V ?

pathogenex

#72
Oct 18, 2020, 06:46 pm Last Edit: Oct 18, 2020, 07:11 pm by pathogenex
Current Full Schematic


Post the corrected schematic.

"R3 voltage drop = 0v (Why? Resistor still working but no V Drop?)"

"Voltage drop across R3 should be 23.4v i know that it should..."

"Led Vd should be around 1.7v to 1.8v... standard for most LEDs
R Vd should be 22.2v"

All of those statements are yours.
Why is the second one wrong?
(24V-1.8V=22.2V)
The second one refers to the simulation.
Opto input side registers as 0.5v on the probes in the sim. Cannot set variables of optocoupler... So it was an assumption.

Very hesitant to connect my final opto to the Breadboard without ensuring i've got it right...

So from the spec sheet.

Max Vf = 1.7v (Is this the max V before it goes pop?) Im being really special atm... So Vf = Vd = Vfd
Min Vf = 0.9v (Is this the minimum V before it turns switches on/off?)
Max If = 50mA (Max = gets hot/goes pop!)


 
You can reduce R3 to 1.8k or 2.3k to increase
U4 led current.

Ok i think i got you...
current would then be (24-1.7) / 1800 = 0.012A
                                     (24-1.7) / 2300 = 0.009A


So
(24v-1.7v)/0.05A = 446
Ω Absolute Minimum for 24v -> U4-P1???

"Is this simulation incorrect? Its showing only 0.5v across the optos LED... "

You tell me. If the led forward voltage is 1.8V, would it be on at 0.5V ?
So if im right, Which im probably not. Shocked but glad you've stayed to help...

With the specs of Vf Min = 0.9v = LED switch point?

raschemmel

#73
Oct 18, 2020, 07:39 pm Last Edit: Oct 18, 2020, 07:55 pm by raschemmel
You need to stop trying to take the easy way out
using simulations and start relying on basic electronics. Did I need a simulation to know the
opto led was open ? Common sense should tell you
that if the voltage drop across R3=24V-24V=0A
that there is NO CURRENT and NO return  path to ground . Do you need a simulation to understand that?
When you saw 24V on the anode you should have had a WTF? moment.

Stop copping out and start doing you due dilligence with Ohm's Law which you claim to yet
obviously don't use or you would have known
there was something wrong if the voltage ln the
anode of the led was 24V. It would be possible
with a good led if the connection from the cathode
to ground was open because then it would be floating. When you saw 24V on the anode, the first thing you should have done was verify the cathode
was connected to ground and if so the next thing
you should have done was check the led with a meter on diode scale instead of just sending me
the values. I'm probably on the other side of the
world and even I know the opto right in front of you
is bad.
Think about that.
More than likely you connected the anode directly
to 24V and blew it. Either way, you have a meter
and presumably know how to check a led.
Did you ever measure R3 resistance ?

pathogenex

Was a blown optocoupler... Works perfect... :o

Working schematic here.



Go Up