Current Clamping Code and Hardware

Is it possible, using a form of ammeter (inductive or otherwise) connected to the RC monitor the current passing through the victors to the CIM’s to limit the current enabling a higher gear ratio and top speed without worrying about tripping the 40A breakers?

  • Bochek

dont worry, you probably wont trip the breakers for the CIM’s. i’ve never tripped them before. i’m sure your idea will work, but personally i dont see the need for it.

Allego Microsystems has a number of current sensors with different ranges.

If you don’t want to use them, a toroid inductor around the supply wire will give you an indirect measurment of current flowing through the wire. Keep in mind that this output will be polar, so you’ll need to bias it to get the data into the RC with validity.


This is something i always wanted to play with while i was on a FIRST team but never had time.

A few years back some hall effect current sensors were included in the kit. As mentioned earlier they were manufactured by allegro micro. You might want to look into those. The other thing you could look into is called a current shunt. Its basically a resistor of negligible but precise resistance. You measure the voltage drop across it to figure out the current going through it. It would probably take a little bit of added circuitry to isolate the signal and take advantage of the full input range of the RC. The allegro transducers on the other hand can be directly hooked up to the RC. With ALOT of cleverness you could figure out current using a speed sensor.

I guess the first step is to figure out why you would want to clamp current. Torque from our motors is directly porportional to the current flowing through them. It we are trying to push someone really hard we want all the torque we can get. We thus want all the current we can get. The problem is, if we use too much current, we trip the breakers which leads to no torque at all until they reset. If you can limit current you can get the most torque out of your motors. What you want in a pushing match is a way to operate as close to tripping the breaker as possible.

Now the real question is how would you implement such an algorithm. This is not as straightforward as it sounds. Bear with me.

The amount of time it takes the breakers to trip depends on how much the current exceeds the breaker rating by. You can find the datasheed for our breakers here

Taken from the datasheet:
150 % overload = 3.9 - 47 seconds
175 % overload = 2.2 - 9.2 seconds

  • 200 % overload = 1.5 - 3.9 seconds
    250 % overload = 0.8 - 1.8 seconds
    300 % overload = 0.5 - 1.1 seconds
    400 % overload = 0.3 - 0.6 seconds
    500 % overload = 0.2 - 0.3 seconds

Lets use a CIM motor for this example.
under full stall, it draws 133 amps. It must be connected through a 40 amp breaker. We get the following trip times for the cim at different loads. If you do at little math, you arrive at a startling table of % motor load vs breaker time. % motor load is taken as %torque/current of max.

30.8% - indefinately
45.1% - 3.9 – 45 sec
52.6% - 2.2 – 9.2 sec
60.2% - 1.9 – 3.9 sec
75.1% - .8 – 1.8 sec
90.2% - .5 – 1.1 sec

You don’t just want to limit yourself to 40A. This would just unnecessarily limit your power output. you are going to have to have a fairly complex algorithm that takes time into consideration. you will also have to figure out a way to reliably limit your current consumption

your problem is threefold:
1.) Figure out what your current is
1.) figure out what you what your current to be
2.) figure out how to get your current to be what your want it to be.

Cool Idea!

Allegro makes good parts, as the last two posts have pointed out.

Another source you might want to consider is GMW Associates. I haven’t tried them yet, but they look interesting:

A “better” method of current limiting might be to just inform the driver that she is about to pop a breaker. Remember to include an over-ride if you do close the loop in software. A driver might need that little extra oomph, even if it means popping breakers a few seconds later.

MaximIC also creates a few, I used a high side current sensor from them a few years ago when making an active load for a solar panel. I can probably find the schematics and code if someone is interested.

The toroid pickup only works on AC current, no transformer action takes place on DC (except in the transition during power ON). We used the Maxim high side current monitor with a one foot piece of #10 as the sense lead. (a sense wire at each end. Ironically, 100 amps in 1 foot of #10 is 0.1 volt drop.)
As Jim has pointed out, the circuit breakers are very forgiving and auto reset. You might want to consider a software/control switch. Design the mechanical system for a lower speed at something less than full throttle. Then with the push of a button on the joystick, apply full power for top speed. Highest currents are usually encountered when starting, when changing directions, or when pushing. However, sticky tires and tank drive push currents to near stall on all drive motors when turning. I expect to see some effects of this during the game this year due to the mandatory turns in the game.