I have a problem with a low current from the pin. A student is trying to build a vibrating output for a project.
The goal (for now) is to make the vibration motor vibrate for 10 seconds after pushing button A. I’ve read the voltage after pushing button A, it’s 3V, but when the vibration motor connects it’s just 0,23V or around that number, a severe loss. The motor works when I connect to 3V or a battery, it only has 2 wires (+&-) and I’m at a loss. I can’t find out how to connect an external battery with only 2 wires and the micro:bit.
You have not said which motor board you are using so I assume none. So you are connecting a vibration motor to the pins on the micro:bit. I assume that when you press button A you write a 1 to some pin that is connected to the motor. If that is not the case show us some diagrams and code.
A vibration motor probably takes a lot of current and that pulls the voltage down. Micro:bit v1.5 can move about 90mA while the v2 can drive about 190mA. If your vibration motor needs more than that trifling amount of power then you will need a motor driver of some sort.
Most people use an extension board that includes two or four drivers. However you can get a very cheap driver that will run a single motor in a very small size. You would connect that to the micro:bit then connect a suitable battery to the driver. The power from that battery is used to run the motor. The micro:bit doesn’t need to supply much power.
Hi @Yliander — welcome to the forum.
One of the Elecfreaks projects shows a common way to drive a DC motor, like a vibration motor, from the micro:bit using three parts (transistor, resistor, and a diode). The example is part of a pretty good kit for beginners, but the individual parts are available elsewhere: https://wiki.elecfreaks.com/en/microbit/circuit-design/microbit-starter-kit/starter_kit_case_10/