This is another small module to measure air pressure, temperature and humidity. Two sensors are on-board: MS5637 and HDC1080. Microcontroller is small cortex M0 in TSSOP-20 housing from STM: STM32F070CxP. The SN65HVD72DGKR provides RS485 interface functionality with half duplex mode. Voltage regulator, reverse polarity protection and some LED indicators are provided on-board. Complete module is 10x55mm, produced on single-sided PCB, easily producible in every home lab with proto-PCB capability.
It’s been a long wait, but our latest single board computer for review is finally here! The BBC micro:bit, given free to every seventh-grade British child, has landed at Hackaday courtesy of a friend in the world of education. It’s been a year of false starts and delays for the project, but schools started receiving shipments just before the Easter holidays, pupils should begin lessons with them any time now, and you might even be able to buy one for yourself by the time this article goes to press.
It’s a rather odd proposition, to give an ARM based single board computer to coder-newbie children in the hope that they might learn something about how computers work, after all if you are used to other similar boards you might expect the learning curve involved to be rather steep. But the aim has been to position it as more of a toy than the kind of development board we might be used to, so it bears some investigation to see how much of a success that has been.
Opening the package, the micro:bit kit is rather minimalist. The board itself, a short USB lead, a battery box and a pair of AAA cells, an instruction leaflet, and the board itself. Everything is child-sized, the micro:bit is a curved-corner PCB about 50mm by 40mm. The top of the board has a 5 by 5 square LED matrix and a pair of tactile switches, while the bottom has the surface-mount processor and other components, the micro-USB and power connectors, and a reset button. Along the bottom edge of the board is a multi-way card-edge connector for the I/O lines with an ENIG finish. On the card edge connector several contacts are brought out to wide pads for crocodile clips with through-plated holes to take 4mm banana plugs, these are the ground and 3V power lines, and 3 of the I/O lines.
It is obvious when compared to other single board computers that this one has been designed with the pocket of a 12-year-old in mind. It’s a robust 1.6mm thick board that is devoid of pins and spiky connectors, and on which care has obviously been taken to ensure as low a profile as possible.
In hardware terms it has an ARM Cortex M0 processor from Nordic Semiconductor, a compass, accelerometer, Bluetooth Low Energy and USB as well as the previously mentioned switches, LEDs, and GPIOs.
To use the device, you have the choice of connecting it to your computer via USB, or to your phone or tablet via Bluetooth Low Energy. Sadly none of our devices support BLE so for this review we’ll be taking the former approach.
All programming is performed through a selection of web-based environments, with code editing and compilation performed online and the resulting binary file arriving as a download before being placed on the micro:bit by the user through the filesystem. Since the micro:bit is also an mbed under the hood we’d expect it to be programmable using the mbed toolchain, however that is beyond the scope of this review.
In use, the Code Kingdoms editor is straightforward and intuitive, the code for a simple compass you can see in our screenshot was very quick to assemble as a first effort. Unfortunately though in our browser at least it was extremely slow, at times almost to the point of being unusable. In particular when you wish to remove a code block it starts up an animation of its waste bin opening up which slows the browser to a crawl. It is not a good sign when you load a web page and hear your processor fan spin up.
Following the Code Kingdoms editor is Microsoft’s Block Editor. This is a drag-and drop visual editor in the same vein as the Code Kingdoms editor, except that there is no pretence of building a more traditional coding language and it is a much faster and smoother experience. The interface is broadly similar in layout to the Code Kingdoms editor, except for the compile and run commands which are at the top, above the coding window.
In our screenshot you’ll see a very simple environmental monitor designed to display readings from the micro:bit’s various sensors. Yet again this was a simple and intuitive piece of software to assemble for someone using the environment for the first time.
The third environment is another one from Microsoft, their Touch Develop editor. This is different from the other editors in that it is designed especially for use in touch environments on tablets and phones, so we tested it on an Android phone.
While the Touch Develop editor follows the same idea as the previous two of building code by selecting blocks from menus, it creates something a lot closer to text code, and requires the user to manually enter for example function parameters. We found its help system to be a little difficult on this front, it’s doubtless a useful editor if you know its intricacies but there is quite a learning curve for a first-time user.
The Touch Develop team have made as good a good job of putting a development environment onto a phone screen as they could and it is very usable, however due to the limited screen space it is still a little awkward and crowded. With luck this should be less of an issue for tablet owners.
It is worth pointing out that this editor can be stored as an offline bookmark allowing it to be used without an Internet connection, however it is not clear how any code written in this way might be compiled.
The final editor choice for the micro:bit is Python, in fact a micro:bit build of MicroPython. This editor lacks the software micro:bit emulator, but is much more like the kind of software environment that Hackaday readers will be used to. The main window is a straight text editor ready to type your Python into, and there is no menu of predefined code blocks. Instead there is a comprehensive introduction, tutorial, and documentation of the various micro:bit Python libraries, and once you are armed with those you can step right in and start writing code.
In use if you are happy with Python it is very straightforward. If your code generates any errors they are displayed scrolling across the micro:bit’s LED matrix which can be rather tedious, however at least the errors we generated were informative and led us straight to the points in our compass code which had gone wrong.
Looking at the libraries available in this editor it becomes clear that Python is the most powerful way to control your micro:bit. As well as the simple functions available in the other editors it offers libraries for I2C, SPI, UART, Neopixels and more. It’s immediately obvious that this is where the micro:bit’s “Wow!” hacks are most likely to be created.
Having looked at all the editors, our choices would be Python as the most powerful coding environment for experienced coders, and the Microsoft Block editor as the most useful drag-and-drop environment for beginners. The Code Kingdoms editor is nice but glacially slow, and the Touch Develop editor is a bit fiddly. It’s worth mentioning that all the editors have an option to save code locally, this produces an LZMA-compressed file with raw code in a JSON structure.
Of course, though some of us may benefit from it, this board is not made for Hackaday readers but for children. If it gets the recipe right, in a decade’s time it will be cited by a generation of new graduates as the machine that got them into software, but has it hit the mark? Since the children in question are only now receiving their first lessons it’s a bit early to tell, but the teacher lent us this micro:bit for the review tells us there are only two minor gripes. Not having an on-off switch they go through batteries at a phenomenal rate, and since their failed programs show no LEDs they think they’ve killed it when their software doesn’t work. The first it’s possible the kids will fix themselves by learning to unplug the packs, and perhaps the micro:bit people can fix the second with a software update. If these are the worst things that can be said about it though there can’t be too much wrong with it.
How big is it ? For starters, the 8-bit adder module is about 300mm (a foot) long – and he’s using five of them. When fully complete, it will stretch 14m wide and stand 2m tall, filling a 30 sq.m room, consisting of seven individual frames that form the parts of the Megaprocessor.
The original plan was for nine frames but he’s managed to squeeze all parts in to seven, building three last year and adding the other four since then. Assembling the individual boards (gates), putting them together to form modules, then fitting it all on to the frames and putting in almost 10kms of cabling is a slow, painstaking job, but he’s been on fire last few months. He has managed to test and integrate the racks shown here and even run some code.
The Megaprocessor has a 16-bit architecture, seven registers, 256bytes of RAM and a questionable amount of PROM (depending on his soldering endurance, he says). It sips 500W, most of it going to light up all the LED’s. He guesses it weighs about half a ton. The processor uses up 15,300 transistors and 8,500 LED’s, while the RAM has 27,000 transistors and 2,048 LED’s. That puts it somewhere between the 8086 and the 68000 microprocessors in terms of number of transistors. He recently got around to calculating the money he’s spent on this to date, and it is notching up over 40,000 Quid (almost $60,000 USD)! You can read a lot of other interesting statistics on the Cost and Materials page.
And kudos to his crazy Ninja skills to notch up just a few failed, bad solder joints, out of a total of over 250,000, and one dead transistor from among almost 42,000. A few cable crimping issues were the least of his troubles. The worst part was when he received a wrong batch of 4000 transistors (correct purchase order, correct packing list, but wrong parts bagged). He realized the problem after soldering all of them, setting him back by quite a bit. He didn’t bother de-soldering them but instead just built fresh replacement boards. He also built a hardware/software simulator for the Megaprocessor using an FPGA board to help him validate his design. Among the first programs he created were a few games (obviously) – Tetris, Tic-Tac-Toe, Life – for which he needed a suitable input device. So he modded a Venom Arcade stick which usually expects itself to be connected to a PlayStation via USB. He says it was “a very civilized thing to mod”.
There is a LOT more interesting stuff to read on his detailed blog posts, so go grab a supply of Coffee, switch off your Phone, and settle in for a few hours diving in to his crazy-awesome build. “This is nuts” said [Clovis Fritzen], who sent in this tip via the BBC News website. Thanks, and we’d agree with his assessment. Check out a couple of videos of the Megaprocessor in action below.
Mini USB dongle with STM32F0xx is suitable many for simple, mini projects. I attached speaker to Timer14 PWM output (Pin PA6) and LED (or optocoupler connected to PTT) to GPIO pin PA0
The provided software is based on USB Virtual Com Port (VCP) device. The setup is done with command line interface using terminal from any PC. The setup is stored in the internal flash and PC is not required for normal operation. The mini beacon keyer can be used when powered with 5V.
What I wanted the LUFA library to do was pretty specific – the atmega16u2 should show up as a virtual serial port so that the computer can connect and read data from it like any other serial port. All of the other ways of communicating over USB eg HID etc wouldn’t do it. There was one example that came with LUFA that fit the bill – VirtualSerial. There were a few problems with getting this example to run on the atmega16u2 so I’ll document them and what the fix was.
Over the last few months I have been playing with the Nucleo development boards from STMicroelectronics. If you’re unfamiliar with them, they are fast, mbed and Arduino (headers) compatible. This makes it easy like an Arduino to program and use. What sets them apart is that they are 32bit and have, depending on the model, tons of memory and flash. The Nucleo boards maintain the Arduino footprint but also have headers for the extra pins which gives this board plenty of GPIO for your projects. In turn, you end up with multiple buses such as SPI, I2C, and UARTs for your consumption. They are priced very well and come in different flavors based on your needs. Each flavor is based on different ARM Cortex architectures such as M0, M3, and M4. One of the best features is real debugging via ST-Link/V2-1. The unfortunate thing due to the nature of mbed, you can only use the debugging features using a full desktop IDE such as Keil or some of the other free alternatives. But mbed allows you to export your code from the online IDE to the project format for those IDE’s. So there’s that.