IDC Module Motor

The motor is a smart solution for motion projects that use a simple DC motor. It allows easy connection via IDC connector and instant speed control using micro:bit in MakeCode environment. Try controlling direction, speed or timed movement and learn the basics of programming, electronics and mechanics in a fun way.

Description

The motor is a simple rotary output module that can be easily controlled with the micro:bit. It is suitable for motion experiments and demonstration models. Thanks to the IDC connector, you can easily connect it to the micro:bit via a universal fixture.

Specifications

  • Connector: IDC
  • Exit: logical (on/off)
  • Power supply: 3 V
  • RPM: 48 RPM
  • Construction: permanent magnet motor
  • Dimensions: 30 × 30 × 13 mm

Connection

To connect the module to the universal fixture, we will use a wire with a six-pin IDC connector. First, connect the flat six-core wire with an IDC connector to the universal fixture at position 1 and then connect the other side to the module. The IDC connector has a groove on one side, so it can only be connected in one direction.

Programme

Basic program

The motor can be programmed very easily and this program shows how. Since the motor is connected to the first position of the universal fixture, we work with pin 14. Using simple commands, we can write the logical values 1 (on) and 0 (off) to this pin, thereby controlling the motor. In the sample program, the motor is turned on and off by pressing the A or B buttons on the micro:bit.

In addition to simple digital control, the motor can also be controlled analogically. By simultaneously pressing the A + B buttons, an analog value corresponding to 50% of the power is written to the pin, which causes the motor to spin at half speed. This allows you to adjust the rotation speed according to the needs of the project.

Tasks

Task 1: Fan

Program the motor to automatically turn on when the temperature exceeds 31°C to help cool the room.

Task 2: Direction of rotation

Use the micro:bit's accelerometer as a joystick - tilting the micro:bit will change the motor's power. The greater the tilt, the higher the RPM.