Arduino Forum

Using Arduino => General Electronics => Topic started by: jeolex on Aug 01, 2014, 08:10 pm

Title: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 01, 2014, 08:10 pm
I have a vibration motor which is run with 2.5-3.5V, max current is 120 mA and motor resistor is 29 ± 6 ?.

So I have a project which contains LCD, phototransistor, IR LED, some buttons, potantiometer and vibration motor. I dont have a idea about that arduino uno's electric current is enough for this project. I know that digital pin max. current is 40 mA, is it also valid for 3.3V pin and 5V pin ?

Thanks.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: steinie44 on Aug 01, 2014, 08:20 pm
Is 120mA more then 40mA?
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 01, 2014, 08:35 pm

Is 120mA more then 40mA?



Read the OP's question again....

is it [40mA] also valid for 3.3V pin and 5V pin ?
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: steinie44 on Aug 01, 2014, 08:46 pm
Quote

is it [40mA] also valid for 3.3V pin and 5V pin ?

So.........
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 01, 2014, 08:50 pm
So? He knows 120 is too much for an i/o pin, but is asking if it's too much for the power supply pins.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: fungus on Aug 01, 2014, 08:50 pm

I have a vibration motor which is run with 2.5-3.5V, max current is 120 mA and motor resistor is 29 ± 6 ?.

So I have a project which contains LCD, phototransistor, IR LED, some buttons, potantiometer and vibration motor. I dont have a idea about that arduino uno's electric current is enough for this project. I know that digital pin max. current is 40 mA, is it also valid for 3.3V pin and 5V pin ?

Thanks.


The 3.3V regulator on an Arduino Unu is one of these:

http://www.ti.com/lit/ds/slvs522n/slvs522n.pdf

Max current is 150mA
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: fungus on Aug 01, 2014, 08:51 pm

So? He knows 120 is too much for an i/o pin, but is asking if it's too much for the power supply pins.


Hopefully he's not going to power his 3.5V motor from a 5V pin...

Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: steinie44 on Aug 01, 2014, 08:59 pm
NO.
Not with all the rest of that stuff connected.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 01, 2014, 09:15 pm


Max current is 150mA



This answer what I have asked. Thank you. I guess 150 mA will not enough for my project. And I am new with arduino and electronic things. I research from websites and if I am wrong please correct me,

Can capacitor use for strengthen the current ? For example if my arduino's current is not enough for motor, so I use capacitor which is suitable for circle (I am not know yet). Am I right ?
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 01, 2014, 09:18 pm
What you need to do is power the vibrator externally to the Arduino, but probably control it from the Arduino via a transistor.

Have a look here (http://www.ecs.umass.edu/ece/m5/tutorials/tip122_transistor_tutorial.html) for example.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 01, 2014, 09:27 pm
I have looked example. But I don't want to use external power. I just want to connect arduino to adapter and use my device. Is it possible ?
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 01, 2014, 09:30 pm

I just want to connect arduino to adapter and use my device. Is it possible ?


Seems you've already had a "no" to that question.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 01, 2014, 09:32 pm
Ok I get it. Thank you so much :)
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 01, 2014, 09:34 pm
The Arduino's a controller remember, not a power supply  8)
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: wes000000 on Aug 01, 2014, 09:39 pm
Quote
The Arduino's a controller remember, not a power supply


This is true, but he specified his motor only used 120mA and the 3.3V regulator can source 150mA max. So why is that a no exactly?

I know it is not good to get close to your current capacity like that, but I would expect it to still work. And considering likely the rest of his circuity is using 5V regulator. And USB can source 500mA so he has no problem there (more current capacity yet if using an external supply).

And there is minimal harm in trying it. The worst thing that happens is the current draw is high enough to reset the Arduino. in which case it will become immediately obvious that motor will not work from Arduino 3.3V pin.

Quote
Can capacitor use for strengthen the current ?


Not to strengthen it, but it could be used as like a helping hand, so when the motor first starts to spin its initial current surge will come from capacitor not all from the 3V3 regulator. You would want a pretty large capacity capacitor though and it would need to be rated for the appropriate voltage.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: Palatis on Aug 01, 2014, 10:04 pm
brushed motors usually have a high start-up (stall) current, like 6~20 times the normal current.

