Go Down

Topic: Potentiometer to change speed of DC motor (Read 6343 times) previous topic - next topic

TiboJ

#15
Mar 14, 2012, 05:01 pm Last Edit: Mar 14, 2012, 05:07 pm by TiboJ Reason: 1
The left red wire is going to ground, the center to the motor, and the right one also to the ground.

edit: I just checked the wiring again, and everything is right connected like the wiring diagram in the book.

Daanii

Well, AWOL's code confirmed that your pot is working correctly. So your using a 25k pot instead of a 10k pot is not a problem.

Your code looks fine. But it appears that your motor is getting full power, or nearly full power, most of the time. Somehow I think your transistor or motor wiring is wrong. I cannot see anything wrong from your picture. I'll keep looking.

TiboJ

Already thank you for help all!

I'm sure it's wired the right way, and I have checked it like 20 times now.
I will try another motor.

Daanii

I doubt that it is your motor.

Can you use your multimeter to check your power supply wiring? Make sure that what you think is positive is indeed positive. And what you think is ground is ground.

TiboJ

#19
Mar 14, 2012, 05:28 pm Last Edit: Mar 14, 2012, 05:38 pm by TiboJ Reason: 1
I tested another motor and no luck with that.

The wiring of the power source is also good, I tested the connections with my multimeter.

edit: I will try another power source now.

AWOL

Can you simply turn the motor on and off using a digitalWrite to the transistor pin?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Daanii

AWOL's suggested test should tell you a lot.

Apart from that, although the picture of your wiring is not real clear, I could not find any wiring problems either. Is your diode in the right way? It looks right, and I'm sure you checked, but I'll ask anyway.

TiboJ

Okay, it's working now! :smiley-mr-green:

All I did was connecting another power source, so the problem was the 2,1mm plug and socket power source.

So why would the circuit with the 2,1mm plug and socket not work? Maybe do I connect it wrong?
I started a topic about it yesterday, and someone told me to connect to front pin to V+ and the two backpins to the GND, and that is what I did and that is the reason it not worked first.
(http://arduino.cc/forum/index.php/topic,96310.msg723031.html#msg723031)

It would be nice if it worked with the 2,1mm socket. Maybe do you guys now how to connect a 2,1mm plug and socket in the circuit?

Big thanks!!

TiboJ

#23
Mar 14, 2012, 07:04 pm Last Edit: Mar 14, 2012, 07:07 pm by TiboJ Reason: 1
Ok this works also!! :D

I used my multimeter to look which one is the positive leg, and it is one of the back pins. The front pin is the negative leg.
So the negative and positive pins were switched.


Thank you all for the help!

Daanii

#24
Mar 14, 2012, 07:05 pm Last Edit: Mar 14, 2012, 07:08 pm by Daanii Reason: 1
Turn the socket sideways on your breadboard and it might work.

The way you had it in your pictured wiring, the front pin and the back pin were in the same row on the breadboard. But that should have shorted the power supply. So I'm not sure what is connected to what.

You should be able to figure it out using your multimeter as a continuity tester. Just make sure all three pins of the socket are in separate rows on the breadboard. Then find out what connects to what. As people told you in the other thread, one pin will be different than the other two.

Good to hear that you got the project working. Troubleshooting can be frustrating, but it's always fun when you actually do shoot the trouble and fix the problem.

EDIT: I see you already did something better than what I suggested. Good work.

TiboJ

#25
Mar 14, 2012, 07:11 pm Last Edit: Mar 14, 2012, 07:14 pm by TiboJ Reason: 1
Quote
Good to hear that you got the project working. Troubleshooting can be frustrating, but it's always fun when you actually do shoot the trouble and fix the problem.

That's true, and that's how you learn the most.
And the 2,1mm socket is also working now(see my previous post) :D

btw: the pins weren't in the same row, but it looks like that because the picture is not very clear  ;)

Up to the next project! :smiley-mr-green:


TiboJ

I added a fan to it :)
Here is a video:
http://www.youtube.com/watch?v=BquAXU_yE3U

Daanii

Nice video!

You will want to be very careful with reverse polarity. DC motors don't mind which direction the current is going. Most circuits won't be so forgiving. I've burned out some expensive parts by mixing up power connections. Hope you do not.

TiboJ


Nice video!

You will want to be very careful with reverse polarity. DC motors don't mind which direction the current is going. Most circuits won't be so forgiving. I've burned out some expensive parts by mixing up power connections. Hope you do not.

Thank you ;)

I had placed a diode to avoid the reverse current.

Daanii


I had placed a diode to avoid the reverse current.


As I understand it, the diode in your circuit takes care of back EMF. It does not do anything to prevent reverse polarity. In fact, current was flowing, and your motor seems to have been spinning merrily backwards with reverse polarity. Motors are good that way.

But if you send reverse polarity into a chip like an accelerometer (like I did), you may see it burn out (like I did). Even then, as we talked about, you learn from things like that (like I did).

Go Up