This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:iot-open:practical:hardware:itt:avr:dc [2025/09/02 11:21] – raivo.sell | en: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, | 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, | ||
| Line 100: | Line 100: | ||
| int main(void) | int main(void) | ||
| { | { | ||
| - | |||
| dcmotor_drive_pwm_init(1, | dcmotor_drive_pwm_init(1, | ||
| - | dcmotor_drive_pwm(2, | + | dcmotor_drive_pwm(2, |
| - | + | ||
| } | } | ||
| </ | </ | ||