DC fan / motor module (with transistor) with TinkerPie
A fan with its own driver board. For wheels, use MOTOR 1 / MOTOR 2.
| Type | Outputs and actuators |
|---|---|
| Connect to | any accessory pin |
| Gives | 0-100 % speed |
| Simulator | Yes: a control appears under the simulated board |
How it works
A motor needs much more current than a board pin can give. This module has a transistor that acts as a fast electronic switch: the small pin signal controls a bigger current from the supply. PWM switches it on and off very quickly to set the speed.
How to wire it
Signal pin to S1-S4 or P10-P13. Motors, pumps and lamps always go through the relay or a driver module, never straight to a pin.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
outputs.fanSpeed(Pin.S1, 70)
// Arduino C++
outputs::fanSpeed(Pin::S1, 70) Good to know
- Speed 0-100 % with PWM.
- Use MOTOR 1 / MOTOR 2 on the board for robot wheels (they can go forwards and backwards).
- Keep fingers away from a spinning fan.
Similar modules
- Relay module
- LED module
- Traffic light module
- Laser module
- Active buzzer module
- 16-channel servo driver PCA9685
More projects to try
Questions
Can I try the DC fan / motor module (with transistor) without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
Why not connect the motor straight to the pin?
A pin can safely give only a few tens of milliamps, but a motor needs hundreds. The transistor module does the heavy work and protects the board.