Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:iot-open:practical:hardware:itt:avr:dc [2025/09/02 11:21] raivo.sellen:iot-open:practical:hardware:itt:avr:dc [2025/09/02 11:27] (current) raivo.sell
Line 15: Line 15:
 ===== Practice ===== ===== Practice =====
  
-The HomLab uses a combined chip to drive DC motors, which includes two integrated H-bridges and circuit-breaking diodes. The motor is controlled with three digital signals, one of them is the operation enabling signal //enable//, and the other two are determining the state of the transistors in the H-bridge. It can never occur that two vertical transistors are opened, because this would short-circuit the power source. This means that the driver is designed as foolproof, and the only option that can be chosen is which transistor (upper or bottom) of one side of the H-bridge (of “semi-bridge”) is opened. In other words, the polarity is selected using two driving signals, which are applied to the two ends of the coil of the motor.+The HomLab uses a combined chip to drive DC motors, which includes two integrated H-bridges and circuit-breaking diodes. The motor is controlled with three digital signals, one of them is the operation enabling signal //enable//, and the other two are determining the state of the transistors in the H-bridge. It can never occur that two vertical transistors are opened, because this would short-circuit the power source. This means that the driver is designed as foolproof, and the only option that can be chosen is which transistor (upper or lower) of one side of the H-bridge (of “semi-bridge”) is opened. In other words, the polarity is selected using two driving signals, which are applied to the two ends of the coil of the motor.
  
 The Combo Board of the HomeLab allows connecting up to four DC motors. Basically, for every motor, there is an H-bridge which is controlled with two digital output pins of the microcontroller, because the enable pin is constantly high. If both controlling pins have the same value, then the motor is stopped; if they have different values, then it revolves in the corresponding direction. The state of the H-bridge is described in the following table: The Combo Board of the HomeLab allows connecting up to four DC motors. Basically, for every motor, there is an H-bridge which is controlled with two digital output pins of the microcontroller, because the enable pin is constantly high. If both controlling pins have the same value, then the motor is stopped; if they have different values, then it revolves in the corresponding direction. The state of the H-bridge is described in the following table:
Line 100: Line 100:
 int main(void) int main(void)
 { {
-  
  dcmotor_drive_pwm_init(1, TIMER2_NO_PRESCALE);  dcmotor_drive_pwm_init(1, TIMER2_NO_PRESCALE);
- dcmotor_drive_pwm(2, 1, 128); + dcmotor_drive_pwm(2, 1, 128);
- +
 } }
 </code> </code>
en/iot-open/practical/hardware/itt/avr/dc.1756812106.txt.gz · Last modified: 2025/09/02 11:21 by raivo.sell
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0