Show Posts
Pages: [1] 2 3 ... 17
1  Using Arduino / General Electronics / Re: Intermittent problem with battery -- pulling too much current or too much noise? on: April 13, 2014, 04:38:32 pm
Have you got good decoupling on your supply?

No, I had no decoupling on my supply. There are two USB ports on the battery. The line to the servos came out of one port while the line to the Raspberry Pi came out of the other. I'm not sure whether the two USB ports are decoupled inside the battery, but I added no decoupling.

To solve the problem without using an extra battery, I think I'll get a UBEC to power the servos off the 9.6 Volt traction battery.
2  Using Arduino / General Electronics / Intermittent problem with battery -- pulling too much current or too much noise? on: April 13, 2014, 03:37:04 pm
I stripped down and replaced the electronics on a model car. Now I've got a Raspberry Pi on the car, which communicates with a laptop computer via a Wi-Fi adapter to get steering and throttle signals. (There are no brakes.) The Pi then sends a signal to an Arduino Uno which drives two Hitec HS-325HB servos to steer the front wheels (one servo for each wheel) and controls a Pololu Dual VNH5019 motor driver shield that drives the rear wheels.

I have two batteries on board. One battery is a 9.6 Volt nickel metal hydride battery that drives the rear wheels, through the motor drive shield. The other is a Duracell Powermat GoPower Longhaul backup battery, which is a 5 Volt, 8800 mAh lithium ion battery that says it can put out 2.1 Amps over 2 USB ports. I use the Duracell battery to power the Raspberry Pi through one USB port and the two servos through the other USB port. The Pi then powers the Arduino Uno and the Wi-Fi adapter through the Pi's USB port.

The problem is that the Raspberry Pi will sometimes reset while I'm driving the car. It usually happens after two or three minutes. The car will stop working, and it looks like the Pi reboots itself. (It's hard to tell exactly what the Pi is doing, since I am monitoring it on the laptop using Window's Remote Desktop Connection and the Wi-Fi connection simply goes dead.)

To see what causes the problem, I added a third battery. That battery, also a lithium ion 5V battery with a USB port, powers just the servo motors. So the servo motors are now powered by a separate battery from the Raspberry Pi. That seems to solve the problem. I can now run the car for many minutes with no problem.

To me, that indicates that the problem is one of two things: I'm pulling too much current from the battery so the Raspberry Pi resets, or I'm getting too much noise on the line so the Pi resets. If it is one of those problems, I wonder which one. I'm not sure how to tell.

As far as current drain, the servo specs say that the current drain at 4.8V is 7.4mA/idle and 160mA no load operating. With the two of them, that's maybe 500 mA max. The Raspberry Pi pulls less than 700 mA. The Wi-Fi adapter is a TP-LINK TL-WN823N 300Mbps Wireless Mini USB Adapter that seems to pull less than 100 mA. I think the Arduino Uno also pulls less than 100 mA. So I would think the current draw should be well below 2.1 Amps.

So the problem may be noise. I know that motors can make a power line very noisy, but could the line noise from two servos be enough to cause the Raspberry Pi to reset?

Any thoughts?

Thank you.
3  Using Arduino / Programming Questions / Re: Servo library and motor controller library fighting over pins 9 and 10 on: April 12, 2014, 05:06:45 pm
Robin2, thanks for suggesting ServoTimer2. I tried it out and it didn't work as a drop-in replacement for Servo.

Then I realized that ServoTimer2 takes microseconds of pulse width instead of degrees like Servo. So I had to write a line of code that would convert the degrees to microseconds:
            posLeft = map(posLeft, 0, 180, 544, 2400);
where 0 degrees equals 544 microseconds and 180 degrees equals 2400 microseconds.

The code now works like a charm. I can now use my two servos (which steer independently the two front wheels of a toy car) and my motor shield (which drives the back wheels) at the same time. Thanks again.
4  Using Arduino / Programming Questions / Servo library and motor controller library fighting over pins 9 and 10 [solved] on: April 12, 2014, 02:30:37 pm
I'm using an Arduino Uno with a Pololu Dual VNH5019 Motor Shield. The library for that motor shield uses pins 9 and 10 as PWM pins, one for each of the two motors it drives.

I'm also using the Uno to control two servo motors, using the Servo library. I found out that the Servo library disables the PWM function on pins 9 and 10, even though I am using pins 11 and 13 to control the two servos.

