Reverse Engineer My Magic Box
November 18, 2008 9:11 AM   Subscribe

What is inside this magic box?

I thought my cannibalized drill worked like this but I'm realizing that's wrong. For one thing, it changes speed depending on how much you squeeze the trigger. For another, the current must be being limited somehow. The battery is 15V, the motor is .1 ohms but the label only says 20-25A.

I was only able to get the magic box open far enough to find a T0-220 package and a glimpse of circuit board. The package could be a power transistor, but 25A in a T0-220 package?

Googling the part number on the package was inconclusive as I found no datasheets. But I did find one forum post in Russian. It looked like the guy was saying it was an 8A transistor. So maybe the 25A is startup that the transistor can handle and then it runs at or below 8A? Or maybe the 25A is a lie from the getgo?

If so, this is good news of a kind. Instead of this Rube Goldberg arrangement I could (presumably?) drive the transistor directly from the Arduino. And I would also gain speed control. If this is the case, how do I mount a bare power transistor? Can cheap perfboard handle it?
posted by DU to Science & Nature (24 answers total) 2 users marked this as a favorite
 
Yeah, basically some sort of potentiometer. Think of it like plugging the naive version into a dimmer switch.
posted by niles at 9:22 AM on November 18, 2008


Response by poster: Just a pot won't do it. If you consider the I2R heating that will take place, putting a pot in place of the switch would melt it.

But maybe you are suggesting a pot controlling the input leg of what you are implicitly also claiming is a power transistor?
posted by DU at 9:28 AM on November 18, 2008


And I love your pictures. That's awesome.
posted by niles at 9:28 AM on November 18, 2008


Look, as much as it pains me to do so, I'm gonna have to link to Yahoo Answers.

Here's someone who looks like they know what they're talking about:
The variable speed feature on a hand drill is made with a special kind of device called an SCR or Silicon Controlled Rectifier...
Speed control is more than just changing the voltage, the variable speed drive alters current, frequency and voltage to get a smooth linear response to changes in speed.
posted by niles at 9:32 AM on November 18, 2008


A SCR is a type of thyristor which is basically a transistor with an extra layer on it. They look like transistors in the packaging but they aren't.
posted by GuyZero at 9:47 AM on November 18, 2008


Tools like this use a "universal motor". Blenders, vacuums, drills, circular saws, etc. Anything that's light, powerful and loud.

It probably uses a circuit where it adds resistance to the motor to make it slow down. Not resistance to the whole supply, but just to a part of the motor so you aren't controlling the whole load.
posted by gjc at 9:52 AM on November 18, 2008


We need more information... could you post pictures of the splayed open drill?

I'm betting the "trigger" moves a potentiometer, which is used to modulate the pulse width of a simple oscillator (like a 555-ish deal), altering the duty cycle of power delivered to the motor. Find out what's driving the SCR, splice you're arduino in there (arduino's have built in PWM libraries) and you should be good to go.
posted by phrontist at 9:52 AM on November 18, 2008


...and as is frequently the case with Yahoo Answers, they're about half right.

