First project with KiCad. Have some questions about LED's and general diodes.

Thread Starter

Jimmy Proton

Joined Apr 2, 2021
8
So I'm building these testing boxes for work. Basically it takes a 9v battery and using a buck/boost module steps it up to 24vdc. Then using those cheap red/black push style speaker connectors for a 24vdc source and PNP/NPN detection with a M12 female pigtail to directly plug a sensor into to test it.

My question is this: As the circuit is drawn I want the bi-color LED to change between red or green depending on whether the sensor is plugged in as PNP or NPN. Will the diode setup accomplish this? I'm getting the stuff to make 24 of these so my technicians can build them and hopefully learn something along the way. I wanted to used a diode setup like this to make it slightly more complicated that just using a 2 pole bi-color led with opposing anode and cathode or using separate LEDs for each channel (J3 and J4).

If this won't work and someone has an idea how to accomplish this I'm all ears! Also just started using KiCad last night and it is freaking awesome. Makes Fritzing(which is all I ever used before this) look like cave art compared to the Sistine Chapel. Fritzing's breadboard simulator is second to none though so I will always keep using it. Sorry off topic lol Adderall kicked in.

Thanks!
tester_circuit.JPG
 

MaxHeadRoom

Joined Jul 18, 2013
22,671
Generally when in doubt about a certain circuit function, it is often just tested out on a breadboard to confirm operation before making the board up.
Especially if only concerning 2 or 3 devices etc.
 

Thread Starter

Jimmy Proton

Joined Apr 2, 2021
8
Generally when in doubt about a certain circuit function, it is often just tested out on a breadboard to confirm operation before making the board up.
Especially if only concerning 2 or 3 devices etc.
Yeah, I understand that but at the moment I'm fresh out of LEDs especially the bicolor type that I want to use and was just wondering if anyone could point out any reason why it wouldn't work.

Really the only concern I have with it is when trying to test an NPN prox. I'm hoping that the negative going to the cathodes on D5 and D7 would complete the circuit.

Oops, I just noticed the blatant lack of resistors for D8 and D9. Yeah definitely needs some touch ups.
 

Tonyr1084

Joined Sep 24, 2015
5,819
Assuming a Vf of 2V for LED1, R1 will pass 32mA through the LED. That may be on the high side. Would suggest 470Ω to drop current to 15mA.

Your Bi-Color LED will have different Vf for each different color. 24V (again, assuming 2Vf (red) and 3Vf (green)), at 1KΩ, will give (approximately) 22mA and 21mA. Those are acceptable ranges.

Powering from 9V with LED to indicate when battery is on will eat up some battery life. If that isn't a problem then ignore it. If battery life IS important then since you have two bi-color LED's, they can show operation.

Without more detail about J5 functionality I can't determine how or whether the circuit will work. What is plugged into J5? What exactly is the sensor?
 

Thread Starter

Jimmy Proton

Joined Apr 2, 2021
8
Without more detail about J5 functionality I can't determine how or whether the circuit will work. What is plugged into J5? What exactly is the sensor?
J5 is just a standard 4 pin female plug for sensors. If the sensor has a regular 4 pin connector then you can plug it in and test it that way. Some sensors are hard wired and you have to plug each wire in. Basically you will never use J1 J2 J3 J4 and J5 at the same time. I just want the LED to change from red to green depending on NPN or PNP of the sensor. If it lights up it's good. I'm building these as a troubleshooting tool for my techs.
 
Top