RoadTest: BinaryBots: TOTEMCRAB + micro:bit
Author: stevesmythe
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: Grove Inventor's Kit for micro:bit, Meccanoid G15, Lego Boost
What were the biggest problems encountered?: Incomplete educational materials, particularly coding examples for Microsoft MakeCode
Detailed Review:
Thanks to element14 and CBisEducation for providing me with the BinaryBots Totem Crab kit to review. I thought I’d get my review finished early in case anyone was thinking of getting one for someone’s Christmas present!
CBisEducation is a relative newcomer in the world of STEM education. Their first products were BinaryBots Dimm and UFO cardboard robots, a robotic arm and a remote controlled car, all using the BBC micro:bit.
They have now released their Planet Totem series of three robotic creatures based around their own “Meccano-like” building system and two custom-designed boards. The three Planet Totem kits are Crab (the subject of this review), Spider and Tortoise. All three kits have the same electronics – just the mechanics differ between them. Unlike the Dimm kits, the Totem kits do not come with a BBC micro:bit, but element14 kindly supplied one for this review.
The box contains several labelled bags of building components (plastic beams and plates, metal nuts, hex head bolts and brackets), a magnetic-head hex driver, instruction booklet (with an erratum supplement to correct a coding omission in the original booklet) and two ready-assembled circuit boards.
The Totem custom-designed boards are made for the BBC micro:bit and comprise a “power board” and a “sensor board”.
The power board consists of an edge connector into which you slot the micro:bit, a 3xAAA battery holder, three motor ports and an on/off switch. Rather than use a small servo to control the positioning of the claw pincers, BinaryBots have opted for a standard DC micro-metal motor which uses a worm gear to slow it down (and increase torque). One micro metal motor is provided in the kit. This operates one of the crab’s claws (the other claw is fixed). Motor ports 1, 2 and 3 on the power board connect to pins P13 & P14, P15 & P16 and P8 & P12 respectively on the inserted micro:bit. Pins P19 & P20 on the micro:bit are reserved for the I2C port. This leaves 11 unused pins on the connected micro:bit but CBisEducation have brought out the three most commonly used pins (P0, P1 AND P2) plus 3V and GND onto banana plug terminals at the front of the power board. I think the power board is a good design - three small batteries keep it compact, three motor drivers give plenty of scope for robotics and three spare pins is probably enough for most purposes, given that the sensor board provides several ready-to-use components.
The sensor board contains 4 RGB LEDs, a piezo-sounder, vibration motor, a light-level sensor, temperature sensor and two touch button/slider sensors. The touch button/slider sensors are quite complex; along each strip there are three “button points” and 100 “slider points” that can be detected. The sensor board is actually a standalone microcontroller board based on the STM32F051K6 ARM Cortex-M0 Access line MCU with 32 Kbytes Flash and 48 MHz CPU. The micro:bit communicates with the sensor board CPU via I2C and the sensor board CPU, in turn, communicates with its own sensors and actuators and passes the data back along the I2C bus to the micro:bit. This means that the micro:bit only needs to know the I2C address of the board – not of the individual sensors and actuators. The firmware on the board listens on the I2C bus and sends the data requested.
The RoadTest got off to a bad start when I noticed that one of the SMD components on the sensor board was only connected at one end.
Apart from the badly soldered component, there were other quality control issues with the kit that I was sent. There were several missing connectors and some badly-matched plastic pieces.
I got in touch with CBisEducation, who immediately offered to swap the sensor board and send me the missing pieces. They also supplied some more information about which micro:bit pins are mapped to the three motor connectors on the power board, but they were reluctant to provide information about the specification of the motor drivers and the wiring of the IC2 connectors. I sensed that they didn’t really want people to connect the sensor board to other microprocessors or to use the power board with non BinaryBots micro:bit projects, which seems a pity. If you have invested in this kit, it does not seem unreasonable to want to repurpose parts of it when the novelty of the crab wears off.
Now armed with the replacement board and missing components, my 10 year-old son and I first tried assembling the crab from the instruction booklet, but a combination of slightly vague instructions and hard-to-see photos made this a frustrating experience. The videos on the website were much easier to follow (although they don’t always match the booklet instructions, which is confusing). Some of the instructions were open to misinterpretation (such as “screw the bracket three holes in from the edge of the board” – without being clear which edge they were talking about). In comparison, Lego instruction diagrams are so clear that no words are needed – and no ambiguities arise. Other instructions were just really tricky (e.g. making the six brackets for the crab’s legs) - see the photo below.
Just assembling the six legs onto the crab base took over an hour and we found it more frustrating than enjoyable and the end result was somewhat disappointing, considering the effort.
As can be seen from the photo above, the construction system consists of plastic beams and plates that are connected together with metal nuts, hex head bolts and brackets. The nuts are held captive in slots in the beams, and the bolts are screwed in with the supplied magnetic-head hex driver. As a result, bolting the beams together is slightly easier than classic metal Meccano, where it is easy to drop the nuts and bolts while you try and fit them together. The Totem Crab kit comes with a magnetic hex driver, which can be a mixed blessing. It’s good that you can pre-load the driver with the bolt so that it doesn’t fall off while you are manoeuvring it into the hole. However, you do sometimes end up picking up metal nuts and bolts that you didn’t mean to. Also, the top of the hex driver tool kept unscrewing itself as I held it against the palm of my hand.
Whether you follow the instructional videos on the BinaryBots website, or use the booklet provided (“Inventors Manual”), the first bit of coding you will do will be to make the claw open and close using the excellent MakeCode for micro:bit block-based coding environment.
As far as I could see, after that, you are on your own unless you then move to the Python environment as there are no further examples or tutorials using MakeCode. For younger children, this could be disappointing, as they would want to make use of the sensor board with its RGB LEDs, vibration motor and piezo-sounder but no help is given to make use of the sensor board with MakeCode. It could be quite a big leap to go straight into Python coding. See below for how I worked out how to control the sensor board with MakeCode.
If you compare the educational resources provided with those provided by Kitronik or Seeed Studios with their Inventors Kits for micro:bit, the resources provided by CBisEducation are very limited. The videos are good but only really help with the construction of the crab. The website resources are poor. At the very least, I would have expected some more MakeCode coding examples and more details about the sensors.
Since there were more examples provided for coding with Python, I started with that. I used the Mu editor and micropython rather than the micro:bit online Python coding environment, just because I like it (it is fast).
CBisEducation have provided several examples of Python code on their website [https://www.binarybots.co.uk/activities] to move the crab’s pincers, control the LEDs and read the touch and temperature sensors. For beginners, I think it would have been more helpful if CBisEducation had written a Python module with functions to which you can pass parameters, rather than having to use the ‘struct’ data format, which can be quite complicated.
The Python struct.pack function converts all the data into two formats (‘B’ for 8-bit data and ‘H’ for 16-bit data).
The board uses command numbers to identify which board device to use. Here are all the valid commands and data expected:
Function | Command number | Data Format |
LED | 0 | ‘<BBBBB’ |
Buzzer | 1 | ‘<BBH’’ |
Vibrator | 2 | ‘<BHB’ |
Read Buttons | 4 | ‘B’ |
Read Sliders | 5 | ‘B’ |
Read Light sensor | 6 | ‘B’ |
Read Temperature sensor | 7 | ‘B’ |
Reset | 8 | ‘<BB’ |
Where there is more than one byte, the ‘<’ symbol signifies that the byte values are to be passed in ‘little-endian’ order. In the case of the LEDs, the five bytes (BBBBB) are:
[0],[LED#], [R], [G], [B].
LED# can take one of five values (one for each LED or 0 for all four). For example, to turn all four sensor board LEDs green, the example Python code is:
i2c.write(42, struct.pack(‘<BBBBB’,0,0,0,255,0))
Although the sensor board has a light sensor and temperature sensor, there is no documentation provided on either sensor, apart from some sample code. Although CBisEducation provide some sample code for reading these sensors, they do not provide any information on what the numbers represent. The Python code for the light and temperature sensors suggest that the outputs are 16-bit signed integers (0-1023) so it appears they are analogue sensors. The light sensor is clearly visible and marked on the board but there is no sign of a temperature sensor. I conclude that the temperature reading is actually the ARM Core CPU temperature, which is supported by the fact that placing my finger directly onto the MCU caused the reading to rise.
Here is the micropython code for reading the temperature sensor and printing the raw analogue value via the USB cable to the PC console (REPL):
from microbit import * import struct sleep(150) while True: temp = i2c.write(42,struct.pack('B',7)) sleep(150) i2c.write(42,struct.pack('B',7)) sleep(10) rx = i2c.read(42,2) temp = rx[0] + (256 * rx[1]) print (temp)
Substituting
(42,struct.pack('B',6))
for both instances of
(42,struct.pack('B',7))
will print the raw light sensor readings, instead of the CPU temperature, to the REPL.
By reverse-engineering the example Python code in Javascript, I was able to control the sensor board with MakeCode.
The equivalent Javascript of the example given above to turn on all four LEDs in a green colour...
i2c.write(42, struct.pack(‘<BBBBB’,0,0,0,255,0))
is:
let buf = pins.createBuffer(5); buf.setNumber(NumberFormat.Int8LE, 0, 0); buf.setNumber(NumberFormat.Int8LE, 1, 0); buf.setNumber(NumberFormat.Int8LE, 2, 0); buf.setNumber(NumberFormat.Int8LE, 3, 255); buf.setNumber(NumberFormat.Int8LE, 4, 0); pins.i2cWriteBuffer(42, buf, false);
The first line sets up a 5 byte buffer ‘buf’. The next five lines put 5 bytes into the buffer and the last line writes the buffer ‘buf’ to device address 42 on the i2c bus (i.e. the sensor board). Two of the components on the sensor board (the buzzer and the vibrator) require 2 bytes plus one word (i.e. 4 bytes in total). In those cases, the word data format is NumberFormat.Int16LE.
As can be seen, the Python code is much more economical. However, I wanted to use MakeCode because I have not yet found a reliable way to use the Grove Ultrasonic Ranger in micropython and I wanted one of those to make my Crab more entertaining. Also, I wanted to show that it is possible!
To save some typing, I created some MakeCode functions out of the Javascript. Once the Javascript functions have been defined, MakeCode turns them into blocks, as per the image below.
To make my code more efficient, I created some functions such as RedAllOn (i.e. turn all four LEDs on with colour red). Despite this, I ended up with quite a lot of grey blocks.
As well as the ultrasonic sensor, I added a neopixel ring to augment the four LEDs on the sensor board. This shines downwards and creates a nice lighting effect (orange colour changing to red when something approaches the Crab).
There is no reason why CBisEducation could not have done what I did and then created a MakeCode extension (the equivalent of creating a Python module). This would have made coding the sensor board quite user-friendly. As it is, apart from the claw motor, there is not much that a beginner can do with the Totem Crab using MakeCode blocks.
The basic crab design uses the one of the buttons on the micro:bit itself to control the crab’s claw. My son and I thought it would be better if the crab could sense a potential predator itself, so we used the Grove ultrasonic sensor that I received with the Grove Inventor Kit RoadTest and one of the spare brackets that CBisEducation had sent me. Not only did this improve the functionality of the crab but it looks good too!
I wanted to try and connect the sensor board to a different microcontroller, such as the Raspberry Pi. As mentioned, the sensor board communicates via I2C so that should be no problem. However CBisEducation don’t provide the pinout for the I2C connector and the connector itself is hard-to-find. Using a meter, I found GND and VCC easily enough, so it was trial and error to identify which way round the other components were connected. I have ordered what I think is a compatible connecting cable from China, and will update the RoadTest when I get it. I could have just cut the connecting cable that comes with the kit in half, and joined the sensor board to the Raspberry Pi that way, but I didn’t want to spoil the cable.
I was interested to see the extent to which the value of the kit could be extended by combining it with other popular construction toys, such as Lego and Meccano. It would have been nice if CBisEducation had made the boards and building components Lego-friendly if not Lego-compatible. However, the spacing of the holes on the boards and on the building components made this pretty much impossible. I had slightly more luck with vintage Meccano, of which I have quite a lot of pieces, and managed to attach the base of the Totem Crab to a Meccano chassis and Tamiya gearbox/motor unit. The Tamiya motors are rated at 3v, so I was able to connect them straight to two of the motor ports on the Totem Crab power board. Although I got it to work, it was not the slickest or smartest robot I have ever built, so I quickly dismantled it, after proving that it was possible. I had originally thought I might use the sensor board as part of the robot design, but didn’t feel that it was worth the effort.
On the whole, assembling the crab was more fiddly than a comparable Lego Technics construction set and the instructions were much harder to follow. Compared with Meccano (probably the closest match, in construction methods), I would say that the Totem Crab is of an equivalent level of difficulty, both in terms of instructions and assembly. The end result was a bit disappointing looks-wise, in my opinion, particularly the non-motorised claw which looks very rough-and-ready. I would have preferred a proper moulded claw like the motorised one. Using a micro metal motor rather than a servo does mean that fine control of the claw pincers depends on how long you let the motor run, and it also means that you need a way of adjusting the starting position of the pincers if you mess up your timings.
The finished product is quite sturdy and should stand up to robust use. I looked at the instructions for the two other Totem kits (the spider and the tortoise) and it is clear that they have a lot of components in common, including of course the same power board and sensor board. It is a pity that BinaryBots do not (yet) sell a conversion kit of parts so that you could turn your crab into a spider or tortoise just by buying a few extra components. When I suggested this to CBisEducation, they said that they were intending to do that, although they did not say what the pricing might look like. I think they should also provide plenty of spare beams and connectors. I can’t imagine that this would affect the price much, as they are mass-produced components, and it would make it easier to build your own constructions (as well as providing useful spares in case some are lost).
My son has Lego WeDo, Lego Boost and Lego Mindstorms sets. He also has a programmable Meccano Meccanoid and Snap Circuits, some sets of which allow for programming activities. The Totem Crab kit compares unfavourably with all of them. They are all more expensive, admittedly, but will provide way more opportunities for building and coding and are well worth the investment, in my opinion. All of the Lego sets can be combined with each other and with “standard Lego”. Similarly, the modern, plastic programmable Meccano toys (like Meccanoid) can easily be combined with vintage metal Meccano from 60 years ago!
The Totem Crab retails at £59.99 (including VAT) in the UK. If you include a BBC micro:bit (at least £12.50), that brings the total cost to around £72.50. The Lego Boost and WeDo 2.0 sets retail at twice that price. However, both of those Lego kits provide the parts and instructions for several different models, as well as being capable of being combined with other Lego pieces.
If you were able to build more than one model with the Totem construction kits (ideally all three) and the educational resources were better, I would say that it offers fair value for money. As it is, I think that it is poor value for money. I think that a child will lose interest once they have built the crab and followed the limited number of example programs provided. At the very least, CBisEducation should make “upgrade packs” available immediately (assuming they were in the £15 to £20 price range) and improve the documentation and educational resources.
My overall verdict is that it is an interesting addition to the range of possibilities for using the BBC micro:bit to teach “physical computing” (i.e. microprocessor control of real-world devices). The power board and the sensor board combination is great. However, as a construction kit it is quite limited. As an educational toy, it would benefit from having more educational resources (including better documentation, development of a MakeCode extension with custom blocks, and a micropython module).
[postscript]
In case anyone is interested, I have attached the Javascript that I used to control the Crab/ultrasonic and neopixel ring. Open MakeCode for micro:bit, create a new project and delete any blocks that appear, then copy and paste the whole of the Javascript code into a Javascript window. Then, if you move back to the Blocks coding window, the Javascript will be miraculously converted into blocks that you can rearrange and re-use in your project.
Top Comments
Thanks Gene! The quality control issues were a bit frustrating but I quite enjoyed working around the limitations of the documentation and getting it to work with MakeCode.
Good road test review. I appreciate hearing about the positive and, less positive, parts of your experience.
Nice roadtest review. To bad about some of the quality issues that you ran into on this roadtest. It was good that they were able to offer assistance and to correct the issues. I find it very frustrating…