Avid readers of Hackaday are the kind of folk who would build a fan with an RTOS, or at the very least use an MCU. Utilizing a MCU for motor control makes a lot of sense since it allows for advanced control logic, integration with peripheral components and even more precise control over the output with techniques like Binary Code Modulation.
Fundamentally we use the hardware PWM generator found on many common MCUs. That means we could easily use the H-bridge we mentioned before. H-bridges will work great for many MCU integrations. If we are limited on I/O pins or processing overhead, we need to switch to specialized motor drivers.
Before you object, you should know that H-bridge ICs are considered drivers too. However, we need to differentiate parts that provide additional logic and/or communicate over I2C/serial.
These drivers generate their own PWM based off serial instructions, saving hardware interrupts, a few pins and general overhead. Plus, if they're the I2C flavor, we can chain multiple controllers together. Examples of both serial and I2C-controlled include the DRV8823 & DRV8830, respectfully.
Need more power? You can use our old friend the megaphone (Mosfets) or find chips that can handle more power. But what if you need more motors? Like 16? Or 992? Parts like the PCA9685 are general-purpose multichannel PWM controllers, usually used for LEDs or Servo, but make great BDC controllers when paired with the right H-bridge.
Protip: If you need to control a BDC on a existing product like a scooter but don't want to significantly modify it, you can use a Digital Potentiometer in lieu of the throttle. Pair that with an MCU and you got a great ride for Burning Man that can return to your train commuter when you get home (true story.)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.