There are many different motors that can be used to drive the motion of instrument gauges.
The simplest is to use an analogue voltage meter behind the gauge, but most analogue meters have a limited range of movement, typically 120° of arc, whilst most instruments have 270° or more of travel. So in our use case these would be limited in their application to the Voltmeter/Ammeter, Oil Temperature gauges.
The second method is to use a simple motor, with an external sensor to detect the motion of the motor. Used in computer mouse wheels, most computer printers or for engine timing. Typically using an optical encoder disk and IR sensors, see e.g. electronics.stackexchange.com , is used to determine the position of the motor by counting the pulses generated by the encoder disk when the motor turns. Whilst this would work very well for our application getting access to suitable encoder disks and the extra complexity the sensors add makes this less suitable.
The third method is to use a stepper motor with or without a dedicated stepper driver. Often used for 3D printers and, of more interest to us, in Car instrument displays.
The choice of stepper motors is vast so needs cutting down.
Nema 17 Motors used in 3D printing would provide all the accuracy that we need but are far too large to hide behind a 2.5" dial gauge.
The motor most commonly used with Arduino controllers, by hobbyists, is the 28BYJ48 or the smaller 24BYJ48 driven by a simple H motor driver board. The 28BYJ48 has a stride angle of 5.625°/64 that is each motor step is 5.625° but that is applied to a 64:1 reduction gearbox so the output shaft moves 0.088° per step equivalent to 4096 steps per revolution. Similarly the smaller 24BYJ48 specification is 5.625°/32 or 0.176° per step for 2048 steps per revolution. For more details see this article at microcontrollerslab.com .
The motor of choice for most simple single needle dial gauge is the motor used for the speedometer on most cars, the X25 or X27. This is because it can be driven directly by a 5V microcontroller without the need for a separate driver (but there are plenty of specialist drivers and good reasons to use them). The X25/X27 specification is 180°/180 or 1.0° per native step but it has a maximum resolution of 0.33° when used with partial stepping (3 steps per native step). See https://guy.carpenter.id.au/gaugette/resources/switec/X25_xxx_01_SP_E-1.pdf.
The X25 has one drawback, the motor is so small that the momentum of a fast moving heavy needle can cause the motor to overrun and you can loose position accuracy very quickly. The X25 Switec library counters this by using an acceleration/deceleration profile to loose momentum gradually at either end of a large arc.
??? Do needles need to be counterbalanced or would this make matters worse by adding weight ???
Note: the X25 comes in multiple versions - the most important differences being a) wiring pins mounted top or bottom of motor and b) fitted with or without an internal rotation stop at 315° (but if you do buy the wrong one it is possible to open them up and cut out the stop). You can home the motor by reversing a full 360°rotation into the stop, then just count the subsequent steps to know the needle position.
Dedicated motor drivers, such as the VID6606 a 4 instrument driver, are used to remove program workload from the controller, reduce controller pin count use, simplify board wiring, and smooth (and quieten) the operation of the motor by applying many more partial steps per native step (typically using up to 32 micro-steps per native step).
Controller direct driveCheap but noisy. Uses 4 pins per motor. Cannot use micro-stepping, each pin is on/off and can not apply variable currents .
Generic H Motor Driver - L9110S or ULN2003 - used to drive motors with a higher current demand than can be supplied directly by the controller. These simple drivers do not support micro-stepping, each pin is either on or off and can not apply variable currents .
Step Stick Boards (such as the A4988, TMC2208/9 etc) are designed for CNC machines and drive higher current motors such as the Nema 17's. SSB's reduce pin count usage by using just Step and Direction pins (or UART control). They simplify controller coding, can drive higher current motors (typically 750mA to 1500mA) have support for up to 256 micro steps and TMC's can be serially controlled via UART.
Sparkfun A3967 Easydriver is a variety of stepstick board designed to drive up to 32V 750mA.
VID 6606/8 is designed specifically for Car instrument Clusters. 6606 drives 4 motors, 660 can drive 2 motorsReduces pin count usage by using just Step and Direction pinsSimplifies controller coding(Enables up to 32 micro steps - check).
AX1201728SG is also designed specifically for Car instrument Clusters. see https://guy.carpenter.id.au/gaugette/2017/04/29/switecx25-quad-driver-tests/
I want to create a single dial circuit board that will have the X.25 motor soldered to the reverse and have the controller and motor driver on the front. To fit into a 2.5" gauge the board would need to be about 2" or 5cm diameter. So the controller needs to be a small controller IC rather than an Arduino Nano (which would require stacking 2 boards.
The simplest gauge controller needs to have
3 pins for a single motor Reset, Step, Direction
2 pins for I2C communications with the main board
2 pins for serial debug monitor
Optionally
extra motor controls (Brake Pressure, Altimeter, Horizon)
1 pin for a needle home sensor
1 pin for a switch (Fuel gauge enable)
2 pins for a rotary encoder (altimeter)
1 backlight controller
If I want to keep with the existing Arduino development infrastructure, which I understand, then the simplest solution is the ATTiny family of single chip controllers. These are great little chips, having the core of an Mega328 (Nano), can run at 1.8V to 5.0V, and have an internal clock running at 1 to 20 MHz. The limiting factor of these chips is the Flash program memory space - starting at 4Kb and but rising to the full 32Kb of full Mega328. But as I suspect I will be using a fair bit by the time that you include one or more of the I2C/SPI/Serial libraries. So I would want to go with 16KB or 32KB versions.
AT Tiny 16xx or 32xx via the new UPDI programming - see BitLuni https://www.youtube.com/watch?v=AL9vK_xMt4E
Biggest problem is a) finding stock - In the UK Mouser currently have the 1606 in stock, Farnell the 1616SN and 1626, whilst in Austria caesar_electronic have the 3216 in stock and b) getting stock out of Europe and into the UK without paying a fortune in customs VAT handling.
Stupid fool - thirty minutes after ordering some 1616's from Farnell, whilst looking for some capacitors, I found that last winter I had bought some 1604's to trial and then mis-filed them under components. The only significant difference between the 1616 I ordered and the 1604 I have being the extra 4 pinouts available.
ATtiny1614 is 14 Pin - 9mm by 7mm 1.27mm pitch
ATtiny3216/1616 is 20 Pin - 12.8mm by (7.4)10.3mm 1.27mm pitch
M type packages are very small square chips with solder pads beneath so may be difficult to solder
S type SOIC's have 1.27mm pitch legs
150/300 is the spacing between SOIC's 2 sets of legs
X.27 Dial board: As a dial driver with 5V Regulator, ATTiny, Vid6606 dual driver, plus optionals switch, LEDs, secondary motor connector
Use some R0 short pads to configure ? 1 or 2 motors (or code for 2 and let addressing sort it out ?), base address (+1) if SPI not I2C. The ATTiny 16xx has onboard EEPROM so we can use that to hold the configuration data and write it from the master (default to X'00 address, look for config connection) or just one switch ?
X.27 Dial board: As a secondary driver to a dial driver just uses 4 way - motor connector and possibly LED's no active components required