A bit of hardware hacking for Troon Primary CodeClub, who have tons of old style Lego Mindstorms they don’t use any more, and after a year of Scratch programming on their PCs are just getting started with Raspberry Pi. We’re using this Scratch modification together with the hardware I’m making which is based on this circuit. The main thing here is an L293D Motor Controller IC which can drive 2 DC motors in both directions. You can write the hardware code in Scratch like this to control the lego motors:
The most tricky part in this whole endeavour has been physically connecting to Mindstorms. At the moment I’m having to use crocodile clips which won’t work long in normal classroom conditions – but I’m wary of destroying/modifying the connectors as they’re not made any more…
We’ve got a number of “broken” wire connectors in our Lego kits, maybe they can be repurposed? Probably lots on eBay too.
Sounds good – should we join forces on this? I can build you a board to try out. How are you working with Mindstorms at the moment in Redruth?
Great stuff :) I’ve got quite a few of those motors in my schools so I’d be very interested in a good way of connecting them up as well
Simon
Thanks for ScratchGPIO and your blog, which is proving very useful! I’m hoping this can be a way of making CodeClub a bit less screen based…
found this http://www.ebay.co.uk/itm/LEGO-NEW-Mindstorms-NXT-RCX-Conversion-Cable-Adapt-Convert-Wire-RIS-Robot-/251225358913?pt=Building_Toys_US&hash=item3a7e32c241
They are retired but search for LEGO Set 8528-1 if it helps.
Also http://www.instructables.com/id/Replace-Old-Lego-Electric-Wires/?ALLSTEPS
You could then use this for example any RJ12 breakout kit would work wouldn’t it? I just randomly picked this link as an example.
http://www.winfordeng.com/products/pbc6p6c.php
This is all great stuff – thanks very much! I had a go at the tabs on the brick but was a bit scared of breaking them, the backing plate seemed stuck. It looks like they are more hackable than I’d feared, so I shall go ahead with more confidence :)
It’s good that they have moved on to RJ12 though. At the school they also have yet another type of Lego connection with a more recent educational kit – I wish they would standardise.
Yes, this term we’ve been trying out the old Dacta + RCX kits, not getting too far away from existing material – main problem has been lack of working batteries and slow firmware downloading because of RoboLab rather than command line. Next term, not sure, we may be back on Scratch, but Scratch & Lego sounds like a nice combination.