you should get ready for that before you digitalWrite(MOTOR_PIN, HIGH).
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 01, 2014, 10:06 pm
These informations are so clear. Thanks for clarify me. So I have a idea but I don't know again it is possible or not :)

For example I have a adapter which is pretty enough for all of my project parts. And from adapter one of my output connect to arduino with some parts which are make it suitable for arduino card. The other output connect to dc motor, LCD, etc.  and act as an external power. Is it possible ?
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 01, 2014, 10:10 pm

brushed motors usually have a high start-up (stall) current, like 6~20 times the normal current.

you should get ready for that before you digitalWrite(MOTOR_PIN, HIGH).


My vibrator motor's start-up current max 120 mA. It's mean that not possible to use pins for run dc motor. So I need to entegrate external power (for dc motor, LCD etc) and arduino card power in one power supply :)
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: wes000000 on Aug 01, 2014, 10:11 pm
Which Arduino are you using. The Uno has a max current draw on 3V3 pin of 50mA per the Arduino info page. 5V pin is 200mA. Not sure if different models have different regulators or not.

And is the 120mA a true max or is that the continuous operating current. It may be the motor only takes 20mA or something continuous and so that 120mA figure may account for the initial current surge. Do you have a datasheet?

You are corrent the pins are not at all suitable to drive motor. You could get away with 5V pin if you used a low drop out 3V3 regulator, but that might be not options, just depends.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 01, 2014, 10:19 pm
Quote
And from adapter one of my output connect to arduino with some parts which are make it suitable for arduino card. The other output connect to dc motor, LCD, etc.  and act as an external power. Is it possible ?


That's actually what I was picturing: the Arduino in parallel with various components, provided the voltages are either the same or adjusted somehow.

Here's a question though: presumably you want to switch the vibrator off and on? So even if it's supplied from the on-board 3V3, you'll still need to switch that with a transistor. Because if you don't, and simply switch the other side of the motor with an i/o pin, then that pin may be over-drawn.

And don't forget the flyback diode....
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: wes000000 on Aug 01, 2014, 10:21 pm
Quote
And don't forget the flyback diode....


Famous last words... hahah
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 01, 2014, 10:24 pm
I have Arduino Uno and here is vibrator datasheet: https://catalog.precisionmicrodrives.com/order-parts/datasheet/310-103-10mm-vibration-motor-2-7mm-type (https://catalog.precisionmicrodrives.com/order-parts/datasheet/310-103-10mm-vibration-motor-2-7mm-type)

I will evaluate and apply all of your advices.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 01, 2014, 10:28 pm


presumably you want to switch the vibrator off and on?



Yes I need it.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: wes000000 on Aug 01, 2014, 10:28 pm
Someone here with more experince can give their input here. But I would think you could get away with using the 3V3 pin (says it uses 52mA max operating current), and just put a beefy capacitor on pin so that when the motor starts up it draws its brief current surge from the capacitor not the pin.

http://www.adafruit.com/products/1589

And to switch on and off you would need a transistor or MOSFET
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: fungus on Aug 01, 2014, 10:42 pm

brushed motors usually have a high start-up (stall) current, like 6~20 times the normal current.


That's what capacitors are for...

Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: steinie44 on Aug 01, 2014, 11:56 pm
Quote

This is true, but he specified his motor only used 120mA and the 3.3V regulator can source 150mA max. So why is that a no exactly?

Quote

So I have a project which contains LCD, phototransistor, IR LED, some buttons, potantiometer and vibration motor.

Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: Palatis on Aug 02, 2014, 01:04 am
LCD is power hungry, IR LED the second (like 5~20mA), others just trivial (like few mA).

if your LCD doesn't take current from 3.3v, the onboard LDO should just be enough to push the motor.

however a driver is needed (like a darlinton or MOSFET).
Darlintons got like 1.1~1.4v drop, so you might have to power it with 5v (you might need another diode to "drop" the voltage to <3.6v).
MOSFETs should have a low Rds (like 1 ohm), compared to the motor (65 ohm, specified in datasheet), so should be powered with 3.3v.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: DuncanC on Aug 02, 2014, 03:41 am

