I'm pretty new to electronics, but have been successfully working with a Spark Core (www.spark.io) and some simple drivers/circuits for now. That said, I've run into a problem.

I have a Spark Core powered from a 9V power source, via a 5V regulator (LM7805) with the necessary caps between supply and out lines and ground (as per the LM7805 datasheet). The same 9V powers a motor (LEGO PowerFunctions) via a SN754410 dual H-bridge (getting its VCC from the 5V line). The Spark Core controls the SN754410 via 2 PWM signal lines, each with a 10kOhm resistor. This all works fine (meaning I can make a motor turn forward/backward, and control rotation speed using PWM).

I also have a mini RFID reader (this one: http://www.seeedstudio.com/depot/Mini-125Khz-RFID-Module-PreSoldered-Antenna-35mm-Reading-Distance-p-1722.html?cPath=19_24) connected to the 5V line, as well as to the TX and RX pins on the Spark Core. This works fine in isolation as well - it detects tags at 3-5cm distance (1-2cm if powered from the 3.3V off of the Spark Core), and nicely reports tag ids.

All circuits share the same ground, coming from the 9V power source.

The problem starts when I have AND a motor running (via PWM) AND try to use the RFID tags - the motor will run but the RFID reader does not see any tags. As soon as I bring my PWM signal down to <10 (out of 255), the RFID reader starts picking up tags again.

Here's what I tried: - I have tried putting an aluminum foil cone around the RFID reader's antenna, to no avail. - I have tested at PWM signals 200, 150, 100, 50, 10, 5 and 0. Only at 5 and 0 do I get RFID tags read. - If I disconnect the motor, but still set my PWM signals, the RFID reader works fine.

This all leads me to assume I have some interference in my circuit, caused by the motor. I'm thinking I should probably put some resistors or caps in some of my wiring, but I'm not sure. I need some guidance. Here is a rough schematic of my setup:


simulate this circuit – Schematic created using CircuitLab

upon request, here are a few pictures of the mess that constitutes the circuit in question :) :

breadboard image 1breadboard image 2breadboard image 3

BTW, the two blue (-) bars on my breadboard (GND) are connected together via a white colored wire. One red bar (+) carries the 9V supply, the other red bar carries the regulated 5V.

How do I go about eliminating the interference that prevents my RFID tags from being read when the motor runs?


  • 1
    \$\begingroup\$ Got any decoupling caps on your power rails near your components? How about a picture of your setup? Are you just using wires to connect everything? \$\endgroup\$ Commented Nov 13, 2014 at 0:39
  • \$\begingroup\$ added a few pics as an edit to the original post \$\endgroup\$
    – Phil B.
    Commented Nov 13, 2014 at 1:53
  • \$\begingroup\$ Do you have a scope have you tried looking at what is happening at the power pin of your module when the motor turns on? I didn't see any decoupling caps at the module or anywhere really. We could talk about all those long wires but that's probably not where you want to go. \$\endgroup\$ Commented Nov 14, 2014 at 4:25
  • \$\begingroup\$ I am going to add some 0.1uF caps between my ICs and ground - will report back on my findings \$\endgroup\$
    – Phil B.
    Commented Nov 14, 2014 at 16:47
  • \$\begingroup\$ Added 0.1uF caps for every IC connected to the 5V supply (but ran out of 0.1uF caps so did not put a cap between the 9V supply on the SN754410 and ground) - made no difference :( \$\endgroup\$
    – Phil B.
    Commented Nov 14, 2014 at 19:38

1 Answer 1


At the very least, you're going to have to put some capacitors across the motor terminals, AND from each motor terminal to its metal case. Even the cheapest toys have such capacitors, or they would get in trouble with the FCC pretty quick. In addition, you're going to have to consider the fundamental frequency of the PWM signals you're feeding the H-bridge, along with all its harmonics. These harmonics will vary from "all odd" harmonics with a 50% duty cycle, to a complex blend of even and odd harmonics near the very low and high duty cycles. Chances are one of these harmonics is at or very close to the frequency your RFID reader is looking for.

  • \$\begingroup\$ Randy, thanks ... any suggestions to what capacitors to use? the motor is a LEGO Powerfunctions motor - i believe it has its own caps inside. there is no metal to connect to though, these motors are assembled units inside a plastic enclosure. i'm looking up the base frequency of the pwm signal separately, will report back. \$\endgroup\$
    – Phil B.
    Commented Nov 13, 2014 at 1:57
  • \$\begingroup\$ according to docs.spark.io/hardware, the base frequency is 500 Hz. My RFID tags work at 125kHz (LF tags) and they are passive tags. \$\endgroup\$
    – Phil B.
    Commented Nov 13, 2014 at 2:02
  • \$\begingroup\$ OK, the freg. is high enough to "probably" not be the problem, so that leaves the motor. But always try to cut the problem in half when troubleshooting. Put a resistor of compatible load in place of the motor. If the interference goes away, it further points to the motor as the culprit. Motors can be notoriously noisy. Start with .01 caps, 100VDC. The plastic motor will limit your shielding options. Ultimately you may have to wrap it in foil. Also, get an old AM radio at a thrift store. You can tune it to the frequency you're trying to receive, and use it as a test instrument. :-) \$\endgroup\$
    – Randy
    Commented Nov 14, 2014 at 3:48
  • \$\begingroup\$ Ok so I know (from here: philohome.com/motors/motorcomp.htm) that the motor draws 0.38A when supplied with 9V, so if I recall my physics classes correctly, that means it represents a R = V/I = 9/0.38 = 23.7 Ohm resistor. I assume that if I put two of these babies in series I get roughly 20 Ohm - am I on the right track here? radioshack.com/10-ohm-10w-10-wirewound-resistor-2-pack/… \$\endgroup\$
    – Phil B.
    Commented Nov 14, 2014 at 14:59
  • \$\begingroup\$ Yep, that should work. If the interference goes away, it proves the motor is the culprit. If not, don't feel bad, because you just learned an important lesson in troubleshooting - cut the problem in half. Unexpected results are common, proving another big axiom - "Truth is stranger than fiction, because fiction HAS to make sense". :-) \$\endgroup\$
    – Randy
    Commented Nov 15, 2014 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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