I'll probably never buy myself the Mindstorms sets, especially after a very kind person donated theirs to me. However, the idea of actually building my own computer LEGO brick does appeal. Robotic LEGO is nothing new and it has advanced unrecognisably.
Years ago, back in 1985 a book called "Make and program your own robots" by William Clark was published. It is of course long since out of print. It used LEGO and the good old Sinclair ZX-Spectrum computer. Since then others have used a variety of different methods to control their LEGO models. And now there is the Raspberry Pi, programmable with Python. I really can't see any benefit in spending the vast sums need for a limited Mindstorms NXT2.
My first attempt was simply an array of 16 relays that plugged into the parallel port and controlled via QBASIC. The circuit was based on that given in the book I mentioned above Needless to say, it was only useful for stationary models and I never managed to successfully take the result of an input such as a switch event back to the controlling program. This was either something to do with interfacing via QBASIC or more likely a dodgy piece of wiring on my part.
The following video shows the 'RCX' in action controlling a train. I used a simple class written in C to control input and output of the parallel port. The track-side switches, when triggered, stop the train for a few seconds and depending on which switch was pushed, the train the either continues in the same direction or reverses.
Technology moves on and now you can get groovy microprocessors like the Raspberry Pi for next to nothing. So it's back to the drawing board. The computer brick I want to build will have 6 inputs and 6 outputs and, all being well, will be able to use existing Mindstorms sensors. At the moment the plans are no further than a drawings-on-paper stage, but one of these days a prototype will get built, It will replace the parallel port interface I designed and built a few years ago.
The "brains" of the brick was going to be the Basic Stamp module, but it will now utilise the Raspberry Pi 2. Whilst the chips are cheap some of the necessary accessories are not. Still I anticipate that the total cost of building my own RCX will be around a quarter to half the price of the current Mindstorms.
I plan to put the electronic "brains" inside one of the old 4.5V battery boxes. Whilst I have a couple of my own they are often available on Ebay. And as an update to this special LEGO compatible Raspberry Pi cases are available too.
Using the LEGO wire connectors, it will be possible to put 6 inputs and 6 outputs on top of the battery box. The positions of these are shown by the white and grey 2x2 plates.
The wire connectors can be opened. The two metal strips allow a soldered connection to be made, should you need to do this, and for the wire to run straight into the battery box and to the electronics.
Share and donate!