Team Cyberchondriac – Pi Wars 2015
Once the line following code was written and the sensor logic was working well I turned my attention to the other challenges. Next was proximity detection and I, like a lot of other contestants, decided to go for what I now know is the fairly ubiquitous HR-SC04 (I can feel my inner geek rising as I type that!) It works well with the Pi, there are numerous posts on getting it to work in Python and I didn’t really foresee too many problems (!)
(hr-sc04 – Don’t cha know squire! – £2 each on ebay)
So, wired one up and started to test….
Wasn’t getting any results from it at first and thought that I had more than likely soldered it together incorrectly – start with the physical connections first. Found what I thought was my error so swapped the connections to where I thought they should be.
Hmm…. wonder what this screen means? Never seen that one before…..
After that little lot, a brief pause and then a shutdown. Nothing from the Pi. Nada. Zilch. Diddly squat.
And so, it came to pass that I had indeed managed for the first time ever to fry a Pi.
(we held a small ceremony for our dear departed friend who gave his all for the cause)
After that fairly significant set back, I decided that I needed to get the sensors working, but away from the bot so I didn’t melt anything else. I was looking for a simple circuit I could work up to test them easily. It was the last week in October and with Halloween just around the corner I thought something a little spooky would be appropriate – ‘Pumpkin Pi!’ came the shout from my ever inspiring wife. So – a proximity detecting pumpkin with flashing lights and screaming noises when someone approaches it – how hard can it be? (must stop saying that)
Was actually fairly straightforward. Found my error in the proximity circuit, and cobbled together a Flip Flop Circuit that could turn on 2 sets of 3v white LED Christmas lights. I added an mp3 sound file, put together a very simple Python program and mounted the whole lot in a plastic box with some batteries.
This all then went into a carved pumpkin – I was pretty pleased with the results!
The project got picked up by the Pi foundation and added to their list of Spooky Pi projects for Halloween – you can see the pumpkin in action on the Raspberry Pi site here Interestingly in the video you can hear the ultrasonic ‘bips’ that the sensor puts out.
Where were we? – Oh, yes… PiWars! Enough distractions, now I had a working proximity circuit and this was removed from the pumpkin and added to the bot immediately Halloween was over.
More building, more breaking.
I do seem to have taken *almost* as many backward steps during this project as forward ones. I have been following the progress of other contestants via the blogs and Twitter and have often seen late night crisis posts from folks where things just aren’t working as they (blummin well) should! The complexity of building a bot to complete in all the challenges should definitely not be underestimated.
On rebuilding the bot with a new Pi and the proximity sensors, nothing worked. Again. This can all be rather frustrating sometimes – and that’s putting it mildly! Out came the multimeter once more to locate the source of the problem and fortunately fairly quickly found that the problem lay in my dodgy soldering skills. On putting everything back into the box I had managed to bend over one of the wires which had snapped the track clean off the stripboard.
(found it – needed a magnifying glass to see it with my eyes though)
Once that was fixed and re-soldered, I finally had a working bot again for the first time in quite a while. With only 3 weeks to go until the competition I had been starting to get a little concerned!
Must confess, was looking forward to this one since the description of the challenge was updated to include…
“You may push or propel the ball using a mechanism attached to your robot.”
Ooh – now that got the old grey matter working overtime I spent many hours considering how I would do this. Must confess I wish I had heard of ‘kicker solenoids’ at this point! – I believe at least one other team is using this solution. I however decided to opt for a far more Heath Robinson approach and designed (in the loosest sense) a spring powered cannon to propel the ball. I then somewhat prematurely put this video up on YouTube…
Sadly at this point, it was just me holding the end of it. There was no trigger mechanism to speak of – yet.
The spring is the throttle spring from a 1984 Mini Metro – actually, it’s half of the spring. I was amazed at how much energy can be stored in a fairly small piece of metal. Working out a successful way of firing the cannon was going to take many nights of head scratching, many failed attempts at printing 3D parts for it and an awful lot of swearing and bashed fingers.
I’ll tell you more next time.
Follow me on Twitter @davejavupride – I have been posting regular updates there and will do so until the competition.