Go Down

Topic: Need to power small dc motor car for specific distance and stop (Read 4 times) previous topic - next topic

MaJiG

#25
Feb 20, 2013, 09:03 pm Last Edit: Feb 20, 2013, 09:06 pm by MaJiG Reason: 1
retrolefty, nice catch. Attaching mods. Karma bump.

HazardsMind, the motor is ON less than five seconds.

GrisGris

#26
Feb 26, 2013, 06:19 pm Last Edit: Feb 26, 2013, 08:04 pm by GrisGris Reason: 1
Almost there... We think!!
But, We can't get the motor to stop.
The test circuit worked just as explained.
Now with the circuit set up as described, when the arduino is powered up the D13 LED flashes a couple of times and then lights up. (it does this whether the magnet is aligned near the HED or not when power is turned on)
Then when the go button is pressed the motor starts but continues to run regardless of the number of times the magnet is passed over the HED.
We're sure it is connected correctly but the one component we are not sure of is the transistor. The numbers on it are 2N3904-338 it's the only one we have right now.
We tried reversing the HES and the transistor to see if polarity was a problem but no luck.
We changed the number of rotations to 3 in the code just to make the tests quicker but other than that we have made no changes to the code.
But we're at a loss as to what to try next.
Thanks

GrisGris

I hadn't noticed the power mod before the last post.
We are testing the setup with a 9V battery power source to the Arduino.
And all power sources connected as shown.
The transistor has not been hot at all. Could a bad transistor cause the problem we are seeing?

Retroplayer


I hadn't noticed the power mod before the last post.
We are testing the setup with a 9V battery power source to the Arduino.
And all power sources connected as shown.
The transistor has not been hot at all. Could a bad transistor cause the problem we are seeing?


If your code is solid, the only other real possibilties would be a shorted transistor, broken HED, or the HED is not hooked up properly or needs some other type of hook up like a pullup resistor. Also, with hall effect sensors, it will only respond to a single pole. Make sure that your pole of the magnet is correct for the sensor.

I would separate that part and test it to make sure the arduino is actually seeing the HED trigger.

GrisGris



I would separate that part and test it to make sure the arduino is actually seeing the HED trigger.


We did the HED test that MaJ sent and it works so we eliminated that as a problem.
I think I'll run down to Radio Shack now and get another transistor in case that's it.
How would I isolate the HED to test it with the Arduino?

Go Up