Project Home | Android Experiments | GitHub
IntroductionLantern combines an Ikea lamp, laser projector and Android Things to create a connected projector that explores the relationships between surfaces and content.
Note - as of January 2022 Android Things has been discontinued. We are leaving this project up as the hardware steps will still work to create a connected projector, powered by a Raspberry Pi. To display content on the projector you would now need to install Linux on the Pi and create your own content to display. For example launching a full screen web browser and projecting web apps.
It was originally built around the concept of ‘channels’ – mini apps that can be configured through the companion app, connect to data feeds online and display a projected UI.
Here are some channels we made:
Rather than insisting that every object in our home and office become 'smart', Lantern imagines a future where projections are used to present ambient, relevant UI around everyday objects. And, as opposed to a screen, when they're no longer needed, the projected UI simply fades away.
At the heart of Lantern is Android Things, a new operating system from Google, designed for embedded devices and the Internet of Things. Android Things makes it way easier to write software for connected devices, especially for mobile developers that are already familiar with Android!
The buildLantern is built as an Ikea hack using the IKEA Tertial lamp, off-the-shelf parts, a 3D-printed enclosure and our open-source software.
Don't worry If you've never used Android Things before. We'll walk you through the process to get up and running in no time.
Check out the parts list below - once you've printed the housing and have all the parts, it should be about a 60 minute build from start to finish.
Mechanics
- (1x) IKEA Tertial Lamp US | UK
- (1x) 10mm x 2m Braided cable sheath US | UK
- (4x) Cable ties US | UK
- (6x) M2 x 4mm Self tapping screws US | UK
- (3x) M2.2 x 8mm Self tapping screws US | UK
- (5x) M3 x 20mm Self tapping screws US | UK
- (2x) M4 8mm Thumb screws US | UK
- (2x) M4 10mm Threaded inserts US | UK
Electronics
- (1x) UO Smart Beam Projector US | UK
- (1x) Raspberry Pi 3 Model B US | UK
- (1x) Raspberry Pi V2 Camera (optional) US | UK
- (1x) Adafruit ADXL345 accelerometer US | UK
- (4x) Female to female jumper cables (75mm) US | UK
- (1x) MicroSD card (greater than 2GB) US | UK
- (1x) Right-angle Micro-HDMI to HDMI US | UK
- (2x) Right-angle (down) Micro-USB extension cable US | UK
- (2x) Anker Powerline Micro-USB 6ft cable US | UK
- (1x) Anker 2-Port USB power adapter US | UK
Tools you’ll need
- Screwdriver (cross-head, types PH1, PH0)
- Rasp file (+Vice optional)
- Protractor or digital angle ruler
- Rough sandpaper ~80 grit
- Soldering iron + solder (knife head optional)
- Snips (for cutting lamp wire, cable ties)
- Hex key 4 (for lamp grub screw + inserts size 4)
- Small pointy thing like bradawl or screwdriver to undo bulb clips
1. Remove the cable
First, we will remove the power cord from the lamp. Loosen the screws on the side and then cut the cord near the lamp head. Pull it out through the metal arms.
2. Remove bulb attachment
Using a hex key, remove the screw holding the cable in place.
Insert a small screwdriver through the side of the lamp head. Gently pry the plastic tabs to free the socket. It may be a bit tricky to get it loose.
Turn the lamp head over and remove the plastic screw holding the socket in place. You can now remove the socket.
3. Modding the lamp arm
Unscrew the lamp head from the arm and remove the plastic clip at the end.
File the corner down to a round 'quarter-circle' radius.
4. Clip the arrow head
Unscrew the lamp head from the arm. Remove all parts from the metal extension.
File the edges of the metal clip so they all are smooth and parallel.
5. File plastic spacer
Take the plastic spacer that was removed with the metal extension. Using sandpaper, file it down to approximately 4.5 mm on both ends.
Filing down the plastic piece will allow the clamp to grip the metal better. This will prevent the head slipping over time.
6. Tighten those screws
Tighten all the screws on the lamp so it’s nice and stiff to move around.
Chapter 2: 3D printing the enclosure1. Measure your lamp angle
Each lamp is different so the CAD model will need to be adjusted. Using a protractor or a digital angle ruler, measure the angle between the dimples and the lamp arm.
2. Get the CAD
Open the CAD model in OnShape (free for open source projects). It’s a public document so make a copy for you to adjust.
3. Adjust the CAD
Click the Sketch titled ‘EDIT THIS - arm pilot holes’. Select the measurement highlighted above and change the number to the angle you measured in Step 1. This will rotate the features accordingly.
4. Export your model
For each of the three parts, right click on the part name and click Export. Use the following settings:
- Format: STL
- STL format: Binary
- Units: Millimeter
- Resolution: Fine
- Options: Download
5. Print it
Print out the files using a 3D printer. We used an Ultimaker 2+, but feel free to use whatever 3D printer you have access to.
You can also use a 3D-printing service like Shapeways or iMaterialise. Just upload the STL files and they’ll ship ‘em right to your door.
Our Ultimaker 2+ settings:
- Material: PLA
- Nozzle: 0.4mm
Use the default settings but adjust:
- add brim of 10mm
- Nozzle temp for first layer 200°C
- Nozzle temp for rest of print 210°C
- When printing the Top parts (cap and arm) set a wall thickness of 3mm.
1. Solder the accelerometer
Solder a row of 9 header pins on to the accelerometer. Make sure they extend out the front of the board.
2. Insert the projector
Press the projector into the base; it should feel snug. Plug the micro-HDMI cable into the projector.
3. Assemble the arm and cap
Use 2 x 20mm M3 scr ews to attach the 3D printed arm to the cap. Carefully align the corner of the arm with the locator on the cap.
4. Threaded inserts
Using a hex key, screw the 10mm M4 threaded inserts into the two holes on the top of the arm, until they're flush with the surface.
5. Connect the jumper wires
Use the jumper wires to connect the accelerometer to the I2C bus on the Raspberry Pi. Take your time - it's important they're connected to the right pins on both components!
6. Attach the camera (optional)
Lift the clips on the camera connector and insert the ribbon cable. Push the clips back down to hold it securely in place.
Screw the camera into place.
7. Attach the Raspberry Pi
Slide the Raspberry Pi in place and secure with three 8mm M2.2 screws.
8. Attach the accelerometer
Use two M2 4mm screws to attach the accelerometer to the base.
9. Attach the cap and arm
Use the three 20mm M3 screws to attach the cap and arm to the base.
10. HDMI
Plug the HDMI cable into the Raspberry Pi.
Chapter 4: Wiring1. Cut the sheath
Cut braided cable sheath to 166cm long. We recommend using the knife attachment on your soldering iron to prevent unraveling.
2. Thread the sheath
Thread the two USB cables through the braided cable sheath.
3. Push cables through the lamp
Insert the ends of the Micro-USB cables through the back of the lamp head.
4. Right angle connectors
Thread the cables through the side of the 3D printed arm. Connect the right-angle Micro-USB extension cables. Plug in the USB power adapter.
Chapter 5: Software1. Get Android Things
Get your microSD ready, and follow the steps at https://developer.android.com/things/hardware/raspberrypi.html#flashing_the_image to flash an SD card with Android Things.
2. Boot up into Android Things
Insert the microSD into the Pi and connect the USB power.
3. Configure WiFi
Run the "android-things-setup-utility." When prompted, choose '2 - Set up Wifi on an existing Android Things device', and then '1 - Raspberry Pi 3.' Next, plug your Raspberry Pi into your computer (or router) via Ethernet, and press 'Enter.' Follow the on-screen prompts to configure the WiFi. You may now unplug the Raspberry Pi.
4. Install and run the code
Download the code from GitHub and open it in Android Studio. Once Gradle has synced, open a terminal window and type:
adb connect android.local
Then select the 'things' configuration press the green run button to upload and run the code!
Getting an error? Check our troubleshooting guide below.
5. Power the projector
Plug the Micro-USB into the projector and power on. Lift it off the desk to check the display. Lantern will automatically reboot if it was started in the wrong screen resolution, so you might need to wait for that to complete. When you see the splash screen, you're good!
Running into problems? Check our troubleshooting guide below.
Chapter 6: Putting it all together1. Attach the hardware
Insert the assembled hardware into the lamp head. Be sure to check the webcam and projector are aligned vertically.
2. Thumbscrews
Once it's all lined up, attach it with the thumbscrews.
3. Cable ties
Secure the cable in place with small cable ties. Leave enough slack near the lamp head to get the hardware in and out.
Install the companion app on your phone (using Android Studio) and use it to connect to Lantern.
Move the lamp down, forwards or up to switch between the default channels.
Change a channel by tapping the surface and choosing a new channel from the list.
Next steps
Customise your lantern - mix and match Ikea lamp part or spray paint your own. Follow this guide to make your own channel. Here's some things we had in mind:
- A twitter feed on your desk, the latest headlines, or your slack messages
- A randomised light dot to tease your cat
- Use the webcam and computer vision to use your Lantern as a camera-projection system
- Experiment with Processing for Android Things
`adb connect android.local` returns an error
It might be that your network can't resolve that name, or your device isn't connected to the WiFi. Turn on the projector and look at the Android Things Launcher - it should tell you the IP address on the local network.
- If there's an IP address listed, in your terminal, type `adb connect <your-device-ip>`
If this doesn't work, or your device doesn't have an IP address, your WiFi network might not support this class of device. Try configuring WiFi again, connecting to a different network if possible.
Comments