Baby Interface Device

Summary

Baby Interface Device Build instructions for the 'Baby Interface Device' (BID), an ultra-simple USB Human Interface Device for Tiny Humans. Built to allow my kid to interact with the computer without destroying my keyboards. The BID is a DIY USB HID (Human Interface Device) that acts as a keyboard to trigger a single keypress (space bar in this case). The concept is to create a very large button that is baby-friendly to allow an infant to interact with computer games and educational software.

The project can be assembled in less than an hour for around $35 or less and requires very little knowledge of electronics or coding.

Usage

The BID is ideal for use with certain online baby game sites such as:
Kneebouncers - an awesome ad-free site supported by annual membership
Fisher-Price Online - some of these games will work with this thing too. They're free and not too bad.
Also this thing is very handy to play/pause media sites like Pandora and Youtube.

DISCLAIMER: Choking and Strangulation Hazard! This has a cable on it and small parts which could mark, maime or otherwise injure an unsupervised infant! Don't let your baby play with it unsupervised! I take no responsibility for injuries to your child!

Final Product

Prototype Testing

Parts:

Tools

Assembly

  1. Open taplight by removing 4 screws from bottom.
    Put screws aside in safe place for reassembly.
    Remove plastic body, dome, and carefully take out the cardboard membrane. This membrane is delicate and is needed to activate the switch.
  2. Strip internal wiring and lightbulb for taplight. You can also remove the battery leads etc. But be careful not to damage the switch since you will reuse that for the button push. Desolder the leads from the switch.
  3. Place your rgb led on your breadboard if you chose to use one, or you can use a small piece of thin cardboard. The base helps the led stay in place.

    Solder each of the 3 colors' leads to the resistors.
    Solder wires (4 inches or so. Set the led onto the base and check wires reach the teensy for good length) to the end of each resistor and the common lead
    Solder the red green and blue wires into the pwm pins on your teensy (9, 14,15 in this case)
    Solder the common lead wire to ground (common cathode) or vcc (common anode)
    Solder a wire from the center pin on the switch and one on the outside.
    Solder the wire from outside of switch to pin 11 on teensy and the other to vcc.


  4. Test your circuit by uploading the program to it. Do this before it is fully assembled to save yourself some headaches.
    Note you can program your teensy board very easily with the arduino ide. Just download teensyduino from PJRC's website. Do all your coding and testing before reassembling the taplight since you need to press the reset button on the board to upload your programs.

    Update:

    There is a bug with the timeout function. I will provide updated code once I figure it out. Until then just disregard the commented section. This code froze the device after the device has been plugged in for a certain amount of time (a couple of weeks)

    Download the file as a .PDE
    View the file as a .txt

    /*
    Baby Interface Device V1.0
    Build a simple Button-style USB interface for infant learning development.
    Build instructions for the device are available at http://matthewroy.com/bid/

    Developed by: Matthew C. Roy 2011
    Website: http://matthewroy.com/bid/
    License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
    http://creativecommons.org/licenses/by-nc-sa/3.0/

    You may share this code and modify for any non-commercial purposes.
    */

    const int RGB_R=9;
    const int RGB_G=14;
    const int RGB_B=15;
    const int PBTN=11;

    int rgb_rval=255; //initial r val
    int rgb_gval=255; //initial g val
    int rgb_bval=255; //initial b val

    int pbtn_state_cur=0; //cur value of push (for change)
    int pbtn_state_prev=0; //prev value of push (for change)

    long interval_off=30000; //milliseconds to wait before turning off light
    long pbtn_last_press=0; //last time the btn was pressed.
    long pbtn_state_timer=0; //milliseconds since push button change

    void setup(){
    pinMode(RGB_R,OUTPUT);
    pinMode(RGB_G,OUTPUT);
    pinMode(RGB_B,OUTPUT);
    pinMode(PBTN,INPUT);
    }
    void loop(){
    // set all 3 pins to the desired intensity
    pbtn_state_timer = millis();
    /*if((pbtn_state_timer-pbtn_last_press)>interval_off){
    rgb_rval=255;
    rgb_gval=255;
    rgb_bval=255;
    }*/
    if(check_switch()){
    pbtn_last_press=millis();
    rgb_rval=random(0,255);
    rgb_gval=random(0,255);
    rgb_bval=random(0,255);
    Keyboard.set_key1(KEY_SPACE);
    Keyboard.send_now();
    Keyboard.set_key1(0);
    Keyboard.send_now();
    }

    analogWrite(RGB_R, rgb_gval);
    analogWrite(RGB_G, rgb_gval);
    analogWrite(RGB_B, rgb_bval);
    }
    boolean check_switch(){
    pbtn_state_prev=pbtn_state_cur;
    pbtn_state_cur=digitalRead(PBTN);
    if(pbtn_state_prev!=pbtn_state_cur){
    //switch happened
    return true;
    }
    else{
    return false;
    }
    }

  5. Tape or glue the teensy into the base with usb plugged in. I wrapped the cable around the wall mount part on the base to make it more secure. My baby loves grabbing wires and tugging them!

    Put the switch back into the switch holder on the base and place the led in the center of the base.

    Now cut a small hole big enough to fit around the usb cable on the side of the round exterior. It can be pretty tight just so the cable can fit in it. Check for sharp edges. If you wanted to be really professional you could cut a square hole and wire up a usb-b sized jack instead of the usb cable attached to teensy and dangling out of the back.
    I suggest tracing the thin cardboard membrane onto a paper plate then cutting it out for a more durable membrane.

    Place the membrane around the led so it sticks through the center hole.
    Reassemble the taplight being very careful not to press too hard on the dome until its completely assembled. That's how i ruined my first cardboard membrane and why i suggest a stronger one!
    Once the screws are back in place you're all done!

Suggested Improvements

Build this thing with 2 Pololu Wixels instead for wireless battery operated version.
Add an IR receiver for remote control version. This is good for the media playback/pause functionality
Add an SD card/reader on this and have a custom application that lets parent's put image/media slides on it for the baby to flip through
Wire in a reset button to reset teensy so you can upgrade the firmware without opening the tap light.

Share and Discuss

blog comments powered by Disqus

Creative Commons License
Baby Interface Device by Matthew C. Roy is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://matthewroy.com/bid.
Matthew Roy is an Amateur DIY hobby electronics maker as well as a full time web and application developer and an all around well rounded geeky dad.