I have (4) 12V bulbs for the landing gear indicator lights that will be powered with a 15V power supply.
Of course my Arduino and Air Manager with Xplane need to control those lights so I am using the ULN2803a transistor array.
I was hoping someone (Joe?) could confirm that I have the wiring correct.
Wiring help with ULN2803a transistor array
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Wiring help with ULN2803a transistor array
Hi Kirk, there are many others that could advise also of course, but yes, its spot on.
Note, you don't need to connect the 'common' (pin 10) , the infamously confusing and badly named pin on these devices
It is mainly for use with inductive loads like relays or motors to provide a return path for back EMF via the flyback diodes.
Certainly doesn't harm leaving it connected and is actually good practice so you don't have to worry about Back EMF spikes if you decide to add relays for something at a later stage.
Many struggle with that specific pin so hats off to you.
Joe
Note, you don't need to connect the 'common' (pin 10) , the infamously confusing and badly named pin on these devices
It is mainly for use with inductive loads like relays or motors to provide a return path for back EMF via the flyback diodes.
Certainly doesn't harm leaving it connected and is actually good practice so you don't have to worry about Back EMF spikes if you decide to add relays for something at a later stage.
Many struggle with that specific pin so hats off to you.
Joe
Joe. CISSP, MSc.
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Wiring help with ULN2803a transistor array
Hey Joe,jph wrote: ↑Sun Jun 19, 2022 5:26 pm Hi Kirk, there are many others that could advise also of course, but yes, its spot on.
Note, you don't need to connect the 'common' (pin 10) , the infamous badly named ULN pin
It is mainly for use with inductive loads like relays or motors to provide a return path for back EMF via the flyback diodes.
Certainly doesn't harm leaving it connected and is actually good practice so you dont have to worry about Back EMF spikes if you decide to add relays for something at a later stage.
Many struggle with that specific pin so hats off to you.
Joe
Thanks for the prompt response.
Yep, that connection has been confusing. So technically, in this diagram I used as a guide, the connection to pin 10 can be omitted. Unless that light bulb is replaced with a motor, I assume?
Re: Wiring help with ULN2803a transistor array
HI Kirk, yes it can. Absolutely not needed at all in that diagram and performs no purpose apart from driving up the prices of copper wire
If you follow the path you will see that the supply voltage to the common goes nowhere as all the diodes are reverse biased. The ONLY purpose of the diodes is for flyback / EMF dumping.
If you use a motor or relay or indeed any inductive device then whenever you remove power you get an instantaneous field collapse and a very high voltage spike is opposite direction to the original current flow. The flyback diodes will then be FOREWARD biased and will then conduct the spike harmlessly away into the supply rail connected to the 'common' pin (Pin 10).
Joe
If you follow the path you will see that the supply voltage to the common goes nowhere as all the diodes are reverse biased. The ONLY purpose of the diodes is for flyback / EMF dumping.
If you use a motor or relay or indeed any inductive device then whenever you remove power you get an instantaneous field collapse and a very high voltage spike is opposite direction to the original current flow. The flyback diodes will then be FOREWARD biased and will then conduct the spike harmlessly away into the supply rail connected to the 'common' pin (Pin 10).
Joe
Joe. CISSP, MSc.
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Wiring help with ULN2803a transistor array
Makes total sense...jph wrote: ↑Sun Jun 19, 2022 6:30 pm HI Kirk, yes it can. Absolutely not needed at all in that diagram and performs no purpose apart from driving up the prices of copper wire
If you follow the path you will see that the supply voltage to the common goes nowhere as all the diodes are reverse biased. The ONLY purpose of the diodes is for flyback / EMF dumping.
If you use a motor or relay or indeed any inductive device then whenever you remove power you get an instantaneous field collapse and a very high voltage spike is opposite direction to the original current flow. The flyback diodes will then be FOREWARD biased and will then conduct the spike harmlessly away into the supply rail connected to the 'common' pin (Pin 10).
Joe
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Wiring help with ULN2803a transistor array
Hey Joe,
I am getting back into my autopilot setup from many months ago.
The magnets in the autopilot also need to be incorporated into this 12v circuit along with the landing gear lights.
To that end I created a new circuit diagram trying to remember how to set up the autopilot switches controlled by the ULN2803a.
Here is the circuit I put together and a photo of the autopilot with it's momentary switches and the two electromagnets.
Since these electromagnets are inductance type devices I assume that the pin 10 (COM) needs to be connected.
When the momentary toggle switches are pressed it is supposed to close the circuit and activate the magnets which then holds the toggles in place keeping the momentary switch closed.
The code was developed with Keith's help some time ago.
Can you scan over this circuit and let me know if it's correct for the magnets and the switches?
Thanks,
Kirk
I am getting back into my autopilot setup from many months ago.
The magnets in the autopilot also need to be incorporated into this 12v circuit along with the landing gear lights.
To that end I created a new circuit diagram trying to remember how to set up the autopilot switches controlled by the ULN2803a.
Here is the circuit I put together and a photo of the autopilot with it's momentary switches and the two electromagnets.
Since these electromagnets are inductance type devices I assume that the pin 10 (COM) needs to be connected.
When the momentary toggle switches are pressed it is supposed to close the circuit and activate the magnets which then holds the toggles in place keeping the momentary switch closed.
The code was developed with Keith's help some time ago.
Can you scan over this circuit and let me know if it's correct for the magnets and the switches?
Thanks,
Kirk
Re: Wiring help with ULN2803a transistor array
Hi Kirk, I can't tell from the data if it is or not unfortunately. (The circuit is safe though - and yes, you need the pin 10 connection to the HV supply as it is not carrying inductive loads)
At the moment the Darlington output of the ULN for the electromagnet would have to be active prior to the pushbutton press for the electromagnet to activate during the button press. I have no way of telling from the photo if the electromagnet will then hold the switch depressed - I presume that is the function as that is how these things normally operate.
If that is the case, then what operates the darlington output in the first place ? what conditions need to be met ?.
At the moment the Darlington output of the ULN for the electromagnet would have to be active prior to the pushbutton press for the electromagnet to activate during the button press. I have no way of telling from the photo if the electromagnet will then hold the switch depressed - I presume that is the function as that is how these things normally operate.
If that is the case, then what operates the darlington output in the first place ? what conditions need to be met ?.
Joe. CISSP, MSc.
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Wiring help with ULN2803a transistor array
Joe,
Doesnt the pushing of the switch activate the Arduino pin to then activate the Darlington to complete the magnet circuit and thus energize the magnet?
Doesnt the pushing of the switch activate the Arduino pin to then activate the Darlington to complete the magnet circuit and thus energize the magnet?
Re: Wiring help with ULN2803a transistor array
Presuming the top 2 diagrams are electromagnets and the lower two green round things are pushbuttons then no.
It appears that each pushbutton is connected to the HV side supply then to the electromagnet then to the open collector Darlington driver output.
Nothing will happen until you signal the ULN driver to turn on. That is a one way only process from Arduino to ULN input. The ULN input channels control the ULN Darlington Output Driver - Open Collector. There is no signal path back from the Darlington output to the Arduino.
IF the driver output is activate from the Arduino PRIOR to pushing a button then, if there is an mechanical latch with the electromagnet and pushbutton, it will latch as the driver stage is active. Without that signal FROM the Arduino FIRST though it wont.
IF it is as I presume - as I say above - then you could set the ULN output active by simply setting a logic 1 on the Arduino pin that corresponds to that ULN channel. The system is then ready to operate and latch. The is no communication of the push button state to the Arduino though.
You could also simply connect the push button to an Arduino input (so it is not connected electrically to the solenoid) and take the solenoid directly from the HV line to the ULN Darlington Collector. When the Arduino sees the push button pressed it can then activate the solenoid to latch. Whatever condition this is designed to operate in / and release in - can then be coded as you please. That way the Arduino is fully aware of the state of both the button and the solenoid and has full control over solenoid operation.
Joe
It appears that each pushbutton is connected to the HV side supply then to the electromagnet then to the open collector Darlington driver output.
Nothing will happen until you signal the ULN driver to turn on. That is a one way only process from Arduino to ULN input. The ULN input channels control the ULN Darlington Output Driver - Open Collector. There is no signal path back from the Darlington output to the Arduino.
IF the driver output is activate from the Arduino PRIOR to pushing a button then, if there is an mechanical latch with the electromagnet and pushbutton, it will latch as the driver stage is active. Without that signal FROM the Arduino FIRST though it wont.
IF it is as I presume - as I say above - then you could set the ULN output active by simply setting a logic 1 on the Arduino pin that corresponds to that ULN channel. The system is then ready to operate and latch. The is no communication of the push button state to the Arduino though.
You could also simply connect the push button to an Arduino input (so it is not connected electrically to the solenoid) and take the solenoid directly from the HV line to the ULN Darlington Collector. When the Arduino sees the push button pressed it can then activate the solenoid to latch. Whatever condition this is designed to operate in / and release in - can then be coded as you please. That way the Arduino is fully aware of the state of both the button and the solenoid and has full control over solenoid operation.
Joe
Joe. CISSP, MSc.
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Wiring help with ULN2803a transistor array
Joe,
I guess those fritzing parts diagrams are not too self-explanatory.
The top two green boxes are fritzing momentary switches.
The two side by side black symbols are the closest thing I could find to represent the magnets. In fritzing those parts are simply called Sparkfun inductor.
I guess those fritzing parts diagrams are not too self-explanatory.
The top two green boxes are fritzing momentary switches.
The two side by side black symbols are the closest thing I could find to represent the magnets. In fritzing those parts are simply called Sparkfun inductor.