• 0

Connecting microcontroller 3.3V output to relay using ULN2803A


Question

I have a need to connect an ARM micro-controller with 3.3V digital output pins to a few 12V solenoid water valves. I figured that I can use a ULN2803AP for this task.

The internal circuit for each input/output is depicted below:

wEDdv.jpg

Couple of questions:

Is the attached schematic correct?
Do I need anything else in the circuit to protect the micro-controller?
Anything else needed to protect the ULN2803A?
And do I tie the +12V and +5V grounds together?

9cGt4.jpg

 

The load I'm driving is rated at about 400mA, 100mA shy of what this part is rated for ( each output ). The datasheet says the ULN2803AP can be put in parallel to handle more current. I'm mot sure how that circuit would look.

Would I just logically connect them as if they are stacked one atop the other?

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi ailee,

You are correct in your schematic that you posted. The grounds do need to be tied together to ensure that each part has the same reference point so you get your true 5V and 12V differences. What you'll end up doing is when you drive one of the input pins high on the ULN2803 part, the corresponding output will become a sink, allowing the 12V line you attached to COM (and powering your solenoid values) to let electricity flow (ignoring the technicalities of which way energy is actually flowing) from your 12V COM to the positive input on the solenoid, to the negative input, and then (essentially) to ground present on your output pin. 

If you drive the MCU pin attached to an input on the Darlington Transistor Array IC low, the corresponding output pin is placed in a high impedance state so no energy will flow.

To get the IC's in parallel, yes you would just logically connect them as if they are stacked on top of each other. Ideally the two ICs will be identical so that the current flow will be split evenly between them so you wouldn't end up overheating one or the other, but to an extent there aren't any guarantees with that. Realistically though, and from my personal experience, there won't be anything else you need to do to get this circuit working or protected. I'd be comfortable wiring up your circuit as you presented at my desk (presuming I had the hardware) without any worries.

Let me know if you have any more questions.

Thanks,
JColvin

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now