|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: arduino help
for the wiring, a darlington configuration H -Bridge is your best bet
to run the motor, you'll do a pwm_allocate, then a pwm_write() (I think that those are correct). the delay is just a sleep function. If you have any trouble let us know. As a second thought, depending on your electrical skill, you might consider investing in one of these: http://www.pololu.com/catalog/category/97 |
|
#2
|
||||
|
||||
|
Re: arduino help
i do not have an h bridge but i only need it for one directionality shoulding i be able to power the board and then just power the motor from the board and control it with a delay
|
|
#3
|
||||
|
||||
|
Re: arduino help
pardoning the broken speech, a relay will sufice if you just need the motor to spin one way.
You should NEVER source drive current from an arduino. Each pin is wired for only 20ma. You should source your motor current from the main bus rails of whatever you are building. If you are bent on only needing 3.3v, then you should use something like an LM317 to drop the voltage. |
|
#4
|
||||
|
||||
|
Re: arduino help
how would i set up a relay for the motor?
|
|
#5
|
||||
|
||||
|
Re: arduino help
http://www.instructables.com/id/Conn...ay-to-Arduino/
the relay uses a 12v coil, but the same steps apply to using a 9v one |
|
#6
|
|||
|
|||
|
Re: arduino help
Here the code you could use:
/*********** connect an NPN transistor driving a motor to pin 9 on arduino ***********/ int motorPin = 9; void setup() { pinMode(motorPin, OUTPUT); delay(45000); digitalWrite(9, HIGH); delay(1000); digtalWrite(9, LOW); } void loop() { } |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|