View Full Version : Interfacing mechanical tachometer with Arduino?
SimSupervisor
08-10-2015, 11:13 PM
sorry if this has even been posted, from my searches even a thread named "Old Tachometer" was talking about a tachometer with internal electronics (in that case, a DC motor)
Part of a lot of "non-functional" instruments I acquired for my instrument panel is a "Recording Tachometer, Mechanical" from Mitchell Aircraft Products. It really is Mechanical - no electronic parts inside. Now, after cleaning, it looks brand new; and beside the o-ring being wrongly sized (and blocking the needle if tighten) the unit seems to be still functionnal, in that if I turn the shaft protruding from the back (manualy) I can see the needle moving up, and coming back down when I stop.
I managed to test up to maybe 500 rpm by hand, but I got thinking, surely I could interface this with a DC motor, that in turn I could interface with an Arduino (and in turn with link2fs)?
Would it be a good idea to have a DC motor running constently from the arduino mega board? Or should I just strip the guts out and use a servo (and some gears)?
(it looks so good, I'd be happy to not have to gut it)
What do you guys think?
hyamesto
08-11-2015, 02:27 PM
Hi.
Can you post a photo of the instrument? I presume this...
http://www.mycockpit.org/forums/attachment.php?attachmentid=10538&stc=1
Sure, you can drive that with a DC motor, but you need to know if the relationship between the real RPM of the original airplane, and the translation of the instrument.
Example: The real airplane has, for example 2000 RPM, if you turn the shaft of the instrument 2000 RPM and the needle show 2000 RPM, you need a DC motor with at least 3500 rmp (if you want full scale indication) connected directly, and with arduino, use a PWM output (Pulse Width modulation) to control the rpm of the DC motor.Some tachometers (like cars) take the rpm by a reducccion gear, and in this case, you can use a less rpm DC motor.
And yes, you can use a servo, with spur gear with 2:1 relation (the servo turns 180š and you need at last 270š,
but you loose the time recorder.
My opinion, try to use a DC motor.
Regards.
Horacio.
SimSupervisor
08-11-2015, 10:50 PM
Thanks a lot Horacio.
Yes, it looks quite a lot like the one you posted, heres a picture of mine.
http://www.mycockpit.org/forums/attachment.php?attachmentid=10542&stc=1
Today I tried to hook it up to a DC motor I have on-hand. That motor is meant to run at 12V as far as I know. Running 5V trough it and interfacing it with fun tac to the tachometer, it was stable at 1500. I ran it at 12V and it would go higher than the top 3500.
The tacometer shaft is made to accept a square shaft. Interfacing to this should be easy. But I still have to get a more appropriate DC motor. Not quite sure what to get but I guess I can experiment.
Can we run DC motors directly off Arduino's PWM without issues? I was affraid the motor would want more power than the PWM would output.
I'll also have to make some sort of bracket to hold it in place.
Regarding the recording function... so far it haven't moved at all from the 23377 hours it is currently at. Ok, I must admit I haven't made it revolve for a full hour yet. LOL.
Can I reset its position to zero without damaging it?
Another issue I have with it (and likely why I got it as non-functionnal) is that the o-ring between the faceplate and glass is too thin (and of a larger diameter, I assume its not the original one) - being thin result that if I tight the faceplate in place, the needle is stuck. Any idea what I should use for a spacer, to ensure its not too tight and the glass doesn't vibrate?
hyamesto
08-11-2015, 11:50 PM
You cannot use DC motor directly off arduino. The maximum PWM output is 40mA.
The motor must overcome the inertia of the internal mechanics (inertia rise at more RPM indication), and the current consumption can rise above 40 mA.
You need a driver or external circuit with fast response to accept the PWM signal.
The circuit need some fast action mosfet transistor, and a Schottky diode for protection of current return from the motor to arduino pin, some resistors and maybe others components to run the dc motor with external 12v.
There are some arduino shields to control DC motors ready to work with 12 v, but i donīt know if are faster to reconigze the PWM.
And the recording function, the last number (white background) moves every 1/10 of hour, that is 6 minutes.
You must turn at least 6 minutes to change the last number, and 1 hour to move the next digit.
Reset is posible, but itīs very difficult to do. I would leave so. I do not recommend disarm or reset. But if you want, you can use a sewing needle to move individual numbers, trying to separate the others digits to avoid the gear system between digits.
And the last, i donīt understand about the o-ring. Itīs the glass touching the needle?
Maybe you can suplement with a ring of thin plastic (plastic like credit card, or more thin, or various circles of black paper).
Use a compass cutter.
And, sorry if my english is no good.
Regards.
Horacio
SimSupervisor
08-12-2015, 01:17 AM
Do not worry, English is not my main language either, as long as we understand the idea all is good. Driving this 12V motor I already have and know is fast enough sounds like a good plan, I will look into the schematics for that. Thanks.
Yes, the glass touch the needle, but you gave me the best idea for a reacement: a plastic lid.
I'll post pictures of my progress.
SimSupervisor
08-12-2015, 09:58 PM
no pictures yet, but for the sake of helping others who might have similar issues in the future, here's my progress so far.
I looked online, and documentation on interfacing a DC motor with arduino generally talks about using a 2n2222 transistor, such as this website:
http://aksoapy29.comoj.com/Pages/Tutorials/Arduino%20DC%20Motor%20Controller/
I do not have a 2n2222 handy to try out, but I did have a few D44H11 and D45H11 (NPN & PNP power transistors - see http://www.st.com/web/en/resource/technical/document/datasheet/CD00000942.pdf ) so I used the D44H11 in the same configuration as with previously mentionned website. I achieved a convincing result on my test bench (no picture of that mess, sorry) so this is promising.
My findings so far with the unknown motor (I think it was pulled from a defective scanner and was the belt-driven scanning tray motor..?) interfaced with this transistor, 12V, and the arduino PWM shows that I will have to limit the pwm to not go too much over the 35 hundred RPM my tachometer handles.
Thanks again Horacio
hyamesto
08-12-2015, 11:25 PM
Youīr welcome.
Try to use a flexible shaft between the DC motor and the tachometer, to avoid misaligned shaft forces. Sometimes a long spring can be used, or like the photo...
http://www.mycockpit.org/forums/attachment.php?attachmentid=10543&stc=1
The tip of the shaft is rectangle.
http://www.mycockpit.org/forums/attachment.php?attachmentid=10544&stc=1
Regards.
Horacio.
SimSupervisor
08-13-2015, 08:18 AM
I was thinking of interfacing the motor directly to the tachometer, leaving some sort of loose between the shafts to allow movement, but if I could get something like this it would be even better!
I'll see if I can find these anywhere.
hyamesto
08-13-2015, 07:36 PM
Very important...............
Checking Arduino Mega specs i found:
Absolute MAX per pin 20mA
Recomended 10 mA
Absolute MAX 200 mA for entire package
Regards.
Horacio.
SimSupervisor
08-14-2015, 12:59 AM
Thanks for pointing this to me Horacio!
Right now, I am using external power supply for the instruments. I still have lots to do, but the Arduino currently control one DC motor on 12V and one servomotor on 5V, while communicating with the computer via serial.
I found out that some of the rotary tools (e.g. dremel) have flexible shafts comparible with the tachometer - I am looking at how I'll interface the motor to the shaft, but it looks promising.
http://www.mycockpit.org/forums/attachment.php?attachmentid=10574&stc=1
SimSupervisor
08-14-2015, 07:10 PM
<iframe src="https://www.youtube.com/embed/ba9RyIFA3SE" allowfullscreen="" frameborder="0" height="315" width="420"></iframe>
hyamesto
08-14-2015, 08:11 PM
Congratulations:
You have a real working tachometer, and Iīm happy to see working full (with the time recorder too).
Try to fix the motor and the shaft, keep it as straight as possible (curves no more than 90š).
For your information, Iīm a real civil pilot, flying a Cessna 172, and donīt worry by erratic readings under 700 rpm.
In the real plane, itīs very rare having the motor running under 1000 rpm. As I say before, the tachometer itīs non lineal response, at more rpm, more torque you need, but is easy to programing a function to correct that error.
Again, keep the good work.
Regards.
Horacio.
hyamesto
08-14-2015, 08:32 PM
Other thing, you can use a gear train to increase the revolutions of the shaft, and you can use the DC Motor with more RPM.
Remember, the max RPM are marked with red line in the tachometer (2700 RPM), and its very rare exceed this value in normal flight, except with full throttle and nose down to the ground. (like kamikaze....)
Regards.
Horacio.
SimSupervisor
08-15-2015, 12:19 AM
I got a second DC motor at the electronic surplus store today, thinking it was a 5500 RPM (that's what they said at the store) but it was likely 8800 or something like that; when applied a full PWM the tacho was doing a full turn before going back to 2700. Its rather impressive, but totally not what I am looking for. lol. I think I'll stick with the motor I have on hand; it goes up to about 4000 RPM, unless I get an interesting gear train the current motor is very adequate. I'll try to work on getting a better corrective equation, and be set. :D
Thanks a lot for your take and info about the cessna 172. The panel I am trying to populate is based on a cessna 150 so there are quite a lot of similitude. There are more instruments for me to work on... ;)
SimSupervisor
08-15-2015, 12:35 AM
I forgot to add: I am quite happy to get the hour recording function. I never planned to have one and it isn't a necessary function of the simulator, but now that I have it, its going to be something fun to track.
I looked about trying to reset the numbers, and unless I dismantle the unit this wont be happening. So, when I install the simulator, I'll note the "hours" and just count from there.
hyamesto
08-15-2015, 01:58 AM
You can do one thing more to zeroing the hour recording counter:
Leave running the motor for 319 days. 6 hours, 20 minutes, 25,66 seconds....:lol::lol::lol::lol::lol::lol::lol::lol::lol::lol:
Regards.
Horacio.
SimSupervisor
08-15-2015, 02:18 PM
Yes, I thought of that.
But I wondered what would happen if I leave it on about six minutes too long... ;)
SimSupervisor
08-16-2015, 12:56 AM
Good news of the day!
I found out why it was stutering at low speed. The PSU wasn't OK with the motor's low speed revolution power peek. I plan on using the computer's PSU to power the avionics, so I went ahead and used a computer power supply unit.
After measurments, I made a graph of what my motor does at specific PWM values
http://www.mycockpit.org/forums/attachment.php?attachmentid=10576&stc=1
and from there I toyed with math until I made up something that was close enough. It still have some overshoots below 1300 and over 2900 RPM, but is very close to precise in the most important zone of 1400-2700 RPM - I don't think I'll tweak it any more than that.
https://www.youtube.com/watch?v=nV_2rmP-hCk