Is it possible to pull all 4 motor ports connected to the H-bridges high? I have 4 leds connected to the motor ports, 1 to each port but I can only get 2 to come on at a time.
I am currently sending a PWMs to all 4 ports put only 2 lights come on at a time. All 4 LED’s work if they are called one at a time though.
edit: I have a baby 168
Answers to questions like this can be obtained from a quick perusal of the TB6612FNG motor driver’s datasheet, which is linked from the product page’s resources tab. If you look at the motor driver’s truth table, you can see that it’s not possible to drive both outputs high, but you can drive both outputs low by making both motor inputs high, and you can make both motor outputs high impedance by making both motor inputs low.
Can you tell us more about your application? Why are you using the motor-driver outputs to light LEDs? Do these LEDs that draw more current than you can supply with a standard digital output?
I currently have 2 tri color led’s in parallel and a 2nd (4th channel) connected to the motor ports. Each color of each tri color led pulls 12 milliamps and the additional led pulls 20 ma. If I turn on all the LED’s at once they will pull about 92 milliamps. If I remember correctly the most current you want to pull thru the microcontroller is about 50 milliamps so this is why I am running the LED’s off the motor drivers. I may just run half the LED’s off the motor ports and the other half off a digital I/O pin.
I tried looking at the data sheet but most of it didn’t load right. It looked like this when I opened it.:
What happens if you try downloading the pdf and opening it with acrobat?
Take a look at note 4 on page 303 of the ATmega168 datasheet (under the electrical characteristics section). In general, I expect the I/O pins on the mega168 to be able to supply more than enough current for your application, since each pin can source up to 40mA, and the total source current limit on a bank of pins is 150mA per bank (where the particular banks are defined in note 4).
How does the voltage regulator on the board hold up with a 90 milliamp draw?
I looked up the specs and the recommended limit is 100 milliamps with a max of 150. I am using a 6-7 volt supply (5 nickelmetalhydrate cells)
search.digikey.com/scripts/DkSea … -5.0DKR-ND
A 90mA draw might be a bit high for the regulator since the on-board electronics might draw 20mA or more depending on what the AVR is doing. Can you decrease the current to the LEDs slightly to get the total LED draw closer to 70 or 80mA?
Also, you usually won’t have all the LEDs on at the same time, right?
I may have all 4 LED’s on at some points
I will just wire 2 to the motor controller ( 1 per channel) and 2 thru the I/O pins.