Building a custom LEGO MCU system

A Maker by the name of J. Benschop has created a custom electronic LEGO system powered by an Atmel microcontroller (MCU).

“The main board consists of a [number of components, including an] ATMega328, nRF24L01+, a protection diode and stabilizing capacitor,” Benschop explained.

“The  ATMega328 is running at 5V while the nRF24L01 requires 3.3V. However, I needed the IO pins to run at 5V and although the nRF24L01 requires a lower supply voltage, all interface pins can handle 5V.”

As the Hack A Day crew notes, the enclosure for the LegoDuino is compatible with other LEGO bricks, simply because it is made from a 6×16 plate (three blocks high), with sufficient space for the electronics, three AA batteries and IO headers.

On the software side, Benschop decided to go with the Minibloq programming environment, as the Arduino IDE was somewhat too advanced for his nine-year-old son to take on.

“I downloaded [Minibloq] and found that I could add my own blocks relatively easily. For the LegoDuino target in Minibloq, I copied the ArduinoUno target. I modified minibloq.h to use my defined port names as well as the minibloq target board definition (main.board),” wrote Benschop.

“I also added some of my own programming blocks and the Arduino NewPing sensor (instead of the existing Ping sensor). [Plus], I copied the DCMotor programming block and modified it into a LegoMotor programming block. And I added some special power button [along with] LED support so the power button can be used to turn the LegoDuino on and off, but also to power off the LegoDuino after a fixed time. This way, the batteries will not be drained when my son forgets to turn it off.”

Interested in learning more? Additional information about Benschop’s custom electronic LEGO microcontroller system can be found here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s