Wednesday, 10 August 2016
I've been fortunate to attend the 2016 Electromagnetic Field camping festival this year. This is a 3 day event in the UK where geeks get together for a fantastic festival of talks and workshops of all things geeky.
In preparation for the 2016 event I ordered some WS2811 RGB LEDs to adorn my tent:
This uses the Adafruit Neopixel library example code, but is modified to do an RGB fade from the centre outwards:
I was asked how I did this so here is a quick tutorial:
1) Buy WS8211 LEDs from Amazon.
2) Buy a high current 12V to 5V power converter from Amazon. This needs to be capable of providing at least 3Amps.
3) Buy an Arduino Nano. The original boards can be bought in the UK from places like Cool Components. However, Chinese clones are available from places like BangGood. However, these devices will need a driver installing before they can be used with Windows.
The Arduino shows up as a serial ports (e.g. COMXX), but the clone devices use a cheaper alternative serial chip than the originals, hence the need for a driver. Here is an Instructable on getting it working.
The LEDs have 3 connections:
+5V power in.
The data can only go in at one end and this is not clearly marked. It's best to check that everything is working before tidying everything up.
The 0V and +5V terminals are difficult to identify. By peering through the transparent housing though it is just possible to see the terminals marked as +5V and GND. The remaining terminal is the data line.
Note that the connections are the same on opposite sides of the printed circuit board.
Wire everything up as below. The converter is used to drop the 12V input to 5V for both the LEDs and the arduino.
Download the Arduino project here. You will also need to install the Adafruit Neopixel library. See here for details on installing Arduino Libraries.
Remember, if it doesn't work first time, try connecting to the other end of the LED strip. And feel free to give me a yell if you are having troubles.
Please note that this is a guide only. You follow this guide at your own risk. I am not responsible for any errors, ambiguity, truth or omissions.
Saturday, 26 March 2016
At Hack Oldham's monthly Hack The Library event today I got to play with the soon to be released BBC Micro:Bit.
This is a small PCB with an ARM MCU. It has on board Bluetooth, compass and accelerometer peripherals. And also come with a 5x5 programmable LED matrix and user buttons. The plan is to give one to every year 7 (11-12) kid in the UK and just let them get on with it.
There are several ways to program it, from Scratch like block programming to an implementation of Micro Python.
I tried the block based interface first, but as a classic programmer I found it unwieldy so I got straight in with the Python.
The web based Python editor is ok, and the peripheral documentation is reasonable. I would have liked to see some more detail included though. For example, the accelerometer is fully supported in the API. But it would have been nice to have it documented on the numeric range that the device would output. Not a show stopper, but easy to add to the docs.
After writing your code, clicking the web 'download' button literally downloads a .hex file straight from the browser to the local file system. When the Micro:Bit is connected to a Windows PC, it shows up as a removable drive. The file needs to be copied into this drive, where after downloading it is immediately executed.
If the Python script has any errors, the error is displayed as scrolling text on the 5 x 5 LED display. This is useful, but it would have been great if this could also have been dumped to a text file in the mounted drive. Waiting for an error such as : "Error line 60: Syntax Error" to scroll along a single character display can be frustrating.
Anyway, after half an hour or so I'd managed to write a small game where by tilting the board, a statically illuminated LED is moved towards a flashing LED. When the two meet, a Pacman symbol is flashed (it's a hard coded image, amongst others, in the Micro:Bit) and the two LEDs are randomly re-positioned.
Saturday, 9 January 2016
I designed a PCB that has to fit in a space that is very constrained. The PCB uses SMD micro controller, and there is no space for a dedicated programming connector on the board.
To solve this I simply placed PCB pads connected to the MPU programming pins. I ordered some spring test probes from BangGood. If you are willing to wait a couple of weeks this is the cheapest place for these.
The PCB design software I use, DesignSpark allows me to export a mechanical .dxf file for the PCB.
I imported this into my laser cutter software to allow me to cut a 3mm MDF sheet with holes where the MPU programming pads are:
It's a bit over the top using a laser cutter for this, but: 1) It cuts quicker and more accurately than I can. 2) The probes have an odd diameter, 1.3mm which is a drill size I don't have, but the laser can do any size hole.
I cut two of these, and used them in parallel to align the spring probes:
I ran the hot melt glue gun between the two plates to fix them.
And epoxied the wires to the molex connector that plugs into the PicKit3 programmer and the jig itself:
This jig enables me to simply press it onto the PCB. The spring contacts guarantee a good connection. And programming takes a few seconds. It's quicker than plugging a MPU into a programmer, and then transferring it to the target board.
Wednesday, 30 December 2015
Thomas Lemieux (aka The Iron Man of Maine) asked me if I could help with the electronics for the Ghostbusters Gigameter. Video of it from the film is hard to come by, but it looks like this:
There is not much documentation about it on the web.There is a a 3D printable version at:
The electronics are pretty hard to come by though.
Thomas was a big help with my Proton Pack Design and helping him out was no problem.
I'm a Microchip PIC guy by trade. But these need access to limited compilers and proprietary programming hardware to make them work, and so I decided to go with a cheap (<$4) Arduino Nano clone. This is my first Arduino project.
I'm driving a pretty specific common anode display that I got from AliExpress. But the software is designed to make changing the pin drives very easy.
As it was a rush job, I never formally built it up, but tried it out on a breadboard:
The software picks a target value from 0-999 (unless its the same as the current value) and rapidly displays the current value as it seeks towards the target. As the current value approaches the target value, the count rate slows.
Here is a video of it in action:
And the software is available at: https://www.thingiverse.com/thing:1235666
Sunday, 29 November 2015
I was at Oldham Library and Lifelong Learning Centre with Hack Oldham for the monthly 'Hack the Library' meet up.
Basically, it's a geeky get together to show the public what the Oldham Makerspace is about.
We got to use the library's Vex IQ robotic system.
And we used the Hack space's Cubify Sense 3D scanner to introduce local kids to the technology.
As the owner of a Mendel90 it seemed rude not to get a scan of myself. One of the members decided it would be a good idea to film the process:
This results in a .ply file which contains the 3D information and textures:
It can be viewed in Meshlab, and exported as a .STL file for printing:
I normally use Skeinforge to slice .STL files, but I always seem to have trouble getting it to create support material. For this print I use Slic3r which I set to use a layer height of 0.2mm. My Mendel90 has a 0.4mm extruder nozzle and I have never used such a small layer height before, but I was not disappointed:
Sunday, 15 November 2015
I have been thinking about getting a quadcopter for some time, but I didn't want to spend too much money. After doing some research, I decided upon the JJRC H12C. I ordered this from the UK via EBay for £48.29 delivered.
Being a total novice flying these, I was worried how long I could keep it in one piece. I was amazed though how easy it is to fly, after a few practice runs on the local playing field I was totally at ease controlling it.
Included in the price are: 1) The quadcopter. 2) The remote control. 3) A 750mAh battery. 4) A 1080P still/video camera.
I was very sceptical about the quality I would get from the camera, considering the total price of the package. But it completely exceeded my expectations. It is very susceptible to rapid changes in lighting, but for the money it is amazing. Here are some shots I took whilst flying around Foxdenton Park in Chadderton.
The controller allows you to remotely take a still photo or start a video at the press of a button. The videos with the camera fitted out of the box suffer from 'jello'. Wobbly lines on the picture. This is caused by the camera shaking about on its mount:
The simple fix for this is to force a small piece of foam between the camera body and the quadcopter. Doing this almost eliminates jello, as this shot with a DJI Phantom in the air at the same time shows
The remote control is not of the highest construction quality, but for the price it feels great. I bought a First Person View (FPV) kit from BangGood. This is a 720P still/video camera with a live feed to an included LCD display. Allowing you to view in real time what the camera is seeing.
As supplied, the LCD monitor does not fit to the remote control. So I designed a 3D printable clamp to allow it to fit:
This is available for download on Thingiverse.
Although I have no prior experience flying quadcopters, I cannot recommend the H12C highly enough. I've had loads of fun flying it, and even after a few rough landings it's going strong. If you want an outdoor quadcopter, seriously consider this one. It is easy to fly, spares are available and for the price it is superb!