I have a vibration motor which is run with 2.5-3.5V, max current is 120 mA and motor resistor is 29 ± 6 ?.

So I have a project which contains LCD, phototransistor, IR LED, some buttons, potantiometer and vibration motor. I dont have a idea about that arduino uno's electric current is enough for this project. I know that digital pin max. current is 40 mA, is it also valid for 3.3V pin and 5V pin ?

Thanks.


According to the specs the Uno only puts out 50 mA max on the 3.3 volt line. You can't draw more than that from the 3.3 volt line, period.

Apparently the 5V regulated supply can put out like 880 mA, so you COULD use a voltage divider or an external regulator to step down the 5V to 3.3 and use that to power your motor.

I'm not an EE, but I have a decent understanding of how this stuff works. Here's one way you could do it. (I'm not an expert, verify this for yourself).

Based on my calculations, for a voltage divider you'd want 39 ohms for the "top" (R1) resistor, and 75 ohms for R2. You'd feed that into the collector of an NPN transistor and then connect your digital output pin to the base of the transistor through a current limiting resistor of around 270 ohms. You'd connect the emitter of the transistor to the positive lead of your vibration motor, connect the negative lead to ground, and then attach a flyback diode in parallel to the motor with the anode on the ground side and the cathode on the same side as the transistor emitter.

Here's what the circuit would look like (ugly drawing alert!)

(http://www.pbase.com/image/156823162/original.jpg)
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: wes000000 on Aug 02, 2014, 03:47 am
Quote
so you COULD use a voltage divider or an external regulator to step down the 5V to 3.3 and use that to power your motor.


You should never use resistor divider network as a power source.... not only does it waste a huge amount of energy as wasted heat, it also becomes a large problem because depending on current draw and voltage you will likely end up needing power resistors which tend to be more expensive. Plus you will likely not be able to get needed values in large power resistors as they tend to be lower resistances.

If you wanted to use 5V rail your best bet is a low drop out voltage regulator to regulate 3.3V

And 5V rail is not 880mA.  I believe the max rate is 800mA but you will not want to run that high due to heat dissipation issues. And not only that but this is all assuming you have external supply capable of that because USB certainly isn't. It has 500mA max and not all computers are even compliant to that standard.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: wes000000 on Aug 02, 2014, 03:55 am
Honestly the whole issue is just becoming over complicated the best solution is as follows:

1. Get a power supply that is 9-12V and several amps just to be safe and leave room for future expansion and projects.

2. Connect Arduino to supply directly and on board regulator will regulate down to 5V for micro controller etc.

3. Then all other items of significant current draw should be connected to voltage regulators connected to the battery in parallel. So have a 5V regulator and a 3.3V regulator, for LCD and motor respectively.

3.5 All LEDs etc. (items of low current draw <= 20-40 mA) can be safely powered from pins

4. Make sure all grounds are common

5. Setup MOSFETs or transistors appropriately so you can turn motor and LCD off or on.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: DuncanC on Aug 02, 2014, 04:08 am

Quote
so you COULD use a voltage divider or an external regulator to step down the 5V to 3.3 and use that to power your motor.


You should never use resistor divider network as a power source.... not only does it waste a huge amount of energy as wasted heat, it also becomes a large problem because depending on current draw and voltage you will likely end up needing power resistors which tend to be more expensive. Plus you will likely not be able to get needed values in large power resistors as they tend to be lower resistances.

If you wanted to use 5V rail your best bet is a low drop out voltage regulator to regulate 3.3V

And 5V rail is not 880mA.  I believe the max rate is 800mA but you will not want to run that high due to heat dissipation issues. And not only that but this is all assuming you have external supply capable of that because USB certainly isn't. It has 500mA max and not all computers are even compliant to that standard.



Clearly a separate 3.3v supply is a much better choice. Lots of people have said that, but the OP insists that he doesn't want a separate power supply.

As a general rule I agree with you about not using a voltage divider for power.  However, in this application the current needed is only 120 mA, and based on my calculations the current wasted is only about 40 mA. Not ideal, but it would work.

The OP doesn't want to add a separate power supply, so I was offering a solution. Not an ideal solution, but one that should work.

Since the current needed is only 120 mA, the OP can get away with normal 1/4 watt resistors. R1 in my circuit will limit the total current to about 128 mA. Actually, I guess I under-rated that, since some current will be wasted to ground.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: wes000000 on Aug 02, 2014, 04:14 am
Quote
but the OP insists that he doesn't want a separate power supply.


At some point if he wants to take his project somewhere where he doesn't have access to a PC he will need a power supply other than USB. So I am suggesting he only use one power supply (but make it capable of handling needed current) and having several regulators attached to it in addition to the Arduino. So one power supply, and two regulators and all his power problems would be solved. I wouldn't be surprised if he can get all that on eBay for under $10, maybe even $5

Quote
the OP can get away with normal 1/4 watt resistors


Nope. A current draw of 120mA and a voltage of 3.3V gives .4 watts of power so you would need 1/2 watt as absolute minimum but even that would be pushing it as it would get hot very quickly. So I'd say you'd want at least a watt. And those resistors can get expensive so I go back to the solution of a single power source and two cheap regulators.

Quote
Not ideal, but it would work.


I suppose one could make it work but it's beyond non ideal. Because in addition the load is going to add an extra loop to the circuit and additional resistance. As such the Vout will start to change depending on the load ESR. It is really just terrible all around to use voltage dividers as any kind of power source.

http://hyperphysics.phy-astr.gsu.edu/hbase/electric/voldiv.html
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 02, 2014, 06:20 am


Here's what the circuit would look like (ugly drawing alert!)

(http://www.pbase.com/image/156823162/original.jpg)


The load should be on the collector.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: Palatis on Aug 02, 2014, 02:45 pm

(http://www.pbase.com/image/156823162/original.jpg)

Ahh... no!!!

1. the 2 resistors draws 44mA when the motor is off...
2. you'll only get ~2.45v when the transistor turned on.
3. the transistor itself got a Vf, should take that into consideration.

voltage dividers will work with high impendance load, like a 20k/50k ohm divider vs a 600k ohm load, won't work with resistive load.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: Paul__B on Aug 02, 2014, 02:50 pm
This discussion has passed from the sublime to the ridiculous.

Running a 3V motor from a 5V supply is dead simple - measure the (running) current draw at the specified voltage, calculate the resistor to drop the difference between 5V and 3V at that current, and put that resistor in series with the motor.

This discussion is however just so ridiculous that I will not even do the calculation.

Sure, this will mean the motor is slower to start, but it will not be overloaded and there will be no wastage in shunt resistors.

Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 03, 2014, 09:35 am
Firstly thank you for your all replies. They are full with informations and good ideas.

If I mention about my project, it will be better.

I am a master student in Department of Agriculture. I planned to make a Wheat Grain Counter. So I draw in my mind sketchily and I need vibrator motor, LCD, phototranssitor, IR led and some bottons etc..

I will have a container which is keep grains and when I apply vibration, grains fall down from container to inside of the pipe (pipe has a phototransistor and IR led). So when grain pass through between IR Led and phototransistor, counter increase and show in LCD display. I know it s not a big project but I am new and keen about electronic things.

So I have been successful about counting grains with phototransistor. My next step is applying a vibration and fall down the grains.

Actually I will not use USB power. I just want to one power supply and use it for all items what I have.



3. Then all other items of significant current draw should be connected to voltage regulators connected to the battery in parallel. So have a 5V regulator and a 3.3V regulator, for LCD and motor respectively.



Sounds good. Honestly, I was thinking about that It s possible or not.

I also think about using resistor for decreasing voltage. But I had a prediction that It will warm to resistor.

Again thank you all for your replies. I examined them quickly and there are lot of good information. When I have spare time I will read all of them again slowly.


Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 03, 2014, 10:34 am
Now first step, I will order 12v 2000mA power supply, 5v and 3.3V regülator and then measure voltage and control it with multimeter. If It s ok, from power supply I will make three parallel. One of them directly go arduino power input and the others going 5V and 3.3v regulators. Am I right ?
Title: So what?
Post by: Paul__B on Aug 03, 2014, 10:50 am

I also think about using resistor for decreasing voltage. But I had a prediction that It will warm to resistor.

Indeed it will.

So what?

You can warm a 2 cent resistor, or you can warm a 50 cent regulator.  Both will heat up to the same degree, because each would dissipate the same amount of power if correctly designed.  Why would you prefer to heat an expensive (well, relatively) regulator and include two extra capacitors instead of heating a cheap resistor if the result is the same?

{Having said that, the regulator would have a capacitor on its input and on its output, and if you use a resistor, you should still have a capacitor across the motor for suppression of interference.}
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: Grumpy_Mike on Aug 03, 2014, 11:03 am
The very simple answer it to connect the motor, through the transistor to 5V.
Then drive the transistor with a PWM output using an analogWrite command with the PWM value of 168. That will reduce the power sufficiently to prevent the motor burning out.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 09:22 am
Hello again,

I bought 12V 2A power supply and 3.3V regulator for my vibrator motor.

I have a problem with control dc motor with potantiometer. I based on this one;

(http://media.wiley.com/Lux/86/381386.image0.jpg)

I have 1N4001 diode, BC547 NPN transistor. So when I connect wires like that motor didn't run. I control all of wires so many time but it didn't work.

My codes are;

Code: [Select]

const int analogPin = A5;
const int motorPin = 9;
int potantValue=0;

void setup(){
Serial.begin(9600);
}

void loop(){
potantValue = analogRead(analogPin);
potantValue = map(potantValue, 0, 1023, 0, 255);
analogWrite(motorPin, potantValue);
delay(200);
}



Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 09:29 am
The code says A5, pic shows A0.....
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 09:34 am
It's not my sketch. I just based on this one. On my circle It'is connect with A5. I can get potantiometer value, It'is working. I just couldn't control motor with this value. Motor is not run. But when I use middle pin of transistor as a collecter. It's run but so slow and again cant control motor. I was used all combination of transistor :)
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 09:40 am
Ok well post a drawing of your actual circuit.... Or a photo.

If you're using one of those loooooong breadboards, check that you aren't working (or trying to work) across the two halves when there is often a break in the middle. See pic....

Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 09:58 am
Wait a sec.... you're still providing the power to the motor from the Arduino: it might not be able to provide enough current from the 5V pin. I can't be bothered trawling back through this thread to see what the motor current requirement is, but you might consider trying an external power supply for the motor.

edit: schematic of external power added. (I'm loving working with Eagle  :P )
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 10:17 am
I have external power. Not use arduino 5v. My power supply 12v 2A and I use 3.3V regulator for motor.I measure it with multimeter and it s ok 3.3v and I also run motor without transistor.

(http://i.imgur.com/GH4P6df.jpg?1)

(http://i.imgur.com/RiVnfid.jpg?1)
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 10:25 am
It's very hard to help when your original pic didn't match either your circuit or your code  :smiley-yell:

But anyhow, so does your circuit match the schematic I attached a couple of posts earlier, except the battery is 3V3 from a regulator?

Might be an idea if you can post a drawing of your circuit.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 10:56 am
I realised when you say :) It's not match because I couldn't count that how many times I change wiring :) I tried lot of combination :)

I draw my circuit on paper and upload here. Before I was said that I am new, so sorry for faults :)

(http://i.imgur.com/Y1O0DQU.jpg)
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 11:01 am
Does the Arduino ground join to that ground you show in that pic?
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: Grumpy_Mike on Aug 09, 2014, 11:02 am
That diode is the wrong way round.
You need  capacitors on both side of the regulator.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 11:05 am

That diode is the wrong way round.
You need  capacitors on both side of the regulator.


I think in the photo of the setup, the diode is the right way round, ie cathode to +ve for a flyback.

Also I think I read the base resistor as 10k in the photo, shows 1k in the diagram.... I'm not experienced enough to know what it ought to be.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 11:10 am
Upss no they are not same ground. For now I run arduino with USB and run motor with power supply. You can ask me how this circuit work while they havent got same ground :)


That diode is the wrong way round.
You need  capacitors on both side of the regulator.


I tried both way of the diode and not work but I didn't use capacitors.

So can you explain please that What is the task of the capacitor on this circuit and which capacitor I need to use ?
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: Grumpy_Mike on Aug 09, 2014, 11:15 am
They have to be the same ground to make it work.
Capacitors from the regulator pin to ground, they stop the regulator oscillating. the values to use are in the data sheet for the manafacaturers of the device you use.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 11:16 am
The transistor's emitter has to be on the same 0V as the Arduino, otherwise the voltage on the Arduino output to the base, which is 5v as far as Arduino is concerned, has no meaning to the transistor. It would be like taking a 5V battery and putting the + on the base but not connecting the other side of the battery. Or trying to hear one hand clapping. Waaaay too Zenny for me.


Look at my schematic a few posts earlier.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 11:31 am
I understood that For run motor, arduino and powersupply gnd have to be same. But I have a question. Motor get power from 12v 2A, arduino get power from computer USB. If I wiring them to same ground, Will arduino not damaged ?
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 11:38 am
Quote
Quote
If I wiring them to same ground, Will arduino not damaged ?


No.

Ground is just a sort of "reference" so that voltages have meaning.

Have you tried it yet?

Before you do, try this: while the Arduino output pin is high, put your voltmeter on the transistor base and the other on the emitter.... there will be 0 voltage across there if the grounds aren't joined. But if you move the -ve side of the meter to the Arduino ground, there will be. The Arduino output means nothing to the transistor if the grounds aren't hooked up.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: Grumpy_Mike on Aug 09, 2014, 11:39 am
No. Just connecting grounds will not damage anything.The grounds need to be connected for it to work.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 11:49 am
Thank you so so much my friends. It's run now :)) Used potantiometer, I can control motor speed. It seems that there is a big problem but actually because of my lack of information :)) thanks again

My next step is LCD then mechanism for my wheat grain counter :)
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 11:53 am
Great, glad it's working.

But the moral of the story is to post the ACTUAL circuit not the one your circuit is BASED ON. You had your answer 5 minutes after posting your real circuit: but that was 90 minutes after posting the wrong one....
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 11:55 am
I got your advice and definitely agree you..
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 11:57 am
Double check the diode by the way: the cathode must be on the +ve, no matter how strange that may seem.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 09, 2014, 12:01 pm
When I connect them same ground It didnt work. I changed to direction of diode then it work. So my first diode direction was wrong.
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: JimboZA on Aug 09, 2014, 12:11 pm
I guess that with the diode cathode to the -ve of the power supply, ie the transistor collector, that's essentially a short across the motor so the current will take that route and not go through the motor.

The "right way" to have that diode is to have it the "wrong way"....
Title: Re: Have Arduino uno got enough current for vibration motor ?
Post by: jeolex on Aug 13, 2014, 05:56 pm
I am here with new problems :)

I have a LCD display problem. I made connections, I can get power to LCD but I couldn't write anything to LCD display.

My LCD always looks like this:
(http://i.imgur.com/KsK4LKO.jpg?1)

My connections:

LCD Pin -----> Arduino
LCD pin 14 --> pin 1
LCD pin 13 --> pin 2
LCD pin 12 --> pin 3
LCD pin 11 --> pin 4
LCD pin 10, 9, 8, 7 --> empty
LCD pin 6 --> pin 5
LCD pin 5 --> GND
LCD pin 4 --> pin 6
LCD pin 3 --> GND
LCD pin 2 --> 5V
LCD pin 1 --> GND

I didn't attach images about connections, because it s so crowded and complex.

Here is my LCD 's datasheet : http://www.ozkulelektronik.com/p_docs/HY-1602F-001.pdf (http://www.ozkulelektronik.com/p_docs/HY-1602F-001.pdf)

And my simple codes for trying
Code: [Select]

#include <LiquidCrystal.h>

LiquidCrystal lcd(6,5,4,3,2,1);

void setup(){
lcd.begin(16,2);
lcd.print("Hello");
}

void loop(){
 
lcd.print("hello");
}