Is it an AC motor or a DC motor. If it's DC (most of the drills I've disassembled have been battery-powered, with DC permanent magnet motors), then your magic box likely includes one or more SCRs (or TRIACs, if there's AC switching going on), but it isn't an SCR.

It more likely is a series of circuits that perform Pulse Width Modulation. (wiki). I've generally seen these magic boxes referred to as DC Motor Controllers, and they're readily available wherever robotic, battlebot, or remote-control car equipment is sold.

They mimic the effects of a potentiometer/variable resistor, but they do it in a much more efficient way... instead of impeding the flow of electricity (and getting hot hot hot), they switch it on and off while varying timing between the pulses. To the simple motor, it looks more or less like the voltage is varying... but that's not really what's going on.

Do you have access to an oscilloscope?
posted by toxic at 9:58 AM on November 18, 2008


Oh, and a SCR of that size seems plausible to me... does the motor have a power rating on it? A current rating alone doesn't tell you all that much in terms of power consumption for an electromechanical system like that.
posted by phrontist at 9:58 AM on November 18, 2008


Response by poster: The drawing *is* a picture of the splayed open drill. There's a battery, a motor and a magic box.

The variable speed feature on a hand drill is made with a special kind of device called an SCR or Silicon Controlled Rectifier..[which] alters current, frequency and voltage to get a smooth linear response to changes in speed..

I don't care about linear response to changes in speed. I'm only going to be turning it on or off. (The reason I care about speed control is that I'd like it to be slow when I do turn it on.) Does that mean I can use a power transistor or do I still need the SCR? Or is that basically different names for the same thing? (I'm a completely amateur n00b...)

My original design had a relay but no magic box. But when I almost melted my workbench I realized that I needed some current limiting. A resistor won't work, which led me to examining the magic box.
posted by DU at 10:02 AM on November 18, 2008


Response by poster: There's a half-faded label that says 20A.

I have no oscilloscope.

It's a DC motor.

...DC Motor Controllers, and they're readily available wherever robotic, battlebot, or remote-control car equipment is sold.

I've seen these around, but if you read the fine print they are always like "up to a full 1A!" and I'm like "pffff". Now granted, the drill motor is overpowered for what I need (probably). But I tried a few motors prior to this up to 1.5A and they didn't do the job.
posted by DU at 10:12 AM on November 18, 2008


Response by poster: Not gearing per se but pulleys, yes. In a way it's a better fit since I want the device to move *very* slowly. But it wasn't quite enough and I hesitate to make the mechanics too elaborate for an all-weather, unattended item.
posted by DU at 10:56 AM on November 18, 2008


Can you post a photo of the actual part of the magic box you can see? or the part number on the transistor/SCR?
posted by GuyZero at 11:26 AM on November 18, 2008


I would guess the trigger is a potentiometer. If so, you can measure the resistance at a good speed, and hardwire a resistor of the same value in series with a switch (or relay) for an on-off control. Just use the magic box and don't worry about the details.

That's the lazy engineer's approach, anyhow.
posted by JMOZ at 12:03 PM on November 18, 2008


Seconding toxic. It's almost certainly a Pulse Width Modulation circuit, and not an SCR.
posted by rocket88 at 12:10 PM on November 18, 2008


If it's running from batteries, it's not an SCR. SCRs are for use with AC power; they turn on with an input pulse and turn off when the AC waveform crosses 0V. With a DC input like a battery, an SCR will not turn off.

25A is quite possible for a MOSFET in a TO-220 package, properly heatsinked. For instance, this one will do 45A, reduced to 37A when the case temperature rises to 100C. At 25A current and 13mΩ on-resistance it dissipates about 8W which is not hard to manage with a small heatsink like this one which is 4.4℃/W according to a print catalog.

I know, that still doesn't answer the question of how to run it from a microcontroller's logic-level signal.
posted by jepler at 12:21 PM on November 18, 2008


Here's a kit that claims it can handle up to 16A if you beef up the wiring.

If you need an all-weather gearing solution, you could use plastic gears on metal shafts that rotate in nylon bushings. You could probably store the whole thing in an electronics project box, no problem.
posted by backseatpilot at 1:28 PM on November 18, 2008


I would say Phrontist is right- You have a potentiometer controlling an oscillator that modulates the DC signal (in pulses) to regulate speed without generating lots of heat, which just running the 15V through a pot would do.
posted by dunkadunc at 1:38 PM on November 18, 2008


Best answer: if you read the fine print they [the motor controllers] are always like "up to a full 1A!"

You're likely looking in the wrong places.

Here's a simple H-Bridge controller that should take the PWM output of your Arduino, and control a motor up to 6A continuous, 25A peak.

There are much more powerful units here.

And when you want to go really big? The units spec'ed for electric vehicles can easily handle 500A and more.
posted by toxic at 2:35 PM on November 18, 2008 [1 favorite]


Response by poster: The T0-220 package says, and I quote, "M0305512" and "H0 *spaces* 22".

Here's a simple H-Bridge controller that should take the PWM output of your Arduino, and control a motor up to 6A continuous, 25A peak.

Awwwwwyeah. This site is da bomb. And similar phrases of awesomeness. I assume the datasheet (!) will tell me how to hook it up to a uC? Oh here it is in section 3.5. PWM logic signals. Hells of yes.
posted by DU at 2:47 PM on November 18, 2008


PWM, incidentally, allows you to get maximum torque at even slow speeds. A pot, or rheostat or any other device that reduces peak current to the motor wastes power and decreases motor torque.

If you listen to your drill motor, you will hear a squeal, whose frequency does not change but whose volume does, proportional to the degree that the motor speed increases.

PWM rocks for DC motor control. The H-bridge lets you reverse polarity to the load (motor) without using mechanical switches.
posted by FauxScot at 4:39 PM on November 18, 2008


One more thing... if you monitor the average current through the motor and you know the torque constant of the motor and the armature resistance, you can calculate the speed of the motor. As it speeds up, it creates a back-electromotive force (BEMF) that opposes the applied voltage. At maximum speed, unloaded, the motor actually consumes the minimum current. When it slows down (such as from a load), the lower BEMF allows more currrent to flow, making the motor resist slowing down. It is a really cool thing about DC motors. Some H-bridge circuits incorporate low side resistors for making the current measurements.
posted by FauxScot at 4:44 PM on November 18, 2008


late to this party, but to address your question about current: while the motor may only be 0.1 ohm (surely this depends on load, speed or whatnot, but whatever) - a battery is not a perfect voltage or current source.

batteries have an internal resistance, which is fairly easy to measure with a meter and a resistor and some basic circuit math. the resistance can vary depending on battery type and condition, but i think they are typically on the order of half an ohm. this is probably where the 20-25 A number is coming from (not the magic box, at least, not at full trigger).
posted by sergeant sandwich at 11:32 PM on November 18, 2008


Response by poster: I don't actually need to know the speed, but thanks for the tip in the future.

Internal resistance: Good idea, although when I actually did hook up directly to the motor the wires (14 AWG) got warm, so I think that's not the whole story.
posted by DU at 7:09 AM on November 19, 2008


« Older And I especially like the sweet black beans   |   Help me figure out how to deal with my... Newer »
This thread is closed to new comments.