Luxo Jr. Robot

by Timvdv in Circuits > Robots

13112 Views, 176 Favorites, 0 Comments

Luxo Jr. Robot

IMG_3347.jpg
IMG_3182.jpg
IMG_3177 (1).jpg
IMG_3179.jpg
IMG_3126.jpg

Attention: This is a work in progress!

Video of the finished product

Christmas Pixi (on facebook)


Introduction

Pixar is famous for their Luxo Jr. lamp. I like the character of the lamp so much I actually wanted to interact with it myself. Therefore I needed a robot arm.

Luckily I don't have to start from scratch.

This project is actually build on two different projects

- the robot arm: http://www.thingiverse.com/thing:2433/#files

- Luxo Jr. 3D model: http://www.thingiverse.com/thing:432648/#files

I've combined the robot arm and the Luxo lamp in a .sketch file.


MoSCoW

Must:
- Control servos
- 3D printed stand (bottom part)
- 3D printed lamp shade (top part)
- Laser cutted robot arm parts

Should:
- RGB Lamp
- Record your own animations

Could:
- Add Pixi Jr animation (based on the Pixar intro)

Should:
- Build a large version

Items needed:

- 3mm triplex
- PLA (for 3D parts)
- 6 servo's (1 low profile servo for the base and 5 high torque servos)
- Intel Edison (can be done with a Raspberry Pi or any other microcontroller)
- Lots of wires
- 2 Power adapters (Intel Edison, servos)
- GU10 fitting (for the lightbulb)
- Lots of hot glue
- Roof Lead (for counter weight in base)

---

- Technical knowledge
- Programming experience (optional)

Download the Files

Also download the files from: http://www.thingiverse.com/thing:2433

Laser Cutting & 3D Printing

IMG_3017.JPG
IMG_3018.JPG
Schermafbeelding 2015-11-23 om 17.17.41.png
Schermafbeelding 2015-11-23 om 17.17.18.png
5667195c4fbade5ffc000104.jpeg

There are a few things that we need before we can start building.

- Laser cut the robot arm
- 3D Print the lamp cover
- 3D Print the lamp foot ( this is printed in two parts )

Finishing the Puzzle

IMG_3099.jpg
IMG_3104.jpg
IMG_3105.jpg
IMG_3117.jpg

Now we have all the parts we can start assembling!

- Attach the servo to the bottom part

The bottom part is printed in two separate pieces because it was too big. I used Hot glue to stick them together. I also hot glued the servo to the bottom part.

- Screw the wooden plate into the servo attached to the bottom plate and attach the two servos which control the lower arm

Screw the wooden plate into the servo attached to the bottom plate. When you attach the two servos on the plate which controls the lower bottom arm, make sure they start at the same place. Also put the servos in the right places (the hole in the wood). You can do this by turning the wheel of the servos in the same direction until they can't move any further. This is pretty important because these two servos are gonna be connected later on.

Attaching the Arm and Adding Stability

IMG_3102.jpg
IMG_3108.jpg
IMG_3107.jpg
IMG_3123.jpg

Assembling the upper arm

Add the servos to the upper arm and screw it together. At this just follow your common sense, the laser cutted parts are the best manual.

Hot glue everything!
When I was sure everything was in the correct place I hot glued most parts together (the ones I was sure that wouldn't change!)

Stability
I also printed some extra material make the construction a bit stronger, this is optional but recommended. When it's finished there is a lot of

Rotating the Lamp

IMG_3109.jpg
IMG_3113.jpg
IMG_3111.jpg
IMG_3110.jpg
IMG_3349.jpg

To move the lamp up, down, left and right there are two servos. One to turn the lamp up and down and one servo to rotate the lamp. Again, nothing really complicated here just follow the holes in the lasercutted wood.

Attach the fitting
attach the GU10 fitting to the 3D printed lamp shade using hot glue

We're almost finished with the robot arm!
Add attach both servo's to the robot arm and get ready to attach de lamp. Screw the 3D printed lamp shade onto the wooden plank. You can do this later when everything is running, but make sure the head is really heavy and it's important to test that before you continue.

Cleaning Up the Wires

IMG_3171.jpg
IMG_3170.jpg
IMG_3173.jpg

Pixi Jr. contains a lot of wires. Because it uses 5 servos which all contain three wires and the cable for the light bulb It requires some thinking to cover everything nicely. I made things a bit easier by using two different power plugs, one for the Intel Edison + servo's and one for the lightbulb


Don't forget: this thing can rotate!
Make sure you have a really long wire rolled up in the foot so the wires won't break when the lamp is rotating.


In the base there is some space for counterweight
I added roof lead to the base to stop the lamp from tipping over. When it's fully extender there is a lot of downforce on the lamp.

Admire Your Hard Word

IMG_3182.jpg
IMG_3180.jpg
IMG_3179.jpg
IMG_3177.jpg
IMG_3178.jpg
IMG_3177 (1).jpg

We did it!

One thing I did not mention was the weight on the lamp
My servos did not hold it and caused the lamp to fall down. I attached three springs to keep the lamp more stable, but it's still not perfect. If anyone has a better solution, please let me know.

IGNORE THIS STEP. Will Do It Later----- Making It Move (with Virtualization Software!)

Schermafbeelding 2015-11-30 om 15.14.16.png

Alright, before we start with the real thing... I've build a Javascript application in Three.js which will simulate the lamp's movement. The Idea is that you set the values in this program, after you entered the values you can push it to the lamp and the servos will jump to that position. Cool right?!

Connecting the Wires.

IMG_3332.jpg
IMG_3334.jpg

As I mentioned before the Intel Edison can only control 4 PWM pins at the time. This is not ideal because I use 5 servo's. That why I used software PWM for 1 servo.

I used pin 3,5,6,9 as normal PWM pins and 11 as the software PWM. I soldered all ground pins to the same wire so thats just 1 ground pin. The power comes from a separate 5V adapter which delivers the power to all servo's.

Programming the Pixar Jr

Schermafbeelding 2016-01-17 om 17.56.08.png

Link to my Github: https://github.com/Timvdv/pixar-lamp-intel-edison

Before we start coding there are a couple of things to note.
I used the Intel Edison as the controller with node.js as my programming language.

Smooth transitions between servos.
We're not building this from scratch. Someone wrote exactly the thing we need: http://johnny-five.io
I also used some other libraries to make johnny five compatible with the Intel Edison.

Limitations Intel Edison
The biggest problem in the software was the fact that the Intel Edison only controls 4 PWM pins at the same time while I have 5 servos. What this means is that I had to send PWM of the 5th servo manually, this makes it a bit less smooth.

Running the code
I assume your Intel Edison is up and running with the pins connected in the right port and that you have GIT installed.

(raw sketch -> untested)
- SSH into your edison
- CD to your home dir: `cd ~`
- Clone the code from my github account: git clone https://github.com/Timvdv/pixar-lamp-intel-edison...

- CD into the directory
- Run NPM install to install the dependencies `npm install`
- If your pins are connected to the same ports as mine you're good to go. Otherwise this is the time to change them. You can do this with the command: `vi slider.js`
- When you're ready.. run the program: `node slider.js`


The intel edison will create a server on http://your-ip:3000 navigate to the URL and use the sliders to control your own Pixi lamp.


Now watch the magic happen!