Close

Software updates and a spinning HC-SR04

A project log for Surveyor

Rudimentary robot frame on tracks

pengu-mcPengu MC 05/30/2020 at 13:070 Comments

Some stuff done on the atmega328 and raspberry:

* ADC filtering on the atmege328. Just an average that updates every 64 samples.

* PWM signals for the motors. Turns out these cheap 2 euro motors don't really control that well so you can only reliably get full speed or something close to half speed.

* A DS18B20 temperature sensor is added directly to the raspberry pi header. Works great out of the box. I had 2 but I destroyed one by reading the pinning wrong and pumping half an Amp through it for a few seconds.

* Servo control added to the atmega328.

* Auto reset wacthdog for the atmega328 when there's been no I2C communication for 500 ms.

2 Of the 8 bit timers on the atmega328 are in use now. One for the motor PWM and one for the servo control. The free 16 bit timer is going to be used to get the distance from the HC-SR04 module you see turning around there.

I also took a moment to measure the speed. It's about 0.95 m/s (3.42 km/h)

next up:

- distance measurement

- distance calibration vs ambient temperature

- ROS and point cloud 

- SLAM

- neopixels

(not necessarily in that order)

Discussions