Model Boat Tacho

bluejets

Senior Member
Project is for 1/5 scale of a Rivierra model boat from the 1940's.
Already had a circuit built providing a 0-5V signal to an LED display for the readout and decided to change the latter to a 270 degree gauge which would look more appropriate. So the code here is for converting the 0-5V signal to a servo signal.
The normal servo has a output of about 90 degrees so the fix here was to drive the gauge needle from a set of gears. These were saved from somewhere or other, can't remember. Old clock or toys maybe.
This meant that for an input of 0-5V (0-255) the servo would have to have it's output scaled to suit the gearing and the 270 degree travel. As it turned out in this case it was about 71-159 for the servo. This was surprisingly easy to do in the code, especially given that this was my first attempt at writing and programming the picaxe. The output does not have to be at all accurate as long as it is in the ball-park somewhere.
Code:
`New design servo drive for boat tacho version 3
`Take 0-5v (pot value for test) and load into b0(Tachin)
`servo needs a range min 71 to max 159 = 88 steps
`Divide Tach-in(0-255) into 88 parts(approx 3 each step) and feed to servo
`i.e. Input goes full 0-255 whereas servo only travels 71-159
	Symbol Tachin = b0	`input signal voltage from tacho board
	Symbol pos0 = b1		`calculate range
	Symbol pos1 =b2		`servo position
init: servo 2,71
	
main:
	readadc 1,tachin	
	pos0=tachin/3		`take input reading and divide by 3 for ranging 
	pos1=pos0+71		`71 is minimum reading
	servopos 2,pos1		`output result to servo
	pause 10
	if pos1<80 then high 4	`generator simulator no-charge light on
	end if
	if pos1>80 then low 4 	`generator simulator no-charge light off 1000rpm
	end if
	goto main
Have a few photos here for those who might like to make something the same as it can be applied to any gauge.
The software for making the gauge face came off the net. I used an original version which was free to use for 10 times and then it was necessary to buy it. I see they now have a free version with limited functions as well as a full version but I have not tried any of these as yet.
Meter software .... http://tonnesoftware.com/index.html
I made the housings etc. from aluminium bar and sheet. Dial cover insert was just clear plastic for now until I can get a hold of some thin glass sheet. I have been advised that it is possible to cut thin glass using a mandrel made up to the diameter required and run it in a pedistal drill using valve cutting paste as an abrasive. Apparently takes a while but works well.
 

Attachments

Last edited:
Top