Documentation:
Project Writeup: Google Docs
Code: github.com/jdavis-codes/WALL_E-3D-Scanner
CAD: Onshape
Project Writeup: Google Docs
Code: github.com/jdavis-codes/WALL_E-3D-Scanner
CAD: Onshape
This project started with a very engineering focused prompt:
"Build a servo driven pan & tilt mechanism to convert an infrared TOF (Time of Flight) distance sensor into a 3D scanner."
The second I saw the sharp IR distance sensor in question, I was instantly taken by how I felt the same heartwarming twinkle I saw in Pixar's Wall-E character design, albeit a slightly off-kilter asymmetry between the IR transmitter and reciever. Our WALL-E will just be slightly cockeyed!
Of course, almost all Sci-Fi film character design is kit-bashed to a large degree. when I went back to write up this project, I discovered that WALL-E's Director, Andrew Stanton, toke the design on an existing pair of binoculars. Cute!
The project left almost all specifics open ended, so first we created a general wiring diagram, and ideated the physical structure.
I selected an ESP32 microcontroller as the brains- It's a tank! 240mhz, WiFi, and 16mb of storage, all almost 10-100x more than the classic Arduino (based on the atmega328p chip). It's cheap too- you can get a pack of 10 on the Brazilian forest website for about $30! It's my Swiss army knife for doing just about any robotics project.
The IR sensor and servos are fairly self contained units, so the only additional passive component needed is a 10uf filtering capacitor on the Ir sensor's power input. The Sharp outputs an analogue voltage depending on the range, so we use pin 36 on the ESP. The servos need a PWM (Pulse Width Modulation) signal to set their rotation angle. Because the ESP32 has a flexible routing of it's pwm pins, the choice doesn't matter too much.
I selected an ESP32 microcontroller as the brains- It's a tank! 240mhz, WiFi, and 16mb of storage, all almost 10-100x more than the classic Arduino (based on the atmega328p chip). It's cheap too- you can get a pack of 10 on the Brazilian forest website for about $30! It's my Swiss army knife for doing just about any robotics project.
The IR sensor and servos are fairly self contained units, so the only additional passive component needed is a 10uf filtering capacitor on the Ir sensor's power input. The Sharp outputs an analogue voltage depending on the range, so we use pin 36 on the ESP. The servos need a PWM (Pulse Width Modulation) signal to set their rotation angle. Because the ESP32 has a flexible routing of it's pwm pins, the choice doesn't matter too much.
Conveniently, there is also a complete 3d model of the sensor available, which made making a perfectly form-fitting 3D print a breeze! I've always used
Conveniently, there is also a complete 3d model of the sensor available, which made making a perfectly form-fitting 3D print a breeze! It also ended up landing the model in just about 1/8th Scale, my favorite scale to work in.
I used Solidworks in High school, and switched to fusion360, but there is a new kid on the CAD block, OnShape. The price-tag of $free, and the browser based colaaborative experience seemed like a welcome change to PDM nightmares. I think it stacks up well.
I used Solidworks in High school, and switched to fusion360, but there is a new kid on the CAD block, OnShape. The price-tag of $free, and the browser based colaaborative experience seemed like a welcome change to PDM nightmares. I think it stacks up well.
The main design challenge was actuation - WALL-E's neck is articulated in a way that implies internal actuators in each joint. At just shy of 4mm of space, this wasn't happening. I was likely inspired by how the Doozer's in Jim henson's Fraggle Rock operate. Servos with wire linkages extend into the head to control the mouth and gaze.
this was entirely subconscious-- I didn't research this design or I might have made the choice to use cable drive to more discretely hide the actuation).
this was entirely subconscious-- I didn't research this design or I might have made the choice to use cable drive to more discretely hide the actuation).
To make WALL-E both serve the function as a 3D scanner, and also to add in my side-quest to make him adorably puppet-able, I turned to using a web server on the ESP32 wireless data transfer and bidirectional control from a phone.
to achieve this, we used websockets! This web technology establishes a handshake between a browser and server, and then allows low latency, real time, bi-directional messages to be passed via TCP (until one side closes the connection). I closely followed this excelent turorial by Stéphane Calderoni to implement a web-socket server on the ESP32.
We use Arduino c++ to write hardware controllers for the servo motors and IR sensor readings that keep track of device state. Then I created some simple HTML, CSS and JavaScript files which define a user interface and communications protocol to a web browser.
to achieve this, we used websockets! This web technology establishes a handshake between a browser and server, and then allows low latency, real time, bi-directional messages to be passed via TCP (until one side closes the connection). I closely followed this excelent turorial by Stéphane Calderoni to implement a web-socket server on the ESP32.
We use Arduino c++ to write hardware controllers for the servo motors and IR sensor readings that keep track of device state. Then I created some simple HTML, CSS and JavaScript files which define a user interface and communications protocol to a web browser.