So both libraries are fighting over pins 9 and 10. The motor shield library lets me re-map all pins but 9 and 10. I can't figure out how to modify it to let me use other pins.

But the Servo library seems to suggest that timer pins other than pins 9 and 10 can be used. It seems that Timer1 uses pins 9 and 10, but Timer2 uses pins 3 and 11, which would work for me. So I want to have the Servo library use Timer2 instead of Timer1. So far, I have not figured out how to do that. Anyone know?

Thank you.
5  Using Arduino / General Electronics / Re: How can I find out why a small DC motor won't work? on: April 06, 2014, 11:39:21 pm
I'll try to take apart the motor tomorrow to see what what happened. I suspect the motor is toast, though, and destined for the garbage can.

I need to be more careful. Not only have I burned out a motor, but I seem to have burned out a 1 1/2" speaker as well. It was working fine (I added it to the car for a horn) until I suddenly saw a wisp of smoke. I seem to have fried it. Perhaps I needed a resistor on it.
6  Using Arduino / General Electronics / Re: How can I find out why a small DC motor won't work? on: April 06, 2014, 04:55:50 pm
I see. When my motor is burned out, does that mean that the brushes are no longer in contact with the rotor? With this small a motor I suspect that is irreparable.

I ask because I'm surprised that this motor burned out, and wonder what caused it. These little motors seem to be indestructible in the various toys I've scavenged them from. I wonder if I abused it somehow. Maybe too high a voltage. Or too much current (stall current) for too long. Those are the two possibilities I've thought of.
7  Using Arduino / General Electronics / Re: How can I find out why a small DC motor won't work? on: April 06, 2014, 02:20:13 pm
That is very high, are you sure that is not just your skin resistance? Were you touching both terminals of the meter when you made the measurements?

I get varying results, but it's usually above at least 80 k Ohms, and I am not touching the probes. It's funny, though. I can get the meter to settle on a resistance with the faulty motor, even though I get a little different reading every time. But with a similar motor that works fine the meter will not settle on a resistance, but jumps around from 20 or so Ohms to 200 or 300 Ohms. Almost always less than 0.5 k Ohms, but I thought it would settle down to a small number.

It sounds like it is open circuit and quite burned out.

Yes, I'm afraid the motor is burned out. That's a shame, since I have no idea how to replace it. I wonder if the 9.6 Volts I used (which usually measured out at well over 10 Volts) was too high for this motor. Though it did work for quite a long time.
8  Using Arduino / General Electronics / Re: How can I find out why a small DC motor won't work? on: April 06, 2014, 01:37:51 pm
I measured the resistance across the motor terminals, and it is over 100k Ohms.

I have also removed the motor from the gearbox and the motor driver and hooked it up to a 5 Volts power supply, and it does not move at all.  But I was wrong when I said that there was no voltage across the terminals when I hooked it up to the 5 Volts power supply. There is a voltage. I was touching my meter probes to a solder blob on each terminal, not realizing that the solder blobs were not making a connection with the probes.
9  Using Arduino / General Electronics / How can I find out why a small DC motor won't work? on: April 06, 2014, 01:42:06 am
I bought a broken remote control car that I am re-architecting and trying to get to work. The steering for the car is done by a small DC motor. Although the motor is tiny, it runs off the 9.6 Volt battery that powers the rear wheels as well.

The motor worked fine for a couple of months, but now does not turn on at all. It goes through a gear box that actually does the steering. The design of the steering is a little strange. The motor's either full on right or left, or it's off in the center.

So to turn right, for example, the motor turns until it is stopped by the mechanical resistance of the wheel bumping against a block, and the motor then holds that position until the current is turned off. A spring then pulls the wheels back to center. So I would guess that the motor is stalled the whole time it is holding the wheels in a turned position, and pulling the stall current for the motor.

My guess is that the motor burned out because of pulling stall current for too long a time, but how could I check that? If I hook it up to a power supply and check for voltage across the two motor terminals, I get nothing. If I check for continuity across the two motor terminals when no power is being applied, it is an open circuit. That's all I could think of to test.

A visual check reveals nothing unusual. The two motor terminals are attached to a small PCB board that seems to have a few surface mount resistors on it. I have not taken the motor apart.

I cannot see any writing on the motor. I can take a picture of it if that would help.

Any suggestions would be appreciated.
10  Using Arduino / General Electronics / Re: Need help reading a power MOSFET datasheet on: November 07, 2013, 08:08:23 pm

