We have used (at least) three different Linux controller boards during development of our prototypes, and if you are building your own unit then you can choose any of these – or with some extra work, probably quite a few others.
Our fearless leader Mark built the first prototype using a Raspberry Pi. This was natural, as the hardware was low cost, readily available, and Adafruit have a great Linux distribution with some neat features like hardware SPI support. They’ve even published a great tutorial on running LED strips off the Pi, with a shout out to my good friend Gav and his neat LightScythe project.
The Olimex OLinuXino also attracted us due to the low cost, but even more because of the open hardware licensing. This was after looking at a couple of other vendors, and their unfriendly non-disclosure agreements.
So, what is involved in using one of these boards to run some LED strip?
Well not too much, especially with the Pi.
On the Raspberry Pi, you basically just need to make 4 connections into the GPIO header on the Pi. That’s it. No other modifications, no soldering (apart from your cables). This will even provide power to the Pi.
As shown in the photo, the 4 connections to the Pi are:
- Red wire = 5V (back row, first pin)
- Black wire = GND (back row, third pin)
- Green wire = SPI Data Out (front row, fourth last pin)
- Blue wire = SPI Clock Out (front row, second last pin)
There is also a good diagram of the GPIO to LED wiring at the Adafruit site.
The only issue with the Raspberry Pi is that with an SD card sticking out one end, and a USB WiFi adapter out the other, it can get pretty long. I like the pIO adapter, available from ModMyPi, which lets you use a microSD without anything sticking out the end of the Pi.
Modification for the OLinuXino Micro is a little bit more involved – but the first two of these may not be needed if you have a newer revision board
- Remove R17 from the rear of the board (found to cause memory reliability issues and crashes)
- Modify the I2C jumpers for hardware SPI (cut tracks on higher side, and short lower side)
- Optionally remove extra connectors (needs good soldering skills), and turn tall capacitors sideways. I also bent over the serial connection pins.
- Solder on header pins on the top side of the board (CON2)
The following photo shows one of the boards I modified. The I2C pads are a bit hard to see in this photo (just below the big black capacitor on the right) – but they are similar to the Maxi I2C mod shown below, but rotated by 90 degrees.
The 4 connections needed for the Micro are (using same wire colours as above):
- Red wire = 5V (top left pin – CON2 pin 1)
- Black wire = GND (second pin from top left – CON2 pin 2)
- Green wire = SPI Data Out (tenth pin from top left – CON2 pin 10)
- Blue wire = SPI Clock Out (eleventh pin from top left – CON2 pin 11)
Modification for the OLinuXino Maxi, it is also a little bit involved – this time the first one of these may not be needed if you have a newer revision board
- Modify the I2C jumpers for hardware SPI (cut tracks on left, and short right side)
- Modify power supply to disable the 5V buck regulator – If you don’t do this, I found the MP1482 buck converter can get upset by having a higher voltage on the output than the input – and it was generating 22+ volts on the input side, overheating D3 and C68.
The 4 connections needed for the Maxi are:
- Red wire = 5V (GPIO pin 37)
- Black wire = GND (GPIO pin 40)
- Green wire = SPI Data Out (UEXT pin 8)
- Blue wire = SPI Clock Out (UEXT pin 9)
In all cases it is a good idea to have an FTDI (or similar) USB serial debug cable (3.3V version), so that you can connect to the console port and verify boot, or configure networking, run tests, etc.
There is one really critical point you need to note if using an OLinuXino board with a USB serial adapter. It is mentioned in the OLinuXino docs, but easy to miss. If you have the adapter connected before powering up the board, it is possible to corrupt your microSD card. Either only connect the cable several seconds after powering up, or you need to add a Schottky diode in series with the receive input on the PCB, with the cathode on the cable side, and anode PCB side. I speak from experience, and used a BAT54 mounted on a small PCB.
Finally, adding an I2C accelerometer is pretty easy, again just needing 4 connections, for 3.3V, GND, SDA, and SCL. We used an MMA7660FC which is available from several sellers on eBay already mounted on a small PCB. Check the documents for your boards for the appropriate I2C pins. You can see the Maxi to accelerometer connections in the photo at the top of the post, but I’ll do a separate post on this later.
Hopefully I haven’t forgotten anything. Feel free to ask questions, and I’ll do my best to help.