R2-D2 VEX robot 

Hello! Happy #MakerMonday to you. This week, we’re sharing one of our favourite builds from the new issue of Raspberry Pi Official Magazine. The empty shell of an iconic film character formed the basis of an excellent Raspberry Pi– and VEX-based robot build.

Younger years spent absorbed in various sci-fi films and TV shows such as Forbidden Planet, Silent Running, Star Wars, Star Trek, and Lost in Space led to embedded software engineer Daniel Ramirez’s abiding interest in robots and his first forays into electronics. When he chanced upon an R2-D2 shell in his local hypermarket, Daniel saw a chance to combine his technological know-how with his sci-fi dreams. At first, the R2-D2 toy sat in his room “looking expectantly at me like Pinocchio looked at Geppetto, wondering when it could start moving around on its own”. Feeling “a little bit guilty”, Dan began looking for suitable parts with which to animate R2-D2. In the end, he chose a Raspberry Pi and some VEX Robotics construction kit components to bring the “trash-can-sized” Star Wars robot back into use.

Dan converted a motionless Star Wars toy without motors or wheels into a fully animated R2-D2 robot; Raspberry Pi 3, gearing, and parts from existing VEX Robotics construction kits made it walk and turn its head

Beep, beep, beep!

As a child, Daniel and his brother had a Heathkit ET-18 HERO 1 robot that their father bought to help them learn electronics and get through college. At the time, Daniel was struggling with maths and science, but the four-week project assembling and testing the robot from a kit easily paid off: he went on to have a career working for advanced technology companies in Massachusetts, as well as publishing articles about his various robotics and electronics projects. 

Dan finds VEX construction sets ideal for new robot and animatronics projects, and for rapidly prototyping new inventions. He recommends the VEX user forum for inspiration and ideas. Parts are inexpensive and stronger, “with more rigid metal structural parts” than similar construction sets, and are often used in robot building contests in the US. He wanted to learn more about building an autonomous or tele-operated robot and chose Raspberry Pi because he could use it with software development tools like Python3, C, C++, Ada, and FreeBASIC.

The upgraded Raspberry Pi 3 version sports object detection, temperature sensors, and wireless controls

Reimagined classic

Daniel was keen to customise the toy robot and was pleasantly surprised to find that it had a rotating geared head and an empty battery compartment, but no wheels, motors, drivers, or controllers installed. To operate it as a robot that moved on its own and could sense its surroundings, he would need to rebuild the toy from scratch, plundering his stash of VEX Inventor kits for parts. Dan began by writing code in C and developing “a simple serial interface between Raspberry Pi 2 and the VEX EDR microcontroller, since it could drive the servo motors and read the sensors as plug and play”. Raspberry Pi proved a good choice, as it would be simple to connect up all the components that needed to fit inside. However, he needed to remove the robot toy’s base — not easy given just how robust the plastic case is. Removing the battery compartment gave Dan access to the inside, where he discovered a small hole for gearing, presumably to make the head turn. VEX motors and an axle joining the legs enable the robot to walk.

Using the VEX construction system allowed Dan to get the electromechanical aspects going “pretty fast”, but the firmware for the Raspberry Pi and the robot controller software required many iterations. In fact, his R2-D2 VEX robot began as a Raspberry Pi 2–based project that Daniel subsequently upgraded to Raspberry Pi 3

Daniel inserted a VEX motor beside one of the robot’s feet, with an axle so it can walk

The project cost approximately $300. Daniel observes that used parts can be found on eBay fairly inexpensively, as schools have upgraded to VEX Cortex and VEX V5 systems. “The R2-D2 shell was $50, but enterprising hobbyists with 3D printers could manufacture their own.” He advises a slightly larger shell than the one he used: fitting the VEX parts into its 1ft 6in, 8in-diameter case was “a bit tight”. Smaller motors that fit inside the hollow legs could make for an elegant alternative. 

“I can’t say enough about Raspberry Pi 3,” enthuses Daniel. “It runs reliably and does not use much battery power, so I can run the robot for hours. Its software development tools are excellent!” However, “getting the robot to communicate between the two main controllers took a while to do”.

There is plenty of detailed documentation in the VEX Library. And you can watch a YouTube video of Daniel’s VEX-based R2-D2 robot in action below. 

New tricks

The original robot is still working. Having retired, Daniel upgraded it to Raspberry Pi 3 and is currently developing a new model that can play chess with a 6DOF (degrees of freedom) robot arm, wrist, and gripper. He also recently upgraded his VEX robot with temperature and pressure sensors, object detection so it can move around autonomously, and the option to control it from a laptop or remotely, rather than a remote control. 

Daniel’s advice to someone keen to build their own robots and animatronics projects is to begin with construction sets such as LEGO, VEX, or Meccano Erector so you become familiar with their plug-and-play motors, sensors, controllers, gears, and structural parts. “Learn to adapt them to [your] own robots, mix and match various construction systems, or use scrap metal and surplus parts.”

The post R2-D2 VEX robot  appeared first on Raspberry Pi.



from News - Raspberry Pi https://ift.tt/PuDnbHa

Comments

Popular Posts