Thanks for the suggestions, dc42. Those do look much better.

What bridge topology are you considering, I'm suspicious you think only one MOSFET
is needed per winding, which would be unipolar drive, which is unusual outside of
low speed stepper motors.

MarkT, I'm embarrassed to say that I forgot all about the bridge topology. I will need current to flow both ways in the winding, so I guess I will need to do a full H-bridge.

What I would really like to do is find some off-the-shelf motor drivers that I could buy to test the concept. Something like the Pololu High-Power Motor Driver 36v20 CS, shown at But Pololu said that the 50 Volt maximum is an absolute hard limit, so using a battery 48 Volt supply would not work. Also they said even with heatsink the maximum current is about 30 Amps.

[Interestingly, Pololu uses a IPD048N06 MOSFET on that board, and the MOSFET's datasheet says it can handle 60 Volts and 90 Amps: According to Pololu, the 50 Volt limit comes from the MOSFET driver on the board. But I can't tell which chip that is.]

Pololu was unaware of any motor drivers like theirs that could handle my 48 Volt, 42 Amp requirement. If anyone knows of one, please let me know. Otherwise, I guess I'm on my own.

11  Using Arduino / General Electronics / Re: Need help reading a power MOSFET datasheet on: November 07, 2013, 02:33:49 pm
Thanks to everyone for the information. Your comments helped me better understand some of the things I was reading. That helps a lot.

A few more details about the project. I read about a permanent magnet motor with several stator poles that are electrically independent and each pole powered by its own driver. I'd like to build one and test the concept. I may be biting off more than I can chew, but I figure I might as well bite first and then try to chew.

To that end, I'm looking at using just a MOSFET to control each stator pole. I do plan to use PWM to drive the MOSFET. My tentative design has 17 poles on the stator and 19 permanent magnets on the rotor. Each pole will be powered by the same 48-Volt power supply, and draw up to 42 Amps for a maximum power of 2 kW. But the test-of-concept motor I actually build will probably just have 3 poles and 5 magnets. 

As I say, I picked out the RFP50N06 as a possibility. Any other suggestions? And any suggestions as to a driver chip or circuit to switch the MOSFET? It seems like Microchip and others sell chips that are specifically designed to drive MOSFETS, but I could not find one that seemed like it would work with the RFP50N06.
12  Using Arduino / General Electronics / Need help reading a power MOSFET datasheet on: November 07, 2013, 01:52:19 am
I'm looking for a power MOSFET that will handle 48 Volts and about 42 Amps continuous. The Fairchild RFP50N06 seems like it will work. The datasheet is here:

Two questions:

(1) What does the power dissipation max mean? It says 131 Watts, but I'm not sure what that means.

(2) It looks like the switching voltage maximum and minimum are + and - 20 Volts, but the threshold max is 4 Volts. Does that mean I can use an Arduino output to drive it, with 0 Volts turning it off and 5 Volts turning it on?

Thank you.

13  Using Arduino / General Electronics / Re: Trouble soldering onto potentiometer tabs on: August 11, 2012, 07:38:10 pm
Thanks for the suggestions. I tried scraping the tabs, but there is not much there to scrap. Plus there seems to be no oxidation or anything like that. I can't tell what type of material they are made out of, but whatever it is, the material seems to hate solder. Solder just won't stick.

I have not had a chance to try flux yet. I hope to do that soon.
14  Using Arduino / General Electronics / Trouble soldering onto potentiometer tabs on: August 10, 2012, 05:09:51 pm
I bought a small joystick that has two potentiometers attached to it. I had to solder wires onto the 3 tabs on each potentiometer, and had a devil of a time getting the solder to stick to the tabs.

I'm not the most skilled person with a soldering iron, and my iron is a poor one. Still, I have never had a problem like this. The solder sticks to the copper wires that I put through holes in the tabs and then twist to tighten. But the solder does not stick at all to the tabs.

I finally managed to get a workable join on each tab. But is there something I can do in such cases in the future? Does soldering flux help?
15  Using Arduino / Project Guidance / Re: powering the Arduino Uno with a 12V battery on: August 04, 2012, 03:16:20 pm
As CrossRoads says, that will make the voltage regulator on your Arduino run warm. Especially if you are pulling enough current to run two servos. Better to use a 5 Volt source, like the USB output that CrossRoads recommended. They are more efficient, and will save your Arduino from the heat.
Pages: [1] 2 3 ... 17