Make your own Mindstorm sensors

[Stewart Allen] acquired a Mindstorm kit about a month ago and he’s already building his own sensors for it. He wanted a more accurate range finder with a narrower measurement field than the stock sensor. Mindstorm has the option to communicate with sensors via an I2C bus. [Stewart] set up an ATtiny45 to act as a the slave on the bus, facilitating the analog measurement of the distance voltage by using and lookup table, and handling the data transfer with the NXT brick. His testing setup is pictured above, with an AVR Dragon for programming the tiny45 and a Bus Pirate for sniffing the I2C data during the development process. The sensor, looking great on a professionally made PCB he ordered, requires a simple driver that [Stewart] hammered out for use with leJOS, the alternative Mindstorm firmware we’ve seen before.

Post navigation

16 thoughts on “Make your own Mindstorm sensors”

the advantage here is if the sensors are classified as medical device because of their sensitivity then by making your own you do not need a license or a doctor working on the inside to get you medical grade sensors.

@ Elias i remember back in the 80’s working with someone who does brain research and they had to have medical license to get the official sensors because something like in the wrong hands you could cause harm if you managed to send a signal back into the brain.

now maybe they was using that as an excuse to say it was proprietary technology or little was known about the brain that there was a legit fear of causing emotional damage if you could feed signals back or maybe the sensor tips was coated in a conductive substance that was a controlled substance requiring fda monitoring.

just like lithium is today

batteries are made expensive to discourage meth making from the metal lithium in batteries.

Nothing new at all here. I remember doing this back in middle school with the original Mindstorms (around 2000, maybe earlier). There were even businesses dedicated to this – they had some great sensors, like the first sonic range sensor (_years_ before LEGO thought of doing one, and they had two, one for short range, one for long), the first color sensor (I still don’t think LEGO makes these), etc.

Didn’t use I2C though – there was no such thing. You’d just program them as though they were a light sensor usually. Measured resistance and gave you a value between 0 and 100, though I think you could get more accurate than that if you weren’t using the official software.