I am using TIP120 transistors (controlled by 74HC595 shift registers) to control 12VDC, normally closed solenoid valves. Everything is working in short-time tests however when left overnight, some solenoids will open by themselves. The shift register is locked overnight with all pins low, and all the solenoids should remain unpowered - however, some are getting power and opening during this time. I suspect a hardware issue since this occurs both when the control program is running and when it's not. Could this be an issue with the TIP120s closing their circuits after prolonged charge on the collector? Should I perhaps be using MOSFETs in this circuit instead?

Please see the full schematic and a simplified, close up schematic below as well as images of the front and back of my perfboard.

Here are the specs for the two types of solenoids I am using. Both are showing the same behaviour. https://www.canadarobotix.com/products/1642?variant=14423744086065 , https://www.canadarobotix.com/products/1643?variant=14423744118833

simplified schematic

full schemo (pardon the mess, this was made for my own reference when making the perfboardfront of perfboardback of perfboard

  • 1
    \$\begingroup\$ On your main schematic all the resistors have shor-circuits running through them. What does the PCB look like? Did you measure base and collector voltage during a failure? Have you exceeded the total drive capability of the drivers? \$\endgroup\$ – Transistor May 5 '19 at 13:21
  • \$\begingroup\$ Thanks for the quick response, Transistor. The shorted resistors is a mistake in my drawing, it was only made as a reference for making the perfboard. I will link a picture of the perfboard above. I have not been on-site to measure the voltages during a failure though that will be my next step. Can you explain what you mean by the drive capability of the drivers? Do you mean the current supplied by the shift register? \$\endgroup\$ – James May 5 '19 at 13:26
  • \$\begingroup\$ Transistor, please see the pictures added above. Thanks \$\endgroup\$ – James May 5 '19 at 13:43
  • \$\begingroup\$ How much current do the solenoid valves draw? Have you measured the collector voltage when the solenoid is activated? \$\endgroup\$ – Mattman944 May 5 '19 at 13:48
  • 2
    \$\begingroup\$ OK, your question doesn't make that clear. The solenoids are turning on. The valves are opening despite the control signals being turned off. Try and summarise all the points raised in the comments into the question so that all the information is in one place. \$\endgroup\$ – Transistor May 5 '19 at 14:18

I don't see any decoupling capacitors on your ICs on the veroboard. PSU noise could be causing false outputs from your logic. Try putting 100nF capacitors from ground supply pin to power supply pin on each IC. Keep the leads as short as possible, put them on the copper side of the board if this helps you to meet this objective.

Without these capacitors the supply voltage at the IC pins can drop to a level where the behaviour of the ICs is non deterministic over very short timescales. The faster the logic family the worse the problem gets.

  • \$\begingroup\$ When I was validating the individual components I used a capacitor at first but found that I could operate the IC successfully without (but did not do any overnight testing), and so I did not implement it in the perfboard. Do you think this PSU noise could really be enough to unlatch, affect the serial-in, and then re-latch the IC and cause a false output? \$\endgroup\$ – James May 5 '19 at 14:16
  • 3
    \$\begingroup\$ Yes! Your comment about this not being a permanent failure and clearing on reset supports this. \$\endgroup\$ – RoyC May 5 '19 at 14:19
  • \$\begingroup\$ Wonderful! That would be a nice simple fix and I am looking forward to trying it. Unfortunately, I'm away from the hardware and will not be able to make these changes for another week - once I return I will try this and be able to accept your answer, I appreciate your patience. \$\endgroup\$ – James May 5 '19 at 14:23
  • 6
    \$\begingroup\$ Always use decoupling caps, even on quiet circuits. On noisy circuits, even more always. \$\endgroup\$ – TimWescott May 5 '19 at 15:35

Thermal Resistance, Junction−to−Ambient Rja = 62.5°C/W , Pd = 0.5A * 0.8V = 400mW = 25'C rise , looks ok.

Although you may have grounds tied together externally, they should be also done on board.

If you switch solenoids simultaneously, you may have significant ground shift and exceed the spec for Emitter-Base Voltage VEB = 5.0Vdc ( reverse spikes). So joining grounds on the board and adding low ESR decoupling e-caps will help the snubber diodes from raising the ground voltage between 12V return and 5V return which drives the base-emitter.

Not having a good ground plane and decoupling caps and possibly switching off more than 1 solenoid at a time would explain random failures.

  • \$\begingroup\$ Thanks for the response. I do have all grounds tied together on the board (I think). Could you please be more clear as to where these e-caps should be added, and perhaps an estimate to their value? \$\endgroup\$ – James May 5 '19 at 14:29
  • 1
    \$\begingroup\$ 0.1 ceramic near each CMOS IC. 10uF to 100uF Tantalum or low ESR Alum cap near 12V input such that the 5V logic ground does not share ground current from solenoids \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 May 5 '19 at 14:39
  • \$\begingroup\$ Great, thank you for the insight! Unfortunately, I'm away from the hardware and will not be able to make these changes for another week - once I return I will try this and be able to accept your answer, I appreciate your patience. \$\endgroup\$ – James May 5 '19 at 14:46
  • 1
    \$\begingroup\$ Also in future make a PCB and find a cheap board shop for $50 prototypes. Consider all wire output inductance to reduce stray coupling from input to output. Put a snubber RF cap on CLK & data to avoid false data if necessary 100 pF... or use twisted pairs. CM clamp choke on solenoid wire bundle reduces noise > 1MHz if necessary. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 May 5 '19 at 15:05
  • \$\begingroup\$ Thank you for all the advice, Sunnyskyguy. I plan on getting proper PCBs made for the final installation of this system (which will include more than 10x the number of solenoids) - however I was crunched for time when installing this smaller test version and so I went with what I knew, perfboard. I appreciate your help! \$\endgroup\$ – James May 5 '19 at 15:16

Aside from transistor collector voltage, Vce, what about the diode across the coil? Any leakage getting through, energizing the coil, even though it is only for supression. How strong is the clock signal? Current is clearly getting to the coil. Bypass caps for transient supression might be called for.

  • \$\begingroup\$ Hi Ernest, are you saying that I should have bypass caps on the high voltage (12V solenoid) circuit as well as in the logic circuit? \$\endgroup\$ – James May 6 '19 at 9:34
  • \$\begingroup\$ Bypass everything with a signal. Draw down any quiescent current that might be generated by external 'influence'. A nearby transmitter might impinging enough RF to be converted to a D.C signal by diode action in the transistor. If all internal suspects are accounted for, you might need to look outside the box for external sources. \$\endgroup\$ – Ernest May 6 '19 at 22:13

It can be because of the base resistor being too large the base is not receive appropriate current to keep it turned on during high current switching. 5/1k = 0.005 A. And also adding decoupling caps on the supply side will help keep the current flow constant.


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.