Having problems with chip and DC motor and potentiometer and

Hello!

I have tried to build the following circuit:

http://fritzing.org/projects/drive-moto … d-sn754410

I have used and copied all the same components and wiring - exactly (i think…).

But - the motor seems to be working at the same speed and is not turning slower or faster, as i turn the potentiometer in each direction.

i have thought of several possibilities, for what is going wrong:

  1. maybe the guy in the Fritzing site, refers to a stepper motor and not to a regular DC motor and that changes the whole picture, since i am using a regular small DC motor?

  2. At the beginning of wiring and connecting the whole circuit together, i made a mistake and at the channels that are supposed to get 5V (red wires), i connected about 11V instead (the power that i need at max for the motor), maybe i have damaged the chip this way?

That’s it…i can’t think of anything else…

Can anyone with some serious experience, help me understanding, step by step, what is going wrong here?

Thanks a lot!

A DC motor is used in that ‘fritz’.

The L293D can take up to 36V input so 11V will not damage the chip.

But the Ardiuno can not take 11V on any IO pin, You could have fried the Atmega chip. Load and run one of the simple ‘blink the LED’ programs to test if the Atmega still works. If it doesn’t replace the Atmage. If it does then proceed with the following tests.

To trouble shoot:

1-Disconnect the motor

2- measure the Voltage of the POT into the Arduino with your Voltmeter (DVM). Does the voltage change for 0 to 5V as to turn the pot?

3- measure the Voltage on the PWM output pin with your Voltmeter. It should vary as you turn the POT. The meter will average the PWM pulse and show lower Voltage with narrow pulses.

roineust:
But - the motor seems to be working at the same speed and is not turning slower or faster, as i turn the potentiometer in each direction.

Are you using the sketch from that site, the one shown below ?
/****************************************/
/* PROJECT: Dung arduino dieu khien motor dieu chinh toc do bang bien tro */
/* Author: Ngo Huynh Ngoc Phu (machtudong@gmail.com) */
/****************************************/

int bientro = A0;
int dieukhien = 3;

int tocdo = 0;
int giatribientro = 0;

void setup()
{
  pinMode(dieukhien, OUTPUT);
  pinMode(bientro, INPUT);  
}

void loop()
{
  giatribientro = analogRead(bientro);
  tocdo = map(giatribientro, 0, 1023, 0, 255);
  analogWrite(dieukhien, tocdo);
}

If you are, put a print statement after the analogRead, open the Serial Monitor (9600 baud) and see if the voltage varies as you turn the pot.

/****************************************/
/* PROJECT: Dung arduino dieu khien motor dieu chinh toc do bang bien tro */
/* Author: Ngo Huynh Ngoc Phu (machtudong@gmail.com) */
/****************************************/

int bientro = A0;
int dieukhien = 3;

int tocdo = 0;
int giatribientro = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(dieukhien, OUTPUT);
  pinMode(bientro, INPUT);  
}

void loop()
{
  giatribientro = analogRead(bientro);
  Serial.print("giatribientro = ");
  Serial.println(giatribientro);
  tocdo = map(giatribientro, 0, 1023, 0, 255);
  analogWrite(dieukhien, tocdo);
  delay(50);
}

I’ve also added a delay to allow enough time for the PWM waveform to run to completion.

If the printed voltage varies as you turn the pot and your wiring is correct … then you may have damaged the Arduino .

Hey people!

Thanks!

Your were right! I have fried the Ardu! Just as soon as i replaced it, everything started working well!

Mee_n_Mac! thanks! i have added the delay as well!

But yet, i have another small problem - when i turn the dial in such a way, that the motor goes very slow, if at that state, i shut the whole system off (while the motor is going very slow), using a toggle switch i have there, then, even if i turn the dial back to faster motor speed - it doesn’t help, and the motor won’t move and only does these strange voices, as if it is trying the prime (it is hooked to a micropump) - the only thing that fixes this situation, is if i switch the wires going to the motor (+ and -) and thus switch polarity, and then the motor starts running again and then i can switch back to the right polarity and it works again!

Does anyone know what is the source of this problem? It can’t be a priming problem, since it happens even if i turn the dial to high speed before turning the system back on and this situation does not solve until i switch polarity back and forth once.

I though, that maybe i can make the polarity switching process faster, by somehow hooking the motor + and -, after the place where the on\off toggle is located, using another toggle, the 6 legged type…is it possible to switch the DC motor polarity using one of these 6 legged type toggles ?? :

http://static3.tme.eu/katalog_pics/b/2/ … s500if.jpg

Thanks a lot, appreciate you help!

Can you tell anything specific re: the motor ?

Hey Mee,

I don’t understand your question…it’s a usual small DC motor, about 2’’ long and a 1’’ width…

roineust:
Hey Mee,

I don’t understand your question…it’s a usual small DC motor, about 2’’ long and a 1’’ width…

Range of operating voltages, Kv, operating and stall currents, torque at any RPM and voltage, etc, etc. It sounds like the motor is stalled for some reason. Have you tried turning the micropump by hand when this situation occurs ? Can you measure the voltage across the motor terminals when this situation occurs ? Are you using a solderless breadboard ? If so you may have higher than expected ohmic losses.