Close

Added ultrasonic sensor, starting to work on mobile controller

A project log for Legged Robot 9 Servos (hexapod type)

A robot like a hexapod but only has 4 dual-axis motions, the two center legs only have 1 axis to lift them up. Based on Arduino Nano and ESP

jacob-david-c-cunninghamJacob David C Cunningham 08/29/2020 at 02:150 Comments

Added an ultrasonic sensor to the front, had to use an analog pin as ran out of digital pins. Again it has the issue of needing a near-perfect surface to hit but it is surprisingly very accurate in terms of distance measurement. The program is basic, it will turn left or right(alternate) requiring up to 5 turns as that means 90 degrees. The robot uses about a 14" x 14" box. See the short video of the sensor working as well as the weakness of the servos/this design in general.

Also working on the controller. Need to write the function to determine what quadrant you clicked, trick is it's rotated. Should be able to just use HTML/JS but the triangles are hacks so you can't really determine what you clicked on because all the triangles are squares and the last one overlaps the rest. The controller will be usable in landscape and portrait. I designed it in landscape first but I could see a one-handed approach being more desirable.

I have this idea for a combined "backpack" sensor. It would require a secondary "computer" eg. an actual computer, a Raspberry Pi Zero.  I have a single-point "Lidar" thing I bought, I was messing around with it in the past, I was stripping servos for this pan-tilt mechanism for it(with modified feedback too). Anyway I would combine that with a vision system(single camera) that's doing basic edge detection and then using the single point Lidar as a quick depth probe... I don't know. At least this, I'll use Python/have more room to work with vs. an Arduino. I have some 2 cell batteries and a converter to go down to 5 volts, can build a little system with a Pi Zero. This is all talk, not sure how well it will actually go. I will keep the ultrasonic sensor as a main sensor as well. It does look good though so far.

Something like this:

Missing the pan/tilt part but yeah. "Phase-array" throw a buzz word in there, like a series of reflective mirrors, single point, use sequential delay to know which reflection it was... idk... Soy Tonto.

Mostly I'm just annoyed how dumb the robot is, like "oh there's a chair leg in the way, I'm going to run into it". Will see, busy this weekend so probably won't get much done for this but trying to make it a priority.


Edit: I decided to skip the fancy mobile controller design for now and got a basic controller working. Issue is the middle servo got so hot it melted the mounts it was attached to... so not sure if it's a bad servo or the servo was pulling so much load it got that hot. It's nuts, minutes later the plastic is still warm to the touch.

Update next morning:

I feel that disappointment in this project when you do a bad job. I have some buck converters may try that if there's a load issue... not sure if the UBEC can't do it. Maybe I'm just using cheap parts but mostly no math.

Later in the day:

It seems to do better after I lower the voltage from 6V down to 5V(for the 4.8V per servo) maybe that makes sense regarding lower peak current draw.

I also noticed when the phone sleeps the websocket stops/gets slower(I think the setInterval call in JS maybe) as it still works but not as often. Anyway gives me some ideas, I have to fine tune the leg movements(servo positions/ranges). Also will give it "purposes" eg. "exploratory mode" which it'll just keep moving forward/using onboard obstacle avoidance ways.

I'll continue adding onto it as a test bed provided it can still move.

Discussions