Introduction: Moving, Sensing Head for the Freenove Hexapod

The Freenove Hexapod Robot Kit is an excellent value hexapod kit that can be controlled from PC or phone or a supplied rf controller.

It is available from ebay or amazon or aliexpress. Here's the Amazon UK link https://www.amazon.co.uk/Freenove-Raspberry-Crawling-Detailed-Tutorial/dp/B07FLXFDZ1?th=1 .

One nice thing about the kit is that it exposes certain pins for further expansion possibilities. I decided that what the hexapod needed was a head with a dot matrix mouth and ultrasonic sensor 'eyes' that could scan from side to side and provide the necessary information to code in some object avoidance. I also added a buzzer for good measure!

Supplies

I give example links, but you may find better deals or swifter delivery elsewhere (such as ebay)

OPEN-SMART 0.8" Inch 16x8 I2C LED Dot Matrix Display Module 4 Pin Red LED Matrix for Arduino https://www.aliexpress.com/item/1005004399231415.html

US-100 ultrasonic sensor https://thepihut.com/products/us-100-ultrasonic-distance-sensor-3v-or-5v-logic

Note this project uses the US-100 Ultrasonic Distance Sensor not the HC-SR04 which has slightly different dimensions (and didn't play nicely with the existing code).

mg90s servo https://kitronik.co.uk/products/2592-mini-180-degree-metal-gear-servo-mg90s

a passive buzzer

a selection of jumper wires, 10 female to female and 3 male to female

Step 1: Print Parts

The files for the servo support and the head can be found here on printables: https://www.printables.com/model/654812-head-for-the-freenove-hexapod

The dimensions do vary a bit with mg90s servos but I think my support will handle most varients.

Step 2: Attach and Connect Parts

Attach the servo support to the hexapod body with suitable bolts. I believe I used M2.5. The support needs to be off centre so that the servo shaft is centrally positioned.

Mount the led matrix in the lower part of the head with pins sticking out to the right as you face the head. It should be a tight push fit. I bent the pins to about 45° but you may prefer not to.

Mount the ultrasonic sensor and secure with a couple of tiny self tapping screws.

Attach the servo horn to the head piece. Don't connect the head piece to the servo just yet.

I currently just have my buzzer poking out the back of the body!

Wire up as in the diagram

Step 3: Code

The modified code to make use of the extra bits and bobs can be found here: https://github.com/UEA-envsoft/Freenove-Arduino-Hexapod

Run the code, this will position the head servo looking straight ahead. Now connect the head piece to the servo.