March has been a funny old month. The launch of the Raspbery Pi Zero W was an interesting event. Most of February was spent evaluating the direction of future developments. The launch of the Pi Zero W in early March influenced those decisions.
It feels like nothing was really completed but the foundations for the next few months have been set. Here’s a few of the things March has bought our way:
- Release of the Raspberry Pi Zero W
- Moving from MicroPython on the ESP32 to Python on the Pi
- TXS0108E level shifting IC
- Teensy 3.6
More precisely, MicroPython. The increasing number of platforms supporting MicroPython has made this an interesting development environment. In theory the code developed on one microcontroller supporting MicroPython should be portable to other microcontrollers with relative ease.
The Raspberry Pi Zero W changed all of that.
There were several microcontrollers running MicroPython at the start of February, the ESP8266 was common and cheaply available. A beta version of MicroPython became available for the more capable ESP32 around the same time.
The arrival of the Zero W means that the full Python language is available on a development board running 5-20 times faster than an equivalent microcontroller development board. All this with the added bonus of WiFi and SD card built in.
Another attractive feature of the Zero W is the cost in the UK. The most powerful microcontroller boards available in the UK cost between 1.5-2 times that of the Zero W including shipping.
The net result, I’m starting to look at the Pi Zero W as a possible go to board for future projects.
One recent project requires the use of 5V logic, a problem when current microcontroller boards are using 3.3V logic levels. Some are 5V tolerant, but not all. Ideally the microcontroller I am after should allow for 40+ GPIO pins. The only microcontroller in the arsenal with this number of pins is the Teensy 3.6. Sadly this in only tolerant to 3.3V signals. Interestingly, I found a reasonably priced bidirectional level shifter, the TXS0108E, so some experimenting required to see if I can use this part. The aim is to use the Teensy to inject test signals.
Time to break out the breadboards and KiCAD.
I have had PlatformIO installed on the laptop since I first came across it last year. For most of that time it was being used as a simple text editor. What I never appreciated was the ability to program a number of development boards, a large number of development boards.
Time to uninstall the Arduino IDE on the Mac.
A current project requires some memory, only a small amount, something suited to the 2114 4096-bit memory IC. A quick eBay search results in 20 ICs in the post. Only problem now is to make sure I understand how they work and test the batch of chip. Enter the Arduino Uno and PlatformIO.
As noted, one current project requires a large number of IOs, something the Teensy 3.6 can bring. A quick package update installs the Teensy 3.6 board into the PlatformIO environment.
Time to write and deploy a quick test application, enter Blinky… No luck. PlatformIO uses the teensy_loader_cli application to deploy the hex file to the Teensy board. The default package deployed with PlatformIO did not upload the binary file to the Teensy. the solution was to build a new version of the teensy_loader_cli application and overwrite the one supplied with PlatformIO. Success!
For those who are interested, the solution is:
- Download the source code from GitHub
- Edit the Makefile
- Change the OS version to MacOS
- Uncomment the line USE_LIBUSB ?= YES
- Rebuild the application
- Copy the new version of the application to the tools directory, in my case this was ~/.platformio/packages/tool-teensy
It seems that nothing much was completed but the work set the stage for future developments.