The Tech in Computer Engineering for Babies

The Tech in Computer Engineering for Babies

Back in 2021, we did a story with Tom Nardi at Hackaday. We dove into some of the more technical features in Computer Engineering for Babies.

This post is a synopsis of that collaboration.

The actual post has tons of comments and discussion about how CE4B could be hacked to do some other cool things, so if you have some time on your hands, we highly recommend checking it out.

Here it is, One Man’s Quest to Build a Baby Book with Brains, by Tom Nardi at Hackaday.

The technical aspects of Computer Engineering Book for Babies

Collaborating with Hackaday was a blast, not just because it was about CE4B, but because it let us get out of our “stuck-in-the-garage mad scientist inventor” mindset, and articulate what we had created.

Which, looking at it from the consumer/hacker perspective, is pretty cool :)

But yeah, if you’ve been following our story, you know that CE4B was a 5+ year labor of love. Five years in, this is what we were able to build.

This board book utilizes an internal microcontroller to help illustrate the functions of boolean logic operations like AND, OR, and XOR in an engaging way.

The components

The original plan was to use discrete components, with early prototypes simply routing the button through the gates specified on the given page. This worked, but wasn’t quite as robust a solution as we wanted.

Eventually the decision was made to move the book over to the low-power ATmega328PB microcontroller and leverage the MiniCore project so the books could be programmed with the Arduino IDE.

Computer Engineering for Babies electronics

Computer Engineering for Babies as seen from the rear of the book

The battery

Obviously battery life was a major concern with the project, as a book that would go dead after sitting on the shelf for a couple weeks simply wouldn’t do.

To that end, we made extensive use of the Arduino LowPower library.

Essentially the firmware wakes up the ATmega every 15 ms to see if a button has been pressed or the page turned, and updates the LED state accordingly. If no changes have been observed after roughly two minutes, the chip will go into a deep sleep and won’t wake up again until an interrupt has been fired by the yellow button being pressed.

There are some edge cases where this setup might misbehave, but in general, the book should be able to run for about a year on a coin cell.

Computer Engineering for Babies - problems & solutions

The biggest problem was finding a reliable way to determine which page the book was currently turned to. The solution uses five phototransistors attached to the MCU’s ADC pins, which receive progressively more light as fewer pages are laying on top of them.

The first sensor is exposed when the second page of the book is opened, so for example, if three of the sensors are seeing elevated light levels the code would assume the user is on page four.

Last page of Computer Engineering for Babies

Opening to the last page exposes all five light sensors.

Computer Engineering for…Hackers

So what do you do with an Arduino-compatible book when Junior gets tired of it?

Obviously Hackaday was super interested in learning more about this, and they got our gears turning.

What if we released the firmware as an open source project that would give owners a base to build from should they want to roll their own custom firmware?

While the peripheral hardware of the book is fairly limited, there is nothing stopping you from hanging some sensors on the I2C bus or hijacking the unused GPIO pins.

Would you be interested in us open sourcing the firmware? What would you build? contact us here.

Don’t have your copy yet? Grab Computer Engineering for Babies today!