## Flying Volt Meter

Moving on from my three phase BLDC motor project I've been developing some interesting uses for such motors and their controllers. In this project I'll demonstrate how I've used the flying head drum from a VHS video cassette recorder to help me make a rotary volt meter. The volt meter relies on persistence of vision in order to create an apparent image of an arc whose length can be changed by an input voltage. The relative position of the arc around the circle can be altered by a separate voltage input as you will see later on.

The idea here is to have an LED stuck to the edge of a quickly rotating disk such that when it is illuminated there appears to be a solid loop of light on observation. If said LED were to be pulsed at the same rate (or some multiple) of the motor speed, then a stable pattern would appear. The length of the trace is adjusted by how long the LED is on for each rotation. The position of the trace about the circle can also be altered by delaying the start of the trace. By delaying the start and stop one has complete control over when it starts and when it ends. Providing the motor spins at a constant speed, the positions will be clearly defined by the start and stop delay times. If the motor speed should change, then the relationship between time and arc length changes too. I may add a circuit that compensates for this but for now it's best just to keep the motor at one speed.

Check out these videos for a working example of what I'm doing:

As you can see the effect is very vivid and fluid. The limitation on how fast the arc's length can change while still keeping the appearance smooth is the motor speed. The faster this rotates, the faster the arc can change length while remaining smooth. If you alter the length or position too fast you end up with aliasing effects and the result looks choppy or heavily aliased. (This is like digitally sampling audio which contains frequencies higher than 1/2 the sampling frequency.)

On we move to how this works. Firstly, once we have a spinning motor and some signal indicating the speed of the motor we need a circuit which will generate the proper timing to light the LED in sequence with the motor's rotation and allow us to control the light time with an input voltage. Shown below is such a circuit which creates both a delay for the start of the trace and another for the end of the trace.

Click for full size.

If you look closely you can see 1µF capacitors which are discharged by 2N3904 transistors every time they receive a pulse to their base. The capacitors are charged by the 2N3906 current mirrors attached to them at the top of the schematic. The inputs of the current mirrors are 47k resistors and 50k potentiometers. These current mirrors pass a nearly constant current whose magnitude is adjustable with the 50k pots. The constant current charges the capacitors at a constant rate and thus a ramp generator is formed. What happens then is the voltage is steadily increasing at a certain rate for both of those timing capacitors until they are discharged by the incoming timing pulses.

The first timing circuit receives its discharge pulse from the motor SYNC signal; I'll show how we generate SYNC later on. The important thing is that every time the motor rotates one turn, the capacitor is discharged to reset our timing circuit. Notice that the first timing capacitor has a comparator connected to it. The comparator's job is to compare the voltage across the capacitor to a reference voltage which is set by the Vstart terminal. As the capacitor charges past the Vstart threshold, the output of the comparator will transition high and send a pulse to discharge the timing capacitor of the next timing circuit. (Note that I'm using the comparator's output in an unusual way: the output is stuck to 5V+ and the "ground" pin is being used as the output. This essentially makes the output inverted since the comparator's output actually looks like a transistor across from pin 7 to pin 1. The transistor is floating so you can reference it to whatever you like within the voltage supply of the comparator.) Obviously by varying Vstart we can change the amount of delay before the second timer is reset after each motor SYNC pulse. This Vstart voltage thus controls the beginning of our trace because the LED DRIVER output will go high whenever the second timing capacitor is below the Vstop threshold.

The second timing circuit works just like the first one except I'm using its comparator's output in the normal way. Pin 1 is grounded and the output is pulled high with a 470ohm resistor. Every time the second timing capacitor is reset it starts charging steadily from zero volts until it passes the threshold set by Vstop. As it passes this threshold the ouptut of the second comparator will go low, turning off the LED on the spinning drum.

If you've managed to follow this complex operation you can see that Vstart tells the circuit how long to wait after the motor completes a revolution before turning on the LED and Vstop says when to stop the illumination once it's been started. Thus Vstart begins the trace at some point  in the motor's rotation and Vstop stops it.

Once the motor is spinning you can apply various waveforms to the Vstart and Vstop terminals and watch the trace move around or expand accordingly. The circuit is designed to accept an input voltage from 0V to 5V. The 50k potentiometers were included so you can adjust 5V to be equivalent to 360° of motor rotation. This makes it so that for Vstop 0V makes no trace, 2.5V makes half a trace, 5V makes a full trace, and so on. The same applies for the Vstart: set the potentiometer so that 5V Vstart rotates the beginning of the trace 360° from 0V Vstart.

The 47k resistor and 50k pot on each current mirror for each timing circuit were selected based on a motor which spins at approximately 2700RPM. If the motor is to be operated at vastly different speed then the adjustment range of the potentiometer may not be enough to accommodate this. For example, if the motor were to rotate at 8000RPM then the capacitors would need to charge to 5V in 7.5ms. The 2700RPM motor only needed a 22.2ms charge time and so you can see that a much higher charge current is necessary to get the capacitors to 5V in time. To figure out the period of the motor's rotation is very simple: take RPM/60=RPS(rotations per second). Take 1/RPS to get the period of the rotation in seconds. Now you know how many seconds (milliseconds in this case) it takes for the motor to complete a full revolution.

The formula for calculating charge current is based on the well known capacitor formula: I = CdV/dt. This differential equation defines how much current in Amperes is required to charge a certain capacitance in Farads to a certain voltage in Volts within a certain length of time in Seconds.

For our 8000RPM example we want to charge 1µF to 5V in 7.5ms. That's .000001F, 5V, and .0075s. If we plug in those values we end up with I = .000001 * 5 / .0075 = .0006667. That means we need 666.7µA to charge the capacitor in time. From this we can use ohm's law to calculate the correct resistor value for the combined potentiometer and limiting resistor. The voltage across these resistors is equal to 12V minus whatever is used up by the current mirror which is about 0.650 (one diode drop).

Ohm's law says that R = V/I: resistance is equal to voltage divided by current. We know we have 12-0.65V=11.35V to drop across the resistor. Since the amount of current to charge the cap is 666.7µA we can plug these numbers in and get R = 11.35/.0006667 = 17.02k. The sum of the pot and limiting resistor resistances should be equal to this value when the pot is rotated mid-way. The reason for this is so that the pot can be used to calibrate our circuit above and below the design-center value to account for errors in the entire system. If we set the pot to be half of the total resistance when it's rotated half way then it will have to be a 17.02kohm pot. It's easier to find a 20kohm potentiometer so we'll use that instead. Then pick a limiting resistor half the total value: 17k/2 = 8.5k. Since 8.5k resistors are very uncommon, we'll settle for 8.2k which is a standard value. Now we have a circuit which is set up properly for an 8000RPM motor.

This document assumes that we already have a motor and LEDs attached to it, a circuit to drive said LEDs, and a way of telling how fast the motor is turning. If you're doing this as a project then it will help to have information on how to set these essential items up to work with my timing generator circuit described above. Shortly I will add another page to this series so you can see how I developed the circuitry to generate a timing (SYNC) signal from my motor and how I powered the LEDs which are attached to the motor.