Autonomous car part 1

Two years ago I decided to build an autonomous RC car. There were two main reasons I wanted to build an autonomous RC car, first I wanted to use an RTOS core I made in school, second reason was because I wanted to build an autonomous vehicle/robot.

I ordered a small 1/18th scale RC car to be the platform. The reason I chose an RC car to be the platform was because it has motor speed control electronics already built in. As the vehicles brains I selected Arduino Mega 2560. It has 256 kB of program memory and 8 kB of variable memory.

For the vehicles eyes I selected the well used and cheap HC-SR04 ultrasonic sensors. These sensors are controlled by giving a roughly a 10 uS pulse to the trigger pin. After that the sensor measures the distance and sends a pulse back with the echo pin, and the width of the pulse is proportional to the distance.


Autonomous car


I wanted to check all the sensors with only five pins. One for trigger control, one for echo and three for sensor address. First I decided to use 74HC238 3 to 8 decoder to control the trigger and 74HC151 digital multiplexer to control the echo.Both of these would be driven with the same address pins. Next I thought only using diodes at the echo line so I could get away with only one IC. I tried this but it didn’t work mostly because of the diode voltage drop and higher resistance. After this next idea was to directly wire the sensors echo pin to the input capture pin, surprisingly it didn’t work either because how the sensors are wired. So finally I wen’t back to the original plan of using two IC’s this worked nicely.

Valve controller Hardware part

This is a write up about a three way valve controller I decided to build. Project started when we had a Nibe air to water heat pump installed. We left our old oil based system more or less intact, in case it was needed when the temperature got too low for the Nibe. We also made a connection from the oil boiler to the Nibe so we could use it as a external heating system. Nibe has a maximum input temperature of 65 degrees Celsius. So we needed a controller to control the water temperature. First we installed a commercial solution, but for some reason it didn’t close the valve when the maximum temperature of 55 was reached. One solution would of been reverse engineer and fix the controller, but wheres the fun in that. So I decided to build my own.

Continue reading