-
Notifications
You must be signed in to change notification settings - Fork 3
General PWM Tutorial
PWM is a way of signalling or controlling the state of something. It consists of a constant-speed clock cycle, during which the signal is on for some time and off for some time. The percentage of the time it is on is called the "duty cycle".
PWM can be useful for running a motor at variable speed. Instead of trying to regulate the voltage to different levels, if you turn the motor on and off fast enough, it will behave no different then running continuously, just at a slower speed. Same goes for LEDs, where PWM is a very common method of dimming the brightness.
Note that there is a difference between the PWM output of something like the BeagleBone Black, and that of a motor controller. While the signals do look the same, the motor controller is designed to output a lot of current to actually power a motor. If you try to connect a motor directly to the BagleBone, you will liekly damage it, as it cannot handle the load. THese outputs are only meant for signalling, where the current flowing is negligible.
PWM can also be used for signalling information to another device. It can only transfer a single piece of information, which is the duty cycle, but for some applications, like the Talon motor controller, this is enough, and very simple to implement.
Here is a diagram that illustrates some of the different aspects of a PWM signal:
Quick Links:
NuGet
Pin Diagrams: RPi | BBB
Developers: CaiB, Baldstrom
General Info:
Home
Common Issues
Getting Started
Supported Devices
Sections:
Logging
DataLog
Filters
Hardware I/O:
- BeagleBone Black
- Raspberry Pi
- Pin Diagrams: RPi | BBB
- GPIO: Using | For Beginners
- PWM: Using | For Beginners
- ADC: Using | For Beginners
- I2C: Using | For Beginners
- SPI: Using | For Beginners
- UART: Using | For Beginners
- CAN: Using | For Beginners
Networking
Sensors
StateStore
Other: Interesting Case Studies