About two years ago, a cheap five dollar microcontroller has been entering the maker scene, featuring b/g/n wireless LAN. The ESP8266 is manufactured by a Chinese company, called Espressif Systems and became soon very popular as a building-block for home-automation and IoT projects.These modules were distributed on Ebay, the Amazon Marketplace or AliExpress for a few dollars. However, communication with most of the ESP8266 modules requires an external USB-to-Serial-Adapter and a special procedure to bring the device into “flash-mode”, which can be cumbersome in some cases, especially for beginners. With the brand-new WeMos D1 Mini, the setup was significantly simplified, so that it is as easy to use as an Arduino UNO.
… Santa Claus is coming to town! OK folks, its time to dig in the basement to take out and put up all the shining holiday decorations. And if you like tinkering, a LED cube might be a nice Christmas project or could even make a nerdy gift. So here is my cube of light art:
A Google search reveals thousands of hits on how to construct a 4x4x4 LED cube. Since I wanted to put my cube on display in the living room, I rather preferred a professional design than soldering the cube onto a bare prototyping board with lots of loose wires sticking out. Therefore, I assembled it on two stack-able prototyping shields:
I recently purchased a cheap USBasp clone (Made in China), originally developed by Thomas Fischl. It is an USB in-circuit programmer for Atmel AVR controllers. It simply consists of an ATMega88 or ATMega8 and a couple of passive components. The programmer uses a firmware-only USB driver, no special USB controller is needed.
No driver is needed under Linux in order to program Amtel chips. With the Arduino IDE, it is enough to connect +5V, GND, MISO, MOSI, SCK and RESET to the respective pins of the microcontroller. However, after uploading a sketch, avrdude complained about an outdated firmware version:
avrdude: warning: cannot set sck period. please check for usbasp firmware update
So I decided to attempt to update the firmware on the USBasp using one of my Arduino UNO boards as the programmer. There is a lot of confusing information on the web about how to do this, so here is what worked for me:
I recently purchased a Serial-to-TTL adapter at the Amazon Marketplace for programming of micro-controllers, such as ATMega328P.
The device worked very well until I plugged it into a machine running Windows. It turned out that it contains a counterfeit FTDI chip. The latest FTDI driver bricked the device by setting it’s product ID to “0000”. I understand that FTDI tries to react on faked chips, but I would say that this is quite conniving. I’m a victim of a counterfeit product and I had no chance to recognize a faked chip when I placed my order. FTDI promised to roll back and to stop distributing the malicious driver via Windows Update. However, what shall I do with a bricked device?
Fortunately, there is a method to reset the FTDI chip back to its original VID:PID of 0403:6001:
- Plug-in the bricked device and check the ID with “lsusb” (if it is bricked, it shows 0403:0000).
- To re-program the EEPROM, download ft232r_prog from ft232r_prog (v1.24).tar.gz and extract it to a folder. To compile the program, make sure to have libftdi-dev installed on your system.
- After building the program, run:
sudo ./ft232r_prog --old-pid 0x0000 --new-pid 0x600
- Now, unplug and re-insert your USB device and run “lsusb” again. It should show the proper id of 0403:6001. The device should show up again as ttyUSB0.