I have a circuit meant to operate an actuator in function of the temperature. The code has been tested and, as long as the actuator is not connected, it does what it is meant to do (tried simulating temperature with serial monitor, and checking the answer of the system), without any error. When I plug the actuator (a 12V DC with Max load 1000N/push from eco-worthy.com), the program starts showing random behaviours (some line of code are executed twice, some other never, finally the behaviour is KO)

The circuit looks like that circuit

The battery used for the prototype is taken from my moto, it is a 12V 8Ah 110A EN FTX9-BS

I started reading about decoupling capacitors then, and tried to add some of the 10nF I had here and there, trying to do it well, but no effect...

I see I should dimension the capacitors, and place them wisely. Reading on the web, I've got that:

  • there should a minimum capacitance:

But I don't really know how to exactly measure the amount of current needed by the actuator. Any help?

Anyway I hoped that using 10nF would cover the minimum need

  • They should be placed as close as possible to the sensitive IC

I placed a 10nF between the two rails on the top of the breadboard in picture, the 5V (output of the voltage regulator) and ground.

  • Often, a big and small bypass capacitor are used, in this case (Big power supply + voltage regulator) the big before the voltage regulator, and the small after, close to the IC

I placed then also 1, then 2, 3 and 4 in parallel (I was trying...) between the two rails on the bottom of the breadboard in picture, the 12V from the battery (from which also the actuator draws current) and ground. But nothing changed

Where and how to use decoupling capacitors here? Does someone of the community here know how to help me? Any contribute and discussion will help Thanks!

29/08/2021 I jumped back in this project after long time, with some capacitors more.

Following the indication of @KASPAROLDENDORFF, I added a flyback diode to the actuator coils (see pic below).

And following the indication of the L7805 datasheet, I added capacitors following the circuit n5 of the pic here below enter image description here

The final circuit look like that:

enter image description here

But still.... it does not work! The circuit gets crazy when the actuator arrives at the end of its run...

Does anybody have a clue of how I can make that work? any contribution is welcomed Is the circuit n5 of the datasheet the one to follow in my case? or rather the 6? if it is the 5, what did I do wrong? if is the 6, any indication?

hope i can solve that with your help


  • 3
    \$\begingroup\$ Current drawn by the actuator could simply drag your power supply voltage down, so please post the datasheet/specs/docs/whatever you have for the actuator and the supply. \$\endgroup\$
    – bobflux
    May 19 at 10:36
  • \$\begingroup\$ @Fracchie: The Arduino has decoupling capacitors and the relay module probably does, too. The 5V regulator (which appears to be a 7805) probably ought to have capacitors on its input and output - but will probably be OK without them. The most likely problem is the actuator drawing more current than the 12V source can supply. \$\endgroup\$
    – JRE
    May 19 at 11:05
  • 1
    \$\begingroup\$ I found these 12V linear actuators. They need from about three to over 4 amperes - and probably draw more for short moments. You'll need to make sure that your power supply can deliver that current and that your wiring can handle that current as well. \$\endgroup\$
    – JRE
    May 19 at 11:06
  • \$\begingroup\$ Look at the 7805 data sheet from the manufacturer you are using and follow there recommendations on capacitors. Without them they become great oscillators which without a scope you would not see. \$\endgroup\$
    – Gil
    May 20 at 3:39
  • \$\begingroup\$ Thank you all for your contributions :) Also for me, everything make me think about the actuator needing too much current for the battery. For the prototype, I took the one from my moto (12V 8Ah 110A EN FTX9-BS). The actuator I am using should be this 12V DC one from eco-worthy.com Regarding flying diodes @JRE, aren't they those 2 diodes I added already between the relays pins and 5V? do you think I need more? I added them since I saw the Arduino was getting frozen when the switch happened. \$\endgroup\$
    – Fracchie
    May 20 at 13:13

Consider the inrush current of the actuator, does it drag the voltage of power supply down to unacceptable levels for MCU?

Another thing to consider is a flyback diode across actuator terminals as this device is most probably inductive in nature and switching it off causes large voltage spike in opposite direction than your supply.

  • \$\begingroup\$ After reviewing the later included datasheet of the actuator you most definitely need a flyback diode across this actuators. as they contain DC motor which mechanically transfer motor rotary motion into linear. \$\endgroup\$ May 19 at 11:43
  • \$\begingroup\$ Hello @KASPAROLDENDORFF Aren't these flyback diodes you are speaking about those 2 diodes I added between the relays control pins (yellow and green wires) and 5V? Shall I do differently? \$\endgroup\$
    – Fracchie
    May 24 at 16:59
  • \$\begingroup\$ @Fracchie you have correctly placed the RELAY coil flyback diodes. they will stop the relay coil from creating reverse voltage when its magnetic field collapses. But you have to place additional flyback diode to ACTUATOR coils. Best is just to put a diode on the lowest RED-BLACK wire pair as they supply the actuator. \$\endgroup\$ May 25 at 12:23
  • \$\begingroup\$ Ah ok, thanks @KASPAROLDENDORFF :) My question is: being the actuator supplied in both directions depending on the direction of motion, will I need 2 of them? Or, as you say, looking at my circuit, a diode between 12V and 0 on the breadboard will do the job? - As suggested by some of you, I went reading the datasheet of the L7805, and indeed they suggest a 0.33uF at the input, and 0.1uF at output. Far from the relative capacitance value I added with the few 10nF ones I had available. I will have to get a stock of them... \$\endgroup\$
    – Fracchie
    May 25 at 21:43
  • \$\begingroup\$ @Fracchie the supply reversing to the actuator is done by the relays. But the powersupply polarity stays the same. One diode will do just fine, as i said on the lowest RED BLACK wire pair. think about it, if you put two you will create a short! \$\endgroup\$ May 26 at 4:04

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.