Pages: [1]   Go Down
Author Topic: Troubleshooting an example motor board - how?  (Read 537 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
We bought the "Inventor's Kit for Arduino", and have a problem with making the 3rd board (the motor one) work.
The board has a motor, transistor that controls its speed, a diode and a resistor. (Should be a simple one).
When we connect the motor to the 5V directly - it works.
When we build the entire board - it does not. We tried connecting the motor to the analog output of the Arduino (that the program writes to) - and it does not work, although there seem to be voltage on the output.
1. Is there a difference between the power from the "5V" output and the programmable ones?
2. How can we troubleshoot the board? Is there some "expected voltage" in the various points on the board, that we can compare with?
Thanks
Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you connecting the motor to the arduino output ? (I hope not :-) )
Could you post the code that drives that pwm output ?
Logged

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 49
Posts: 2544
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1. Is there a difference between the power from the "5V" output and the programmable ones?

The "5V" output is limited in power by the onboard voltage regulator and will be somewhere around 800 milliamps and that current is shared by everything on the board. The current from a single output pin (the "programmable ones") needs to be limited to 40ma max (20ma limit is recommended) -- going over this 40ma limit can burn out the pin.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To tuxduino - we connected it to the 5V output, just to see that it is working. You can see the program in http://ardx.org/src/circ/CIRC03-code.txt. You can see the entire board in http://www.oomlout.com/oom.php/products/nedx/ncir-03 (only we used a 10K resistor, which is what the kit included).
To Chagrin - we are new to the Arduino. How do we control the current to the output PIN? Is the value that we provide in the software voltage or current?
Thanks for the help
Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the links. There are no problems hardware-wise (of course :-) ). The sample sketch seems good to me too.

Quote
How do we control the current to the output PIN? Is the value that we provide in the software voltage or current?

Via software you don't specify neither voltage nor current. Non-pwm pins can just provide 0 or 5V. Output current depends on the circuit. Pwm-enabled pins (3, 5, 6, 9, 10, 11 - cfr http://arduino.cc/en/Main/ArduinoBoardUno) can emit a square wave with a software-controlled duty cycle. That's what you control via analogWrite(). Comments in the sketch are quite clear, IMHO.

HTH
Logged

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 49
Posts: 2544
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Adding to the above, the 10K resistor controls how much current comes from the pin. 5V / 10,000ohms = .5 milliamps.

.5ma also seems very low; per the p2n2222ag datasheet that's only ~150hfe, so only .5ma * 150hfe = 75ma that will flow through the transistor. Do you have any lower value transistor (200 ohm minimum) that you can use?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Chagrin!
The kit also has a 330 resistor, and now it is working!
Thanks for the assistance
Logged

Pages: [1]   Go Up
Jump to: