3
\$\begingroup\$

I'm working on my first Arduino project and I thought I picked something simple enough. But before I set my breadboard on fire or ruin any of my components, I wanted to make sure my plan made since because I'm synthesizing several tutorials and data sources.

I am mostly confident I have selected the right components, but want to be sure I am connecting everything in the right order.

The goal of this project is to press a button which will activate an LED (internal to the button) and activate a solenoid valve. The button/LED and Arduino Uno board require 5V power and the solenoid valve requires 12V power.

Below is a diagram of my planned circuitry and here is a quick description of it:

Right Side of Breadboard (12V power circuit):

  1. Power Arduino board with 12V power source
  2. Pass 12V power to one row on the breadboard through the VIN pin
  3. Pass power from the 12V row to a 12V solenoid valve
  4. Connect the other solenoid wire to an empty row on the breadboard
  5. Attach a diode from the row with the negative solenoid wire to the row with the row used to pass a 12V current through the positive solenoid wire to restrict the flow in that direction
  6. Attach one ground pin on the Arduino board to another row on the breadboard
  7. Attach a darlington transistor with the base pin connected to the ground row from the Arduino board
  8. Connect the collector pin from the transistor to the row with the negative solenoid wire
  9. Attach a 1K Ohm resistor to the emitter in of the transistor and attach the other end of the resistor to a new row
  10. Finally, attach that row containing the other end of the resistor to a digital I/O pin on the Arduino

Left Side of Breadboard (5V power circuit):

  1. Connect 5V pin on Arduino to new row on breadboard
  2. Connect one positive wire to button switch contact and one to LED contact (integrated with button)
  3. Connect another ground pin on Arduino to a new row on breadboard
  4. Connect 10K Ohm resistor from ground row to new row on breadboard
  5. From that row, connect one wire to the positive button switch contact and another wire to a new Arduino I/O pin
  6. Connect 220 Ohm resistor from ground row to new row on breadboard
  7. From that row, connect one wire to the positive LED contact and another wire to a new Arduino I/O pin

Breadboard Circuit Diagram for Arduino Project

Some of the resources I referenced:

Some of my components:

EDIT 6-21-20

Below is my second attempt at a circuit schematic.

Circuit Schematic Attempt 2

The first "half" of my project is complete, with the button and LEDs working as expected (obviously this part was easier). I don't have the 12V power supply yet so I can't test the other "half."

Completed button/LED circuit

EDIT

I'd love to hear any feedback on my circuit schematic (first time making a diagram like this as well):

Circuit Schematic Attempt 1

\$\endgroup\$
  • 2
    \$\begingroup\$ In your description and in the Fritzing layout, you have exchanged the Base and Emitter terninals of the TIP120 - on the layout, the pins are base, collector, emitter, top to bottom. fortunately, the error in the description and the error in the layout cancel each other, so that part of the circuit is wired correctly. \$\endgroup\$ – Peter Bennett Jun 12 at 5:33
  • \$\begingroup\$ Thanks @PeterBennett. I took another look at that and I'll make sure to connect it the right way (and update my diagram). I was planning on turning it around (so to speak) so the pins would be reversed but kept it facing to the right to make the diagram prettier, so I probably would have messed it up ultimately. \$\endgroup\$ – Daniel L Jun 12 at 19:19
  • 2
    \$\begingroup\$ Reference designators for your circuit schematic, i.e, give a name as R2 R20 R15 to your resistors and C1 C2 C78 to your capacitors, Q1 Q3 Q65 to your transistors and etc. etc. \$\endgroup\$ – muyustan Jun 12 at 21:18
  • 2
    \$\begingroup\$ Beware that the components mentioned in internet tutorials are often grossly outdated (sometimes 30 years old). That more modern and better versions or technologies exist today. \$\endgroup\$ – Fredled Jun 12 at 22:07
  • 1
    \$\begingroup\$ It may be an artifact of the way you're drawing things, but your 12 volt supply needs to have its - output tied to ground. Same with the 5 volt supply, You should also be aware that the symbols you are using for power supplies (voltage sources) are incorrect. What you are using are the symbol for current sources, and that won't work at all. \$\endgroup\$ – WhatRoughBeast Jun 22 at 0:18
4
\$\begingroup\$

You're not going to explode yourself, but your circuit isn't going to work.

According to your wiring diagram, your transistor is connected wrong.

Your control signal from the Arduino (D4) is connected to the emitter of the TIP120, while the base is connected to ground and the collector is connected to the motor. It won't work that way. Luckiliy, you have a 1k resistor in series between D4 and the emitter so it won't burn out your Arduino.

A proper low side switch looks like this:

enter image description here

Note where the base, emitter, and collector are connected.

Besides the transistor, you'll want to consider the current it takes to operate the valve.

According to the info page for the valve you linked to, the valve uses 15 watts at 12 volts when activated. That's over 1 ampere of current. Depending on the quality of your breadboard, that may be too much. The contacts might get hot and no longer properly hold the wires. Worst case you melt the plastic on your breadboard and ruin a bunch of contacts on your breadboard.


