when using a motor driver chip with the picaxe 28 board, the manual says outputs 4,5,6,and 7 are used by the motors. but could another output be connected to the normal output (the motors are connected to their own space), such as LED headlights or similar that would run when the motor does?
I am very sur I can answer
I am very sur I can answer this one. And I would love to. But I cannot understand the question?
4,5,6 and 7 out are hard-wired to the motor driver, and on to "motor A&B" on the 28 proto board…
Frits
I think they are asking if you can run some led’s off the signal-only pins (between the pic and the motor driver -the one(s) you use for the sonar sensor) at the SAME TIME you are using the motor driver. i.e. red and green led’s come on as the motors come on. -Yes?
www.rocketbrandcustom.com baby!!
Fanout or fan out
Microncontroller and logic outputs in general have a property called fanout, which is a term refering to the number of devices one output can drive. So yes, you can connect a number of devices to one output, but the current usage needs to be checked. The motor driver,probably only uses 1 mA or less to change the motor outputs (can be read from the data sheet, might even be uA level). An LED headlight would require a significant amount of current, maybe 5 to 20 mA depending on the device and limiting resistor used. What I would suggest is checking the datasheet of the PIC used on the PICAxe you have, and see what current capabilities outputs 4, 5, 6, and 7 have, then make sure your headlights can run on sinifcantly less than that. As an example of the numbers, I estimate a PIC to have 15 mA output capability, but use 5 mA as a upper limit. An LED may have a 0.8 forward voltage drop, so from a 5 volt high, use 4.2 in Ohms Law. V = IR rearranged to V / I = R would be 4.2 / 0.005 = 840 ohm. So use an 820 ohm standard value resistor in series with this hypothetical LED. (gray red brown (silver or gold))
thanks
Sorry about the other stuff on the picture, its the only one i could find. The motors are connected to the space labelled in red, but I assume there is still a signal going to the output ribbon cable connector. Could this be used to power something else that would turn on when the motor runs?
Check and see
Take a multimeter and watch the voltage change as the motors are moved by your program. If those pins go from around 0 to 5 volts, then yes, they can be used to drive LEDs with the limiting resistors, to stay within the current drive of the pin.
yes, it works. I tried it
yes, it works. I tried it and it seems to work fine without a resistor, possibly because the motor and chip draw most of the current. Outputs 5 and 7 are on when the motors run forwards, and 4 and 6 on when in reverse.
Oh - I am sorry I did not
Oh - I am sorry I did not understand your question at first. That is actually quite a nice little hack you have made up there! I think you should add that as a Tip / Walkthrough (Look at the front page, top left) - for others to use as well.
I am sure many out there would like that idea, including myself; It is so easy to implement, and has such a great visual effect… and does not even take up an extra pin or anything, way cool!!