Skip to content

A11 - Mechanical Design

Brief


  • Document your individual contribution (... to the Machine)

(Group project - Esky Mate - The Laziest Invention)[https://fabacademy.org/2024/labs/lakemac/machine-group/]

Lake Mac FabLab 2024 Robot


My contribution to the robot was the electronics and software. Jaryd's strong suite is definitely CAD and hardware where mine is more imaginary, electricity and ones and zeros on a microcontroller.

Here's my section from the Group page:

Electronics

If the 3D prints, aluminum extrusion and wheels are the body of the robot then the electronics are the nervous system and muscles.

The brain:

Both Jaryd and I love the (Pico/Pico W)[https://core-electronics.com.au/raspberry-pi/pico.html#category_2118] so decided to go with one as the thinker for our robot. If we had more time we could have also included a Pi SBC to do more complex tasks and parsed meta data to the Pico to control motors

Controlling the robot:

We knew we wanted some sort of remote control, everyone carries a phone so some solution using a webpage and WiFi seemed feasible. A stretch goal: an AI guided robot waiting for a whistle or gesture then it would find whoever was requesting it and moving towards them.

Making the robot move:

An esky filled to the brim with goodies will weigh a lot, so we needed powerful motors and hence big motor drivers (while minimising cost) We went for (these high-power motors from DFRobot)[https://core-electronics.com.au/metal-dc-geared-motor-12v-50rpm-50kg-cm.html] to give us the oomph we need to move on sand. And (these 7A per channel motor drivers)[https://core-electronics.com.au/2x7a-dc-motor-driver.html] that operate from a 3.3V logic level.

Integration

To make everything neat we used a protoboard and an acrylic mounting plate to keep all of our finiky electronics in the one spot.

The following electrical layout would be required for our robot to work.

Battery -> Regulator -> Pico -> Motor drivers -> Motors

Circuit design

During testing we could use a wall power supply and when on the move a 3S quadcopter LiPo would be used.

To keep the battery (and us) safe, we would fuse the main input line.

Powering the brains

Liam found this regulator in his boxes of stuff. Since the regulator did not include reverse polarity protection a schottky diode was added. We also wanted to be able to plug in a USB and diagnose the robot while it was powered up. We would have to add a schottky diode from the 3.3V output to the Vsys pin on the Pico.

Makin it move

Jumper wires were connected from the Pico to the Vio, EN, IN1 and IN2 pins on the motor drivers.

Testing

Liam plugged it in and lots of LEDs came on and nothing let out the magic smoke, WOOOOOOOOOOOOO!!!! Nah, each component was unplugged, power applied and different points measured with a multimeter as components were added back.

Making it think

How do we control the motors? ChatGPT surely knows... ... And it did, with some modifications after breaking the functions up we had just what we wanted.

https://chat.openai.com/share/aaf27815-6c1d-407c-844d-6cc3693adbcb

We found an analog joystick and mapped it using that class:

And would you belive it... it didnt work, we flipped some of the directions in code and then it worked!

XXXX TODO: PUT JOYSTICK CODE HERE

Making it think (wirelessly)

The Pico W includes Wifi, and allows an access point to be hosted from the device itself.

We wanted our webpage to include some interactive elements, not just a few buttons for forward, backward, left, right, and stop. GIVE US SOME SLIDERS!!!!! Of course we went to ChatGPT, we are lowly mecha's not web devs (the code will work... but not amazingly).

https://chat.openai.com/share/9caf3281-fe0c-4171-ab44-5ce5e005a3b6 We continued to feed this code through GPT with many many prompts to get it into its final form:

XXXX TODO: PUT webpage CODE HERE

Testing it all together

Besides flipping the motor directions again, testing went alright. I hit one issue while testing at Core, where there were too many WiFi bands being used, not allowing us to connect to the AP it sets up. I moved around the building until the WiFi was a bit weaker and it worked great!

Resources - DESCRIPTION

FILES

DOWNLOAD LINKS HERE