No announcement yet.

Motor Capacitors

  • Filter
  • Time
  • Show
Clear All
new posts

  • Motor Capacitors

    What is the best practice around adding capacitors to suppress electrical noise from motors in scratch built cars?

    I ask because I've been working on an Arduino based lap counting system, and I've noticed that the cars I have with no caps cause major problems with the timing system (the EMI causes the system to count extra laps).

    Has anyone else experienced this?

    For proxy races, do you go ahead and put them on? Or, if you run a proxy race do you require people to have them?

  • #2
    You only need a very small capacitor to suppress electrical noise -- a few microfarads should be enough.

    You do not want to use a large capacitor. If the capacitor stores a significant amount of energy it might allow the motor to run longer when you shut off the power.

    Don't use an electrolytic capacitor. They tend to store more power, plus they are polarized -- they have a 'plus' and a 'minus' and should not be installed backwards.

    Ed Bianchi


    • #3
      You need more than just a capacitor to suppress the RFI. Scalextric cars use a capacitor and a ferrite slug. The slug has two holes for the motor leads. Carrera cars have both capacitors and inductors (chokes). The capacitors are wired in parallel with the motor and the chokes are wired in series.
      People that are running analog tracks will often remove all of the filter stuff. The chokes that Carrera used to use sometimes failed and left your car dead in the water. I should have some of the Scalextric filters hanging around. I am not positive of what the value of the capacitor is, it is in the picofarad range I believe. The number on the Scalextric cap is 103 and the latest Carrera motors use a 223 capacitor.
      Last edited by RichD; 11-13-2018, 02:33 PM.


      • #4
        The whole point of the capacitors is to suppress sparks at the commutator. Sparks create radio waves. (Really early experiments with radio used sparks to create their Morse-code signals.)

        It is the sudden breaking of an electrical current that causes the sparks. That current has a momentum (inductance) whose energy has to go somewhere. Its best option is to jump across the gap that just broke the circuit -- a spark.

        But a capacitor provides an alternate path. A capacitor will allow that frustrated energy to go directly to the ground wire. Spiky, noisy electrical energy will go through a capacitor easily. But steady DC power won't go through.

        The immediate result of adding a capacitor across the motor leads should be a noticeable decrease in the sparking at the motor's commutator.

        Kids! Try this at home!

        Ed Bianchi

        PS - Another benefit of reducing the sparks is that the commutator brushes will last longer -- less 'spark erosion'.
        Last edited by HO RacePro; 11-13-2018, 10:35 AM.


        • #5
          I have found that adding a small capacitor across the power connections to the track prevents any false laps triggering, on the Ardunio. Also if you are using Race Coordinator you can increase the debounce time.
          I use capacitors removed from RTR cars
          This saves having to add capacitors to all your cars.


          • #6
            Thanks for all the feedback guys. It sounds like adding the caps to cars is relatively common.

            I made a pretty snazzy little box and built up an Arduino timing system. I'm using dead strips with success, although I'm using the "single side" version, where one motor brush bridges a gap to detect the car (as opposed to going through the motor).

            However, I have found that the Arduino is VERY sensitive to noise from the cars. I'm using hardware interrupts to monitor the dead strips. This is a much different animal than just rolling through all the inputs in the main loop and polling them. The setup is so sensitive, it counts laps for some cars without even being plugged into the deadstrips. The worst car I have for EMI is an old Carerra Go! Nascar that has no filtering on the motor. I have a pair of 3D printed cars with random motors in them that are also pretty bad.

            I've played with adding capacitors to the track, but I suspect they were all too large. I made up a bank of a 1, 50, and 220 microFarad capacitors and put identical sets on each lane. This had no impact.

            I wanted a "stand alone" system, so it has a 20x4 LCD and 4 buttons to interact with it. It works great on my bench, but when I took it out to the track it was a mess. It was picking up everything. My intent was to be able to just set it wherever on my slotcar table, as I have a plastic track that we are still fiddling with the layout on.

            So, I added a 100 picoFarad capacitor across the motor terminals on the Nascar. It didn't seem to help much. I also added a 1000 picoFarad capacitor to my bank of and capacitors, but this also didn't seem to matter.

            I ordered a grab bag of snap on style Ferrite Chokes on Amazon and just went nuts with them. I put chokes on both ends of all the wires as well as added chokes to each rail of each lane. Something like 10 chokes total. This far and away made the most improvement. I was able to run 40 passes on a little test track I setup without a false trigger. When I started troubleshooting I was double counting nearly 100% of the time. I'd count laps on both lanes even though only one dead strip was even connected to the timing system. Box stock Carerra Go cars worked fine though. You could run those all day and never have any false triggers.

            I may go back and try a smaller capacitor on the car as well as on the track capacitor bank. I'm definitely on to something with all the chokes. I need to do some searching to see if I an find the little inductors they use on the cars.

            If I'd had known how painful this was going to be at the outset, I don't know if I would have taken it on. But now I'm so far into it, it is hard to turn back.....


            • #7
              Have you done anything to shield your electronics? It could be they are picking up electrical noise transmitted 'through the air'.

              Remember the power conductors in the track itself can be large antennas, both for transmission and receiving. In fact you may be hurting yourself by not using traditional dead strips for your lap counter. Isolating the sensing strips from the rest of the track could help a lot.

              You probably know about proper shielding, but just to summarize, all the electronics should be contained in a metal box, with the box shell grounded. Wires going into and out of the box can have ferrite chokes on them. Better yet, be shielded cable. Still better, coaxial cable.

              Other thoughts...

              You can use a 'one-shot' with a timed reset for your detection circuit. That should prevent multiple counts.

              Watch out for 'ground loops' -- they are notorious sources of electronic weirdness. All grounds and shielding must be directly tied to one, common ground. Ideally a true earth ground. (I once helped debug a flailing multi-million dollar system by suggesting it be checked for ground loops. Not only were several discovered, a few 'floating' grounds were found too! With those fixed, all the weird electrical issues went away.)

              Breadboarding is great during development, but, especially in the digital world, you need to practice good electronic hygiene!

              Ed Bianchi
              Last edited by HO RacePro; 11-14-2018, 02:10 AM.


              • #8
                I don't know if you have seen this article on dead strips:
                I have never run an a track that used an Arduino board, so I have no direct experience with those. If you are adding RFI filters and don't want to put them in the cars I would expect that they should be located right at the inputs of the Arduino board. It might help to have the board in a grounded metal enclosure.


                • #9
                  Originally posted by Cdub View Post
                  ... I've been working on an Arduino based lap counting system, and I've noticed that the cars I have with no caps cause major problems with the timing system (the EMI causes the system to count extra laps).

                  Has anyone else experienced this?
                  Several places use an Arduino connected to Race Coordinator with no capacitors or any other EMI suppression components in the car. At most places that works fine. I've been told there have been a few problems at one or two tracks, apparently they had to do some work with their Arduino set up to fix the problems. (I'd like to help more, but I don't have details of exactly what they did to fix it)


                  • #10
                    Another thought

                    Originally posted by Cdub View Post
                    What is the best practice around adding capacitors to suppress electrical noise from motors in scratch built cars?

                    I ask because I've been working on an Arduino based lap counting system, and I've noticed that the cars I have with no caps cause major problems with the timing system (the EMI causes the system to count extra laps).

                    Has anyone else experienced this?

                    For proxy races, do you go ahead and put them on? Or, if you run a proxy race do you require people to have them?

                    Some very articulate replies here, but if it is just for your own track, check whether your USB cable connecting to the PC has a ferrite slug on it
                    I was building Uno and Mega board based systems for RC for a while, and I noticed that I would intermittently have similar issues.

                    Switching to a USB cable with a ferrite slug solved the problem, or at worst, adding another slug like these

                    Most of my cars and guys I race with have had a lot of RF stuff removed from the motor
                    We have one of those Uno systems in our own club and it never blinks.

                    Also, you didn't mention whether you are using light sensors or dead strip - dead strip with Uno, particularly where you don't have buffer zones, could be an issue.

                    All worth checking and eliminating.
                    Last edited by SlotsNZ; 11-14-2018, 06:08 PM.


                    • #11
                      Thanks for the link to that document. I know I've seen it before, but of course couldn't find it a second time.

                      My set up is like the "inline" setup. So, it is a true dead strip in that sense. The car isn't powered and both rails aren't connected to the track system. I have pretty good size buffer areas on both sides.

                      My wiring is very similar to what is shown for the Arduino wiring (no optocoupler). I don't have R2 in place, and I've tried a bunch of different capacitors with little effect. Also, I'm using pins 2 and 3, as these are the hardware interrupts. The zener diode is there to protect the microcontroller input from accidental contact with track voltage.

                      There is no PC in my setup. I may start a different thread about my build, as this has gotten pretty far from the original topic. But, it's my thread so I guess it's okay.

                      There are a few things I'm doing different than most setups that are likely the cause of my problems. The box has the Arduino, the display, and pushbuttons to interact with the timing system integrated into it. The box is literally sitting such that the Arduino is maybe one inch away from the track. I suspect most people using a computer have the Arduino next to the computer, several feet from the track.

                      I have done what I can for EMI shielding in the box, but by design it was full of big holes for the display and the connectors. I lined it with 0.01 brass sheet and soldered wires between the pieces, then soldered a wire to one panel and ran it to ground.

                      Most examples of people using photoresistors have them wired to an analog input and do an analog read. The Arduino doesn't support analog reads as interrupts, so by definition they will never have the issues I am having.

                      The pushbuttons are on digital inputs, but they aren't interrupts in my setup. They just get polled in the loop. I never have trouble with false pushbutton inputs, because in order for that to happen EMI would have to hit the pin at the exact instant it was being polled, which is a very low probability. So low, it hasn't happened not one time on my bench. If I were handling the deadstrip the same way, I wouldn't have these problems.

                      The problem I would have is the possibility of missing a lap while I was updating the LCD. That is relatively slow. I only do it once per half second, so it might be fine. I had never done a project with interrupts before, so I'm learning here.

                      I used anderson powerpole connectors for the connections to the box. I like them because they can be color coded, polarized, and they are easy to push together and pull apart. However, they are physically large, both the metal crimped on bit and the connector shell. In practice, each of my connectors is a giant antenna which is a problem when it is 2 inches away from the track.

                      There is a major convergence of factors here that is causing what I'm seeing, no doubt. I just found it amazing that the "stock" cars had virtually no issues with this, but the modified and scratch built cars were a total disaster.

                      So, back to my original question, it sounds like most people aren't putting EMI suppression on their scratch built cars. If I wanted to use this system in a proxy race someday, I'd need to figure out how to make it resist EMI. However, it does sound like a few folks have made an attempt to put some filtering on their track power supply, which is good to know. The capacitors referenced as used on Carrera and Scalextric cars 103 and 223 are only 10 nanoFarads 22 nanofarads respectively. These are quite small compared to some of the capacitor values you see recommended for filtering in these applications. For example, the Dead strips PDF suggests a 10 microFarad capacitor. For filtering purposes, the smaller caps may actually perform better.

                      For this version of the system, I'll just focus on adding enough ferrite beads to make it work with most cars. Version 2 (if I get around to it) will break the components up into separate enclosures, with the Arduino in an aluminum enclosure that can be placed away from the track. Cat7 ethernet cable has shielded twisted pairs and the bundle is also shielded. I'll probably use ethernet cable and that style of connector instead of the powerpoles.


                      • #12
                        Let's loop all the way back to the beginning...

                        Did you need to create your own lap counter in the first place?

                        Take a look at my thread Inexpensive Droking Lap Counter. You can use the forum search tools to find it.

                        I'm not saying the Droking unit is the best possible solution, but I seem to have had a whole lot less problems with it. You might just invest a few bucks in a unit to test, and see if you still want to roll-your-own lap counter.

                        Ed Bianchi


                        • #13
                          I just checked eBay, and didn't find the Droking brand counter. I did find a similar electronic counter. At about half the price!


                          I've not tested this unit. But if it works as well as the Droking unit did, it is the cheapest lap counter I have found to date.

                          Ed Bianchi


                          • #14
                            It is very gratifying if you can build your own lap counter, the other side of the coin is that it can be very frustrating if you can't get it to work properly. Some people never get their homebrew system to work. At least yours works with cars that have RFI filters, so the short term solution is to have the filters in all of your cars. If you intend to have formal races on your track other people may not bring cars with filters and that would be a problem.
                            Your cars can generate RFI two ways. Both the motor brushes and the pickups can generate sparks, the RF from the sparks can be conducted through your track wiring and even to your house wiring. The RF can also be transmitted through the air and any nearby wires will act as antennas. Having filters on the cars eliminates both modes of transmission, otherwise the are many possible ways that interference can get to your electronics. Possibly the Arduino unit itself has poor shielding. If it was me I would move it further away from the track just as an experiment. If the unit itself is acting as a receiver then no input filter is going to work and having filters on the cars might be the only solution.


                            • #15
                              Motivation on this project is a funny one. I wanted more than a lap counter, as in I wanted some basic timing functionality too. If I just wanted laps, I'd have been okay with the mechanical clicky counter.

                              However, I didn't want to have to hook a computer up to the track either. I like slot cars because there is no computer, no screen, no swiping. I like the analog aspect of it. You plug it in and pull the trigger. No software updates, no wifi password, no software drivers and comm ports to fiddle with.

                              I'm okay with a notepad and pencil for data collection, so I just need the timing.

                              I've done a few Arduino projects before, and this seemed to be pretty straightforward. Honestly, I thought the LCD and the menus would be the hard part for me (as I hadn't done that before).

                              I have experimented with a few more things the last couple of nights. I hadn't seen the Race Coordinator software before, nor any of their documentation. I took a look at their stuff and indeed they recommend doing it the smarter way. That is they are using light sensors and analog reads. They are getting tons of "debounce" and interference rejection for "free" by doing that. I may very well follow suit and make a version of my software to take the same approach.

                              The circuitry described in the deadstrip wiring pdf is interesting. Schematically, what I had been doing was similar, but I was using much lower values for the resistors (R1 = 1000 and R2 = 0). As I mentioned I had tried several capacitors as well. So, I dug through my electronics box and set mine up the way that document shows. It isn't clear if you are supposed to configure the input with the internal pullup resistor or not. Since it appears the dead strip is grounding the GPIO pin I tried it with the pullup resistor on. I couldn't get it to count any laps this way, even bridging the gap in the strip with a screw driver.

                              Of all of the things I've tried, the best performing has been to use a pull down resistor on the GPIO pin, and then run Vcc out to the "dead strip" and feed that 5 Volts into the GPIO at the strip. Again, I'm using the inline stirp configuration so one brush is simply bridging a small gap.

                              In this configuration, the entire GPIO leg is attached to ground through a 1kOhm resistor. The other leg is tied to the output of a voltage regulator. Even with this configuration, I still had to put every ferrite choke I could fit on every single and power wire in the system. But, this was far and away the most robust configuration I've tested.

                              However, I really don't like having the Arduino 5V supply just hanging out exposed like that. it wouldn't take much to accidentally ground it out and potentially damage the controller.

                              FYI, another thing that isn't obvious from the pictures is that the board I'm using to tie everything together is a through hole protoboard that has all the traces in it that a breadboard has. It's pretty convenient when you are soldering things up, as you can take your breadboard design and just transfer it to the circuit board and solder everything in place. In reality, all of those traces in the PCB are just antennas, further aggravating my EMI issues.

                              This whole thing has been wildly educational, if a bit painful.