Thursday, 26 February 2015

New bike!

I decided to switch from taking the bus to work, to cycling. As it's about 14 miles each way, I thought the best starting point as an electric bike. Then, if it's a howling gale or horizontal rain, I'll still be able to make the journey without collapsing.

The bike I chose was the Kudos Tourer with Nexus 8-speed Hub. It's quite an interesting setup, and not very well documented, so I thought it was worth a few notes.

The battery pack slides on to a shelf on the rear pannier. It is a 36V nominal 10Ah pack, which charges up to 42 V open circuit. It has a key switch and the battery management and balancing must be internal. There is a four pin socket on the back, of which two pins are connected, and an RCA phono jack under the handle for charging. The charger is from Sans and its rated output is 42V 2A. My first battery wouldn't charge and my second had an intermittent cutout. Hopefully my third will be reliable!

The battery power comes into a hollow plastic box stuffed with wiring. Tidy it isn't!


The schematic is pretty simple. Battery voltage goes into the metal control box, via bullet connectors, and is also tapped off for the LED lights. You can see the red and black wires at the bottom of the picture above, with the blue/green bullet covers and the heatshrink where the lighting cables have been soldered on. and The lights operate via a latching switch on the handlebars made by Wuxing . The front light says it is a Spanninga Owl, but it's wired in rather than battery powered. I can't tell the make of the rear light but both seem OK. There is no interaction between the lighting circuit and the motor controller - they both just run directly off the battery voltage.

The controller drives a Bigstone C300 LCD via both a 4-pin and a 3-pin cable. I'm guessing one is LCD output and the other is the input from the four buttons. The interface is described on that page as "UART or CAN" so maybe I need to crack out the Picoscope and take a look. The control box also has has brake cutoff inputs from both brake levers (probably also from Wuxing), wheel speed input from a sensor on the rear wheel and an "axis input" which comes from a sensor on the crank. Motor output is via a yellow/blue/green 3 core cable labelled "Motor A", "Motor B" and "Motor C".  I've managed to find a copy of the user manual, which you can find here (Part1) and here (Part2). It explains how to switch from km/h to mph and what all the various icons mean.

The controller itself is labelled BST-TY11050036, and something visually very similar is sold in kit with the C300 on Alibaba, but I can't find out much more about it. I'd open it up, but warranties and all that...





Saturday, 6 December 2014

Second prize overall!

"Steve" won second place in the over £75 category. Not fast and not massive, but good at most of the challenges. Hurrah!

Sumo final

Beaten by a tricky wedge. Very chuffed to get in to the final though.

Prizes!

Second place in code quality with 42/44. Damn those last minute hacks!

Sumo round 3 - Win!

Given two bys, due to competitors failing to present themselves, we entered straight in to round 3 against another Dagu Rover 5. Flashy Rover was built and run by one of our suppliers, Dawn Robotics. Evenly matched for some time, we managed to get under them and once in their back, it was game over.

Round 4 beckons.

Only sumo left!

Three point turn was interesting. Our practice run was a farce as the robot jiggled on the spot and then stopped. It turns out, upping the main control rate meant it was checking the distance remaining from the last command before the Arduino had processed it. This meant it always saw zero and ran all the motor commands in quick succession. A quick code tweak later and we were back in business. I thought our proper run was pretty poor, but the judge was happy and declared we were third so far that day!

Straight line speed test was a good as we could manage as our robot is quite slow.

The obstacle course, again, was about as good as we could do. No penalties and all obstacles cleared in 45 seconds would have been good in the morning, but a recent run at 25 seconds had set the bar very high.

Now we wait for the sumo, with a fresh set of cells in hand. Fingers crossed!

Two runs in!

So, not bad so far...

Our robot valiantly completed the line following challenge, but 2m47 over the 5m00 time limit. Great work by Matt Lane implementing an OpenCV based line following algorithm using the Raspberry Pi Camera. I'm calling that a moral victory, even if we were disqualified for being too slow.

Next up was the Proximity Challenge. The first run was a bit of a disaster - we stopped over 30cm from the board. Discussions ensued, and we demonstrated against a nearby door that our robot was capable of much better. We weren't allowed to modify the course, but we did move a few nearby shiny objects which we thought might be interfering. Our second run netted us 20.5mm (yes, millimetres). Result! The third run came in at 28mm. The runs are added together, so the failed run cost us quite a bit. We'll have to see if anyone else gets a failed run too.

Next up, Robot Golf at 11:35.