Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: tiny26, motor driver, and ISP

2005-01-31 by alan_probandt

...set A=1 and B=0 for a motor.  It'll go clockwise.  Similarly, set 
A=0 and B=1, and I get reverse (counter clockwise).  And the PWM 
signal on the Enable line then turns the motor on for only small 
snippets of time, as defined by the duty-cycle.

  The Pulse Width Modulation signal is switching the A and B lines in 
the same manner as the original design switched the enable.  The PWM 
is controlling the speed of the motor by controlling the amount of 
power that gets to the motor.  A PWM signal that is on 25% of the time 
is driving the motor at 1/4 of the full speed (not sure of the exact 
conversion ratio here).
  The AVR allows the timer to be set with a few instructions to output 
a PWM signal continously on one or two of its pins.  Set up the timer, 
plug in the numbers for the Pulse Width percentage, and start the 
timer.  The AVR can then monitor the motor speed and other sensors for 
a closed-feedback controller loop.
  Putting a PWM on the enable pin MAY have unintentional side effects 
in the H-Bridge driver chip.  The tech support of the chip's maker 
could be questioned, or the company field service engineer.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.