It would have been nice if you had posted a schematic diagram as well as the wiring diagram.

In this case, the wiring diagram was OK because you are specifically asking about the breadboard.

It's easier to discuss the circuit itself if you have a schematic diagram with part designators. It is much easier to say "R1" rather than "that 1k resistor connected to the base of the TIP120."

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks so much! Yeah, this is my first diagram of any type related to electronics so I was mostly following the examples I had available. I'll look at creating a schematics diagram as well to help me put this together. I'll definitely reverse the pins on the transistor so the emitter will connect to the ground and the base will connect to the control from the board. Am I correct that the collector connection is correct? Thanks also for the heads-up on the current for the solenoid valve--I'll do some more research into the specific components to avoid ruining the board. \$\endgroup\$ – Daniel L Jun 12 at 19:14
  • \$\begingroup\$ I would greatly appreciate any feedback on the schematic I added to the post! \$\endgroup\$ – Daniel L Jun 12 at 20:49
  • \$\begingroup\$ Using a N-Mosfet: You MUST add a resistor in series between the gate and the arduino output. Value must be at least 140 ohms. 1K is fine. \$\endgroup\$ – Fredled Jun 12 at 21:59
  • \$\begingroup\$ @Fredled thanks--I don't think it's an N-Mosfet transistor, I think it's an NPN darlington transistor: adafruit.com/product/976 | cdn-shop.adafruit.com/datasheets/TIP120.pdf Does that change how I need to handle it? \$\endgroup\$ – Daniel L Jun 21 at 15:55
  • \$\begingroup\$ Yes, of course it changes. Analyse how these things are working from their datasheets. If it's a Darlington, you must show the internal diagram or at least the two transistors composing it, ideally, together in the same circle to show that it's a single component. The complete diagram with resistors and the diode can be useful too if you are not too lazy to add them. \$\endgroup\$ – Fredled Jun 23 at 22:39
4
\$\begingroup\$

Don't worry, you won't explode anything with a 12 V supply. Just make sure you ground your circuit properly. Keep electronic gadgets away from your circuit. Don't touch a live wire and you should be good to go.

Part of the fun in electronics is in wiring the breadbard and trying different components if you want to be a maker/hobbyist.

If you want to be a serious electronics designer and want to build complex circuits, you need to learn circuit analysis, analog and digital electronics. You can refer to MIT OCW Circuits and Electronics. That should be sufficient if you want to build circuits without high voltages.

Also invest in a multimeter if you don't have one.

To design a circuit successfully and ensure you don't burn a component, you need to refer to the datasheets of the components and note their power ratings. Ensure that those are satisfied.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks a lot, I really appreciate the response. At this point, I definitely anticipate being more of a maker/hobbyist than serious designer; I'm much more comfortable with the software side of things. I'll definitely take a look at the datasheets to make sure I understand and satisfy the power ratings. \$\endgroup\$ – Daniel L Jun 12 at 19:15
  • 2
    \$\begingroup\$ "Don't worry, you won't explode anything with a 12 V supply." reverse polarity caps, or short circuits which might not explode but burn things. \$\endgroup\$ – muyustan Jun 12 at 21:20
3
\$\begingroup\$

Comment about the schematic:

  1. Draw where the 5V, 12V and 3.3V if applicable, come from. The Arduino is a component like any other, not a power supply. So they must come from somewhere else. You can simply draw a triangle with the voltage mentioned. But it shouldn't look like it comes from the Arduino.
  2. Same with GND. GND should be a common connection with all components requiring a GND connection. (except specific cases). To simplify the drawing you can draw a triangle heading downward instead of connecting all the GND pins together. In this case, two parallel lines going to two separate GND pins on the Arduino, while technically correct, add no useful information. Again it shouldn't look like the Arduino is the ground reference.
  3. Do not draw triangles to show the direction of current or signal on the traces. They can be misinterpreted as diodes. Draw them on the side of the trace.

HTH.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ I think in this case, there is a 12 volt supply (not shown) feeding the Arduino, then the Arduino is the source of the both the 12 V and 5V supplies. The Arduino is a module containing voltage regulators and other stuff, not just an IC. The circles with arrows (what I think of as current sources) seriously confuse me. \$\endgroup\$ – Peter Bennett Jun 13 at 0:02
  • 1
    \$\begingroup\$ If 5V comes from the arduino them, of course. More confusing is Vin. There should be an indication the source comes from somewhere outside the schematic. The source itself can be omitted and replaced by a small triangle indicating an input to the circuitry. Same with ground should apply. \$\endgroup\$ – Fredled Jun 13 at 22:54
  • \$\begingroup\$ @Fredled Thanks for your help! On my second version (see edit to OP), I left off any triangles showing current direction. I'd love to hear any additional thoughts! \$\endgroup\$ – Daniel L Jun 21 at 15:47
  • \$\begingroup\$ @DanielL L Now, you forgot the GND of the Arduino. ;) (add another triangle downward). 2/ Avoid zigzags. See ground triangle under Q1. You could also rotate Q1 to put the base in line with R1. But that's already fine, \$\endgroup\$ – Fredled Jun 23 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.