Today I thought I'd finally get the robot arm - which I built some months ago - working.
A few weeks back I got the :MOVE robot controlled by a Micro:bit using tilt controls (an excellent suggestion made by one of the Ninjas) so I will build on this code for the robot arm.
However, the :MOVE mini only has two servos to control (one for each wheel) which can be each be forward/off/back.
Whereas the robot arm has a servo for each of its four joints. So twice as much to control.
Let's look at the :MOVE set up in move detail. It comprises of two Micro:bits:
Receiver: this is a radio receiver and is wired to the two motor servos which it controls. This was all supplied as a kit by Kitronik (https://www.kitronik.co.uk/5624-move-mini-buggy-kit-excl-microbit.html) and when wired up it connects
This receiver code is available at Receiver code to use: download it to a folder and then drag this file to webpage https://makecode.microbit.org/# it will decode the hex file and show you the block code.
This code uses the ServoLite code extension blocks and more details are available here. This is because there is a Servo:Lite control board between the Micro:bit board and the two servo motors on the :MOVE mini.
Transmitter: This controls the :Move by transmitting Forward, Left, Right, Back and Stop commands based on how this Micro:bit is being held or shaken.
As our robot arm has just the raw servos and no Servo:Lite controller board we need to use lower-level servo code to control its joints.
As the micro:bit cannot really supply enough power at +3v for the servos, we would ideally use a servo controller board. Like here
But if we give all four servos their own +3v supply (red wires) and just share their GND (brown wires) and control wires (orange) with the Micro:bits we should be OK.
andnd
A few weeks back I got the :MOVE robot controlled by a Micro:bit using tilt controls (an excellent suggestion made by one of the Ninjas) so I will build on this code for the robot arm.
However, the :MOVE mini only has two servos to control (one for each wheel) which can be each be forward/off/back.
Whereas the robot arm has a servo for each of its four joints. So twice as much to control.
Let's look at the :MOVE set up in move detail. It comprises of two Micro:bits:
Receiver: this is a radio receiver and is wired to the two motor servos which it controls. This was all supplied as a kit by Kitronik (https://www.kitronik.co.uk/5624-move-mini-buggy-kit-excl-microbit.html) and when wired up it connects
This receiver code is available at Receiver code to use: download it to a folder and then drag this file to webpage https://makecode.microbit.org/# it will decode the hex file and show you the block code.
This code uses the ServoLite code extension blocks and more details are available here. This is because there is a Servo:Lite control board between the Micro:bit board and the two servo motors on the :MOVE mini.
Transmitter: This controls the :Move by transmitting Forward, Left, Right, Back and Stop commands based on how this Micro:bit is being held or shaken.
- when you shake it displays O and sends the Stop command
- when tilted towards B it displays <- and sends the Go Right command
- when tilted towards A it displays -> and sends the Go Left command
- when A pressed is displays ^ and sends the Go Forward command
- when B pressed is displays v and sends the Go Back command
As our robot arm has just the raw servos and no Servo:Lite controller board we need to use lower-level servo code to control its joints.
As the micro:bit cannot really supply enough power at +3v for the servos, we would ideally use a servo controller board. Like here
But if we give all four servos their own +3v supply (red wires) and just share their GND (brown wires) and control wires (orange) with the Micro:bits we should be OK.
andnd
No comments:
Post a Comment