I like taking stuff apart, especially stuff with electronics in them, so when I saw an old VCR next to a trash bin in the alley behind our house, I had to take it in. There are obviously quite a few interesting bits inside a VCR, both mechanical and electronic. One of the things I was mostly interested with the VCR was the different electrical motors in it. Altogether there were at least two: one to operate the mechanism to load and unload the video cassette and the so-called capstan, the part that actually pulls the tape. The video drum also seems to have some sort of motor like components (permanent magnets and coils), but I haven’t figured out yet if they actually produce rotations, or if they are used for the reading and recording of the video tracks on the tape.
The capstan motor was placed on its own little module and was therefore very easy to take out. It came with a small PCB with a few surface mount components, most notably a 34-pin QFP. The part number LB1952 identified it as a brushless motor driver specifically for VCR capstans. The datasheet for the device was very easy to find.
The pins on the connector on the board were also nicely labelled so it was fairly easy to identify which of the connector pins connected to which pins on the IC. I only mixed up the two voltage pins. I had falsely assumed that VCC1 would be the controller voltage supply, as it was next to S-GND (=signal ground?), whereas VCC2 would be the output, i.e. motor supply voltage (since it’s next to M-GND =motor ground?). It turned out to be the opposite, which I found out after I measured the voltage at VREF, which if unconnected should show a level of approx. 0.43 x Vcc. Besides the supply voltages, the three important signals are F/R, CONT and LIMIT. F/R specifies the direction of rotation (forward/reverse), so can either be tied to ground or Vcc. CONT is the main speed control voltage, in the range VREF to Vcc. LIMIT is a current limiting control. As mentioned, VREF can be left unconnected. FG seems to connect to the FG-OUT pin on the device, the “FG amplifier output pin”. I have yet to learn what that means and how to use it – it seems to related to some sort of feedback mechanism, so may very well be quite useful. However, for now I left it unconnected.
To control the speed I decided to make use of the Boarduino I had laying around. I still use the default bootloader it came with, but wrote the program for the ATmega328P in AVR Studio to have tighter control over the timing of things. To generate a variable control voltage I used one of the 16-bit capture/compare timer modules to generate a PWM signal. I set the module up for 10-bit “fast-PWM” mode, and have the counter running at the main clock frequency (16Mhz), i.e. without a clock prescaler. I set it up to turn off the timer output pin on compare match and to turn it on when the counter overflows (in this case, reaches the maximum possible with 10 bits). Adjusting the compare value therefore sets the duty-cycle directly. This should give me a main PWM frequency of approximately 15.6kHz (=16MHz/2^10). I implemented a simple 2-pole RC low-pass filter to smooth the voltage. This probably wouldn’t be necessary, as the momentum of the motor itself should act as a filter, but I figured it couldn’t hurt.
For my first tests I connected two push buttons to increase and decrease the duty cycle via the comparator value. I used pin-change interrupts and one of the other timer modules (this time with heavy prescaling and overflow counting) to implement a simple software button bounce algorithm. This had the neat side effect that main() ended up being an empty while(1) loop. I could have probably even put the micro into a sleep mode – I’ll have to look into this.
The whole setup seemed to work quite well, though it was fairly clear that the relationship between the control voltage and the speed isn’t a simple linear one. The next step will be to actually measure the rotational speed with the microcontroller so it can dynamically adjust the control voltage(s) to maintain a set target speed.