A long while back now I bought a DeskCycle to use at work to help my body stay more active whilst at my desk, standing desks aren’t an option so this seemed ideal.  I’m also a massive geek, which is a massive surprise I know, so I built a PC interface for it using an Arduino and a desktop display using a Unity application.  I’ve been using this for the last year and a half according to the CSV logs.

The DeskCycle has developed a squeel at certain speeds so I though I’d throw a tweet towards the manufacturers to ask how to oil it and to quote my distance too, I used a simple powershell script to get a CSV of the total distance for each day then threw it into Excel.


As of about half an hour ago I’ve cycled a virtual 3159 miles at an average 9.46MPH.  Damn I need to add an odometer to my display!

The powershell script is as follows for those interested, it gets a list of all CSVs, gets the last line from each and spits it out into a new file. Very handy!

$alldata = "DateTime,Speed (MPH),Cadence (RPM),Distance (Miles),Duration (HH:MM:SS)`r`n"
Get-ChildItem -Filter *.csv | 
Foreach-Object {
 $content = Get-Content $_.FullName -tail 1
 $alldata += $content + "`r`n"
$alldata | Out-File alldata.csv


While I was doing the initial tinkering with the Roomba to figure out what made it tick I made a load of video logs more for my reference than anything.  I’ve put them up on YouTube and will have to remember to carry on doing them…


Before I can rebuild Bumblebee, my 1st generation Roomba, I need to figure out how he works.  I’m going to split this into three sections; Power , motors and sensors.  I’m going to cover how to interface with each of these in future posts.


This was simple enough, I charged the battery and put a multimeter across the terminals, the battery showed 16v across the terminals.


A quick count shows that there are five motors.  One for each wheel, one for the brush motor, one for the side sweeper and one for the vacuum.  From the fact they all seem to have a black and red wire going into them and from the age of the device I took an educated guess and assumed they are simple DC motors.  In order to test this theory I took the probes from my voltmeter, plugged them into my bench supply and poked at the motor terminals with the voltage and current limit set low.  With this simple setup I was able to give the motors different voltages and easily reverse the polarity, sure enough the speed changed with voltage and direction changed with polarity.  The wheel motors will need to run in either direction but the other three only need to run in one direction.


There turned out to be a lot more sensors than I realised and it’s quite a packed little robot!  The sensors fall into two categories; IR sensors and switches.  The microswitches are on either wheel and the caster wheel at the front, it looks like all three are currently wired to the same header so the robot knows only that one wheel is up and not which.  The rest of the sensors are a bit more convoluted.

Wheel Encoders

The drive wheels have an encoder each with four wires going in, once I’d opened one up it turned out that they are comprised of an IR LED and a light dependent resistor.  I checked to see if they were IR by giving them just over a volt and there was no light, I then got out my phone camera and saw the telltale purple glow.  Shortly after this I realised the error of my ways as the LED went out, without a current limiting resistor I burnt it out!  Thankfully the LDR worked with visible light so I ended up replacing the LEDs on both sides with red ones.

Cliff Sensors

Along the underside of the bumper there appears to be four cliff sensors, again IR LED/LDR combos which in this configuration are known as IR distance sensors.  I’ve used these long ago when I built a PIC16F84 based robot at college so these aren’t a mystery.  The resistance of the LDR varies depending on how much light bounces back, you need to calibrate them in your code or circuit but they are simple enough.

Wall Sensor

This is an IR distance sensor on the right hand side of the bumper, it works the same as the distance sensor.


This one confused me for a while as I couldn’t see any switches on the end of the arms of the bumper, I ended up taking the bumper out which required removal of the logic board and the penny dropped.  At either end of the logic board there is an IR/LDR pair and when the bumper is hit the light level changes.  I wondered to start with why they didn’t just use a switch but the video linked at the top of this page explained it all.  A switch would be hammered that often it would fail in no time, the design of the bumper mount also cleans the area between the LED/LDR too which is handy.

IR “Eye”

On the top of the bumper at the front is a 360 degree lens which directs light on to an IR sensor of some kind, I’ve not dug deeper in to this one yet.  I believe it acts like an IR receiver for a remote in a TV as it is used with the Roomba’s virtual wall.  If the robot detects the IR code that is being sent out by the virtual wall it acts as though it hit a solid object, this is useful for preventing your hoover from escaping.


I’ll cover how I use each of the above in upcoming articles for each part above.


I’ve just realised that the .engineering TLD exists so I’ve bought neave.engineering and I’ve pointed it towards this site.  The old neave-eng.com and jedibowler.com links will carry on working but this is the new URL and I can’t imagine it changing in a hurry!




Bumblebee is my Roomba, so named as long ago he lost his voice.  About a year ago his logic board started playing up and though he was still able to clean, at the end of each cleaning cycle he wouldn’t go into standby and his battery would drain in no time.  At that point he stopped actively gathering dust and started doing it passively as he sat behind my sofa.

Bumblebeee MK2

Since a kid I’ve always wanted to build a robot and figured I’d kill two birds with one stone and use Bumblebee as a chassis for a mobile robot, he already is one after all, but also have the aim of returning his base functionality of being a robot hoover.

The Plan

Bumblebee is an original model Roomba from 2002, he was a gift from a friend who knew I loved to tinker and gave me him broken.  If I could fix him I could keep him, thankfully an easy fix as the battery was dead.  This model is very simple in it’s function and behaviour, it has no mapping capability, no dock or wireless control.  It apparently can be controlled using IR but I’ve never had a remote.  It also lacks the diagnostics port that the newer models have that make hacking a Roomba really easy now so this is going to be a bit trickier, a lot more education and most importantly more fun!

The parts I’ve used to partially resurrect him are a Arduino Leonardo and an Adafruit Motor Controller Shield.  I’ve also a Raspberry Pi 3 to add into the mix, for Wifi control and more processor intensive tasks.  The idea is to use the two to thier strengths; the Arduino will control the motors and read the sensors allowing for real time override in case of collision and the Pi will be able to sit back and give out the orders.  It’s a classic split for mobile robots but thankfully very cheap to implement now.

Current State

As I said I’ve been working on this for a while, I’ve a load of notes to type up and a loads of “learning experiences” to share.  Mostly when I made a rookie error and burnt out one of the motor controllers…  I’ve now got the motors under control over serial, I’ve also a simple console application that lets me drive him around and toggling the sweeper/vacuum fans on, here’s a video of him in action:

Next Steps

My next item to look at is getting sensor data into the Arduino, first up the encoders.  Encoders are devices that allow you to measure the movement of a wheel, you’ve likely used a rotary encoder on a hifi to control the volume, and the Roomba has one is each wheel.  Right now I can control how much power goes to each wheel but because of differences in the state of the gearboxes, carpet and who knows what other factors, the wheels spin at different speeds.  By measuring the speed from the encoders we can compensate for this, we can also use them to calculate the distance we’ve travelled.

After that is the rest of the sensors, those I’ve found so far are;

  1. Cliff sensors – these are under the bumper and detect drops to prevent him falling down stairs, I think there are four of them and they appear to be IR distance sensors
  2. Bumper sensors – these detect collisions, I think there is one at either end of the bumper so I’ll know if I’ve hit something to the left or right
  3. Wall sensor – another IR distance sensor mounted on the right of the bumper, this allows for wall following behaviour
  4. Wheel up/down switches – One on each of the drive wheels and one on the caster at the front.  They detect if the wheels are up or down and can be handy for detecting when we’ve beached ourselves.
  5. Wheel encoders – these were IR LEDs and a light dependant resistor.  I blew one of the LEDs by accident so replaced them both with red LEDs.
  6. Beacon IR Reicever – Not sure how this works yet, it’s a 360 lens on the top that receives a beam from the virtual wall, a device you place by your door to stop him escaping, I’m hoping to add more sensors to make this redundant.
  7. Buttons – there are three buttons for room size to start different cleaning cycles.  They could be useful though I may not bother with them.

Once I’ve all the sensors connected I’ll be able to hook up the Raspberry Pi to start working on reproducing his original behaviour.  After that I’ll be able to build up his capabilities over time and add a load of new ones too.  I’m not intending this just to be a hoover but a mobile robot platform that happens to be able to hoover.

If you’ve got this far, kudos!  That’s it for now, more posts will trickle out as i write up my old notes.  I’m going to carry on having fun building things and write posts in the order they happened.  Hopefully I’ll catch up fairly quickly!

Tagged with:

I have a lot of projects on the go, some stalled and some my current obsession, and that’s ok.  I’ve previously beaten myself up about not getting things finished but the truth is it’s just how my brain works so I’ve decided to work with the meatsack between my ears rather than fight it

Here is my usual project lifecycle:

  1. Discover new thing
  2. Obsess over thing
  3. Buy parts to build thing
  4. Hit limit of knowledge
  5. Get frustrated and shelve it

Projects I’ve got in flight are always in the back of my mind and occasionally I’ll learn something new which mitigates stage 4 and I’ll start back at stage 1 again, rinse and repeat.  I sat down and looked over my projects and realised most of them shared common themes in some way, usually in the tech involved, but all use it in slightly different ways for very different results.  To that end I wrote a list of my projects, what each involve at a high level, and put ticks in boxes to see where they overlap.

You see, having multiple projects that overlap on the go is a great thing.  It means if one of them starts kicking your arse you can switch to another!  It’ll cleanse the mental palette by giving a context switch and if they use similar tech you might just get some inspiration to help elsewhere.

Mostly, it keeps me making.  After all, if one of the most notorious makers in the community has self doubt every now and then it seems I’m in good company.

Next up, I’m planning on adding my ongoing projects to the site to make this more a work log again.  I’ve been up to all sorts but mostly using OneNote for not taking and leaving this place fallow.


I’ve a Blackmagic Intensity Pro capture card in my machine at work, initially we were going to capture video for webcasts from a professional camera but that never came to pass.  It’s been sat in my machine gathering  dust soI thought it would make quite a nice virtual monitor for embedded devices.  As I’m playing with Raspberry Pis more at work it’s an idea way of not having to faff around switching inputs on my monitor.

Required software:  VLC and the Blackmagic drivers for the card.

Plug your HDMI device into the capture card, looking at the back of your machine it’ll be the one closest to your motherboard.  This may work for DVI capture too, I’ve not tried it.

Open VLC then File -> Open Capture Device.  Select Declink Video Capture, enter 1920×1080 for the video size, click on Advanced options and change the aspect ratio to 16:9.  Click on then click play and you should have a picture, albeit slightly laggy.  I’m using it as a virtual monitor so not an issue, if you are capturing a stream from a console it may be irritating.  I used to have a way of minimalising this when capturing from a webcam but can’t remember it, if you find out please leave a comment and I’ll update the post.  To reduce lag, click on “More options” and set caching to 0 ms, seems to have done the trick for me.

This one was more a note for me for the next time I try to use the card for this use and have forgotten, thought it may be useful for others.

Update:  To shortcut the whole process, this works nicely as a command line and if you create a shortcut to VLC and pass the arguments in accordingly you can open straight into the stream:
vlc dshow:// :dshow-vdev=”Decklink Video Capture” :dshow-size=1920×1080 :dshow-aspect-ratio=16\:9 :live-caching=0

Pretty sure if you change the device to the name of any capture card or webcam this should work, not tested so your mileage may vary.


I’ve been using Kodi as my PVR for a week now and I’ve discovered a few quirks, solutions and tweaks that have make a big difference to the whole user experience.  Overall I’m increasingly impressed with how Kodi has developed both at it’s core and the addons.  Since my last post Kodi 16 has also released so I’ve upgraded to the RTW version.

Kodi 16 running the Rapier skin.

Kodi 16 running the Rapier skin.


I spent a while trying out pretty much all the skins Kodi offered through the UI and ended up using Rapier.  It’s pretty minimal but very well laid out, customisable and easy to navigate.  Some of the others we’re nice but this one just felt right.  Hardly a scientific comment but look and feel are important and this one fits the bill.

Timeshift Issues

I kept hitting an issue where the PVR addon would disconnect when I tried to timeshift, I use this feature a lot so it was something I needed to fix.  I’ve only one hard drive in the machine and despite being an SSHD I thought it may be the disk causing the problem.  I’ve heard my colleagues at work talk about RAM disks and as I’m only ever using a couple of GB of the 8GB of RAM my HTPC has it seemed worth a try.  I did a quick search for software and found SoftPerfect’s RAM Disk, installed it, created a 3GB RAM disk and moved the timeshift folder in TV Server Configuration to it and the problems disappeared.  It’s made a massive difference!

Remote Control

I’ve a Media Center IR receiver hooked up to my PC which was great for Media Center but the Guide, Info and similar buttons were WMC specific.  Thankfully this was trivial to fix thanks to the MCRemote addon!  Installation was easy via the addon repository but configuration took me a while, mostly as I didn’t RTFM…

First off, as it edits the registry you’ll need to run Kodi as admin though you’ll only need to do this when updating the settings.  You’ll find it installed in Kodi under programs, open it then select “Apply current settings” and it’ll keymap the guide, DVR, info and other buttons to work in Kodi.  Reboot Windows and you’re good to go.

The only thing not mapped is starting Kodi using the green button, easily done though.  Find the shortcut to Kodi in the start menu, right click and bring up properties.  Under shortcut add a random combination you don’t use anywhere else then open Kodi as an admin.  Run the MCERemote addin, select “Configure MCERemote settings” then find the entry for the green button and voila!


That’s it for now, I’ll let my changes bed in and keep track of any other tweaks and will post anything cool as I find it.

Tagged with:

Farewell WMC, hello Kodi and Mediaportal TV Server.

Out With The Old…

I’ve been a long time supporter of Windows Media Center but it’s always had its quirks and Microsoft announced with Windows 8 that it wouldn’t be developing it further, this is old news.  A shame as I know how much effort went into its development and it was almost a brilliant product.  For live TV it was superb with full HD and MHEG (red button) support along with timeshifting and series link.  Series link is the killer feature for me which non of the open source equivalents have had until now.

WMC was never great at handling libraries of media content or Bluray playback, for that I’ve been running Kodi (formerly XBMC) in parallel for years and a standalone Bluray player.  Kodi has had the ability to act as a PVR for long time but I’d never had any luck getting everything working right.  Where WMC had tuner support built in Kodi relies on a TV backend to handle tuner control with client side plugins to show the EPG and switch video streams which added a complication I couldn’t quite get passed.  Probably a lack of patience on my part if I’m honest but fast forward to today and everything seems to be maturing together, specifically with Kodi 16 RC, Codename Jarvis.  If nothing else I approve of the Iron Man reference!

…In With The New

Jarvis is currently at RC3 and with this update they’ve introduced series link, as this was the only feature I was using WMC for it’s the final nail in the coffin.  I’ve been playing with Kodi as a PVR for a while with two different backends;  ServerWMC and Mediaportal’s TV Server with the TV Server Kodi plugin.  They both worked well but the former has a dependancy on WMC which would prevent updating to Windows 10.  Mediaportal is also still in active development and their TV Server software is very robust.  I’ve used it in the past and it was pretty rock solid, the bit that let it down for me was the Mediaportal interface itself was pretty clunky and even with a lot of tweaking I couldn’t get the experience as intuitive as Kodi’s.

The Solution

As it stands this is the setup I’ve ended up with:

  • Kodi 16 RC3
  • Mediaportal 1.12 TV Server
  • TV Server Kodi Plugin

To install Kodi is simple so I wont cover it here.  For TV Server download Mediaportal and when prompted during setup select the TV Server only option.  You can install the lot if you want to have a look at Mediaportal but it isn’t needed in my scenario.  Finally you’ll need a plugin for TV Server that allows Kodi to connect.  This is as simple as copying the DLL to the plugins folder and restarting the service.  Full instructions that covers all the above can be found here.


Early days yet but so far this combination of software seems to be working a treat.  The big benefit here is that Kodi is under constant development so things should only improve.  Time will tell and I’ll do a review in a month or so after living with it full time.


Not long after I made the switch to Android Google announced the Chromecast Audio, a cheap little device that plugs into speakers you already own and gives you the ability to stream music from your phone or browser.  As they also include synchronising of the speakers so you can cast to multiple rooms I figured I’d give them a go.  I bought one for my living room and one to plug into a portable set of speakers that I can move around easily. The other benefit is that as it’s all controlled from my phone I can use the music app on my Pebble to change tracks and pause it without getting my phone out of my pocket or while it’s left on charge.  Daft, but fun noneless!

The only problem is that though the portable speakers have an internal battery and charge from USB, they don’t have a USB output which would have made them an ideal match.  I did try hacking in a USB cable to the voltage regultor inside the speakers but that resulted in a lot of noise and hiss on the line and I couldn’t quite get to the bottom of why.  At some point I’d quite like to make a set of portable speakers to my spec so figured I’d cut my losses and find a middle ground.

POC hack to see if the voltage regultator could power the speaker and Chromecast at the same time.  It could but not without a lot of noise.

POC hack to see if the voltage regultator could power the speaker and Chromecast at the same time. It could but not without a lot of noise.

This is the portable speaker in question, an ADX Fusion bluetooth speaker that also has an AUX input, to keep it topped up and to power the Chromecast I needed two USB cables which was a bit more of a faff than I can be bothered with.  Time to break out the soldering iron and make a cable.

I wanted to have the Chromecast almost inline with the USB cable so I plugged them in together and cut the two USB cables at the same point.  I then spliced them together and strengthened them with a bit of shrinkwrap and some electrical tape.  I also cable tied the two output cables together for even more strength and finally cable tied the headphone cable together too to tidy things up.

A simple hack to get me going again but makes the speaker a bit more convenient.

%d bloggers like this: