This is only a preview of the April 2011 issue of Silicon Chip.
You can view 35 of the 104 pages in the full issue, including the advertisments.
Items relevant to "Portable Headphone Amplifier For MP3 Players":
Items relevant to "Fixing Transformer Buzz In The Class-A Amplifier":
Items relevant to "Cheap’n’Simple 100V Speaker/Line Checker":
Items relevant to "A Speed Controller For Film Projectors":
Items relevant to "The Maximite Computer, Pt.2":
Purchase a printed copy of this issue for $10.00.
Convert your 8mm movies to DVD before it’s too too late! You will need this projector speed controller Do you have old family movies on film? Have you watched them lately? You may be shocked by how much they have deteriorated over the years. They need to be transferred to DVD before the film deteriorates to the point where it is unwatchable. Video conversion is not as straightforward as you might think but this simple project enables you to do it. By JOHN CLARKE I F YOU HAVE OLD family movies stored in some dark spot in the house, they are bound to be rotting away. If you doubt us on this point, better crank up your old projector and have look for yourself. You will be probably be horrified at the visible deterioration. You need to act now so that you can preserve them for posterity. Transfer them to DVD as soon as you can. As a bonus, this will make it easy for you to pass them on to other family members or relatives. You also need to consider that your bulky, old film projectors will not last forever either. Spare lamps and parts are probably now quite expensive 62 Silicon Chip and hard to get. And apart from that, projectors are noisy, not easy to use and not many people are familiar with their operation. So there is no alternative really – you need to convert those movies to DVD before it is too late. Converting to digital There are many commercial enterprises that can restore film and transfer your old films to digital format. Such companies typically use quite sophisticated techniques for film-to-video conversion and these methods are described at http://en.wikipedia.org/ wiki/Telecine For home movies though, getting the job done commercially can be rather expensive. Fortunately, you can do the conversion yourself. It basically involves running the film through a projector and using a video camera to record the on-screen image. The resulting video can then be recorded to DVD via a computer or DVD recorder. If you don’t already have a film projector, then check eBay for a secondhand unit. However, before you leap in, you will need a projector speed controller to get good results, otherwise film speed variations and synchronisation problems will give lots of flicker. Let’s now describe what you need to do. siliconchip.com.au Synchronising To The 25Hz Video Field Rate The Speed Controller PCB carries a PIC microcontroller, three indicator LEDs and four transistors to drive a motorised pot. The shaft of the pot then drives the existing speed control knob on the projector. The set-up for videoing a projected film image is shown in the photo on the facing page. As can be seen, the film is projected onto a screen and the video camera records the image. However, there are a couple of simple tricks to get good results. First, the projector must be placed no more than about 250mm away from the screen, so that the video camera “sees” a bright image. This ensures that the camera operates at a relatively high luminance level for best image contrast and least picture noise. For the screen, good-quality white paper can be used. Note that the recording also needs to be done in a darkened room to ensure optimum contrast. However, it’s not necessary for the room to be completely dark. Our experiments showed that good results can be obtained by setting the video camera to automatic focus and exposure. It may be possible to obtain better results by setting these controls manually in some cases, although this will very much depend on the film quality. If the film exposure varies widely, then a manual exposure setting on the video camera will not be suitable. In our case, we used a Sony Digital 8 Video Camera Recorder which records onto tape. The resulting video signal was then captured on a computer and the titles added using Windows Movie Maker, after which it was burnt to a DVD. siliconchip.com.au Although a film projector may have a frame rate of 16 fps (for example), the film is not projected continuously. Instead, a mechanical shutter blanks out the projection for the period during which the film is progressed from one frame to the next. This frame progression occurs 16 times per second. As a refinement, the shutter also provides film blanking at a faster rate than the frame rate. This provides a higher image repetition rate to reduce image flicker. As an example, a “Noris 8 Synchroner 100” standard-8 film projector (manufactured by Ernst Plank in Nurnberg) has three vanes on the shutter to provide an image rate of 3 x 16 or 48 frames per second. When the projector speed is adjusted to 162/3 frames per second (to lock with a camcorder), the 3-vane shutter provides an image repetition rate of 3 x 162/3 = 50Hz. This will synchronise with the 25Hz video frame rate for the PAL system. By contrast, super-8 projectors which run at 24 fps have a 2-vane shutter and this also provides a frame rate of 48 (ie, 2 x 24) frames per second. In this case, the projector is sped up to 25 fps to again provide a 50Hz rate. The projector speed adjustment can either be done manually or automatically. Manual adjustment is achieved by watching the video recording via the viewfinder and adjusting the projector speed knob to maintain lock, based on the rate of picture fade in and out. As such, it requires constant attention from the operator and quickly becomes tiresome. It is also fraught with other problems. The main problem is that it is not known whether the speed needs to be increased or decreased to reduce the fade-in and fade-out effect. Another problem is that the image will drift out of lock, with fading becoming noticeable, before any correction is made. Even a hint of slow fade-in and fade-out of the picture is quite noticeable in the recorded video. For these reasons, it is far better to have an automatic speed adjustment system. This can then correct the projector speed before any fade-in and fadeout effects can be detected. Of course, many people will now have a more modern camcorder that records directly to digital memory. In that case, it’s simply a matter of copying the file directly to a PC or to a DVD recorder. Avoiding flicker Flicker is the big problem and it is all to do with synchronisation. Basically, the speed of the projector’s motor must be set so that the projected film rate is synchronised with the video field rate of the camcorder. In practice, this means that the projected film frame rate must be a multiple of the video field rate. If this is not done (ie, the film frame rate is not synchronised to the camcorder), the recorded video image will flicker severely The Australian PAL-B video standard specifies a frame rate of 25Hz. In practice, each frame is broken down into two fields for a total of 50 fields per second (see http://en.wikipedia. org/wiki/PAL for more details). By contrast, standard-8 film is recorded at 16 frames per second (fps), while Super-8 films are generally recorded at 18 or 24 frames per sec- ond (refer to http://en.wikipedia.org/ wiki/8_mm_film). To synchronise with the 25Hz video field, the 16 fps for standard-8 film can be sped up slightly to 162/3 fps. This slightly increased speed is not particularly noticeable and gives a frame lock of 1.5 video fields for each film frame (ie, 162/3 x 1.5 = 25). Similarly, an 18 fps projector can be slowed to 162/3 fps to achieve synchronisation, while a 24 fps projector can be sped up slightly to 25 fps. Locking the film and video rates prevents any flicker apart from the normal flicker associated with the film projection and the video field flicker. However, as noted above, the recorded video image will flicker severely if the film frame rate is not synchronised. When the film rate and the video field rate are very close to but out of lock, the recorded video picture will slowly fade in and out of brightness. The further out of lock they are, the faster the flicker. Projector speed controller The automatic speed control described here uses a sensor to monitor April 2011 63 Parts List 1 PCB, code 13104111, 62 x 47mm 1 UB5 box, 83 x 54 x 31mm (optional) 1 motorised potentiometer (Altronics R2000). 1 20MHz crystal (X1) 1 DIP18 IC socket 1 30mm length of 0.7mm tinned copper wire 7 PC stakes Semiconductors 1 PIC16F88-I/P microcontroller programmed with 1310411A. hex (IC1) 1 7805 5V regulator (REG1) 2 BC337 NPN transistors (Q1,Q2) 2 BC327 PNP transistors (Q3,Q4) 1 1N4004 1A diode (D1) 1 photo interrupter (Jaycar ZD1901, Altronics Z1670) 3 3mm red LEDs (LED1-LED3) Capacitors 2 100µF 16V PC electrolytic 1 100nF MKT polyester 1 10nF MKT polyester 2 33pF ceramic Resistors (0.25W, 1%) 1 10kΩ 1 2.2kΩ 6 1kΩ 1 470Ω Miscellaneous Hook-up wire; 2-core shielded cable; aluminium sheet for motor bracket; screws, nuts & spacers the projector’s shutter speed. This is compared to a reference frequency to derive an error signal which then controls a motorised potentiometer attached to the projector. The shaft of this motorised pot drives the projector’s original speed control. Any variation in the shutter speed from lock is corrected by driving the motor in one direction or the other, to rotate the projector’s speed control knob. A photo-interrupter is used as the detector and this is installed so that the shutter’s blades pass through its slot. When the projector’s speed is correct, the signal from the photo-interrupter will be at 50Hz. 64 Silicon Chip Checking The Projector & Correcting Pitch Standard-8 film projectors are now vintage machines and will require checking to ensure that they are safe to use. In particular, check that the mains lead is safe and that the projector body is correctly earthed (you should get a zero ohms reading between the earth pin of the main plug and the projector’s metal frame). The projector depicted in this article had been left unused for quite some time and initially operated for several minutes when fired up. An small explosion somewhere within its workings then destroyed the lamp switch. It didn’t take long to spot the problem – the suppression capacitor across the mains supply had exploded. A 275VAC X2 MKP capacitor was used as a replacement but the prob- If the photo-interrupter does not receive any signal (eg, when the projector is switched off to change the film reel), the Speed Controller immediately stops driving the motorised pot. This ensures that the projector’s speed will be close to the lock speed when it is switched on again. Speed control pot As indicated, a motorised potentiometer is used to drive to the existing speed control knob fitted to the projector. Before fitting it, this motorised pot must be modified by removing its resistive element. This is done so that the shaft can rotate fully through 360°, ie, without the normal 270° end stops. This means that the motorised potentiometer no longer functions as a potentiometer. Instead, we are using it purely as a motor (along with the pot shaft) to drive the projector’s existing speed control knob. Circuit details Take a look now at Fig.1 for the circuit details of the Projector Speed Controller. In addition to the photointerruptor, it includes a microcontroller (IC1), some indicator LEDs and four transistors (Q1-Q4) to drive the pot motor in either direction. Microcontroller IC1 operates at 20MHz, as set by crystal X1. This ensures that the projector’s frame rate is lem could have been averted if this capacitor had been changed earlier. Note that standard-8 film did not include sound. With super-8 there may be sound included but the audio recording will no longer be at the correct speed when the projector speed is locked to the video field rate. As a result, the pitch will be altered. If this is a problem, the pitch can be corrected using Audacity (http://audacity.sourceforge.net/download/) or similar sound recording software, so that the sound appears more natural. Make sure that the file length is not altered when doing any adjustments though, otherwise the sound will be longer be in sync with the picture. The processed sound file can be re-synced with the picture at the start of the DVD burning process. measured with sufficient accuracy for locking against the PAL 25Hz frame rate. The photo-interrupter comprises an infrared LED and phototransistor mounted in a slotted enclosure. When IR light from the LED passes between the shutter blades, the phototransistor is biased on and the voltage at its collector is close to 0V. Conversely, when light from the IR LED is blocked by the shutter, the phototransistor turns off and its collector is pulled to +5V via a 10kΩ pull-up resistor. IC1’s RB0 input (pin 6) monitors the photo-interrupter signal. In operation, IC1 counts a 625kHz signal (derived from the 20MHz crystal oscillator) between every fourth rising edge voltage at RB0. As previously stated, a 16 fps projector needs to be sped up to 162/3 fps. Assuming a 3-blade shutter, this will result in a 50Hz signal from the photointerruptor. As a result, successive fourth rising edges will be 80ms apart and the 625kHz count will be 50,000. If the count is greater than this, the projector’s shutter rate is slower than 50Hz. Conversely, if the count is less than 50,000, the rate is faster than 50Hz. As a result, IC1 drives the motor in one direction or the other via transistors Q1-Q4. This either speeds up the projector if the count is greater than 50,000 or slows it down if the siliconchip.com.au D1 1N4004 + A REG1 7805 K 9–12V DC INPUT GND 100 F 16V – +5V OUT IN 100 F 16V +5V 100nF 1k 4 14 10k 470 RB4 PROJECTOR'S SHUTTER 1k A PHOTOINTERRUPTER 6 E E Q4 Q3 BC327 BC327 C 10nF C B RB0 B MOTOR E K +5V 1k 10 IC1 PIC16F8811 I/P RB5 C 1k Vdd 13 RB7 MCLR RB6 1k 1k 12 1 2 RA3 3 RA4 C B E Q1 BC337 Q2 BC337 C B E RA2 A K 16 E C X1 20MHz 33pF OSC1 A FAST LED1 15 33pF K OSC2 Vss 5 LOCK SLOW A LED2 A K LED3 BC327, BC337 LEDS K B K A 2.2k E C 7805 SC 2011 PROJECTOR SPEED CONTROLler 1N4004 A K GND IN GND OUT Fig.1: a photo-interuptor and a PIC microcontroller are used to sense the speed of the projector’s rotating shutter blades. IC1 then compares this speed to a reference frequency and drives a pot motor via transistors Q1-Q4. count is less than 50,000. Counts within two of 50,000 (ie, between 50,002 and 49,998) are regarded as being in lock, so drive to the motor ceases. When this happens, the Lock LED (LED2) lights. By contrast, counts within 319 of 50,000 result in the motor being driven slowly with short pulses to adjust the projector’s speed. In this case, the Lock LED lights along with either the Fast or Slow LEDs (LEDs1 & 3), depending on whether the projector speed is too fast or too slow. This indicates that the projector is being adjusted for speed but is close to the lock condition. Finally, for counts greater than 319 either side of 50,000, the motor is driven at full speed and either the Fast or Slow LED is lit. The Lock LED is off during this time and remains off until the count gets to within 319 of 50,000. It’s much the same for super-8 film shot at 24 fps. In this case, the prosiliconchip.com.au jector speed must be increased to 25 fps but unlike standard-8 projectors, super-8 projectors invariably employ a 2-blade shutter. This again means that the shutter blade frequency of 50Hz is necessary to achieve lock, so a count of 50,000 is necessary just as it is for 16 fps projectors. Similarly, if an 18 fps (3-blade) projector is slowed to 162/3 fps, we again need a 50Hz shutter blade frequency (and a 50,000 count) to achieve lock. As a result, we can use exactly the same firmware in IC1 for all three cases. There’s no need to change the firmware to suit individual projectors. Driving the pot motor IC1’s outputs appear at RB7, RB4, RB5 & RB6 and these drive the motor in one direction or the other via transistors Q1-Q4 which are arranged in an H-bridge configuration. Q1 & Q4 are switched on to drive the motor in one direction, while Q2 and Q3 drive the motor in the other direction. The motor is off when all the transistors are off, ie, with RB5 & RB6 both low and RB4 & RB7 both high. A 10nF capacitor suppresses any spikes across the motor terminals. Power for the circuit is derived from a 9-12V DC supply rated at 100mA (eg, a 9V or 12V DC plugpack). Diode D1 provides reverse polarity protection, while REG1 provides a regulated 5V supply for the circuit. Construction All the parts except for the photointerruptor and motor are mounted on a PCB coded 13104111 and measuring 62 x 47mm. This can either be housed in the same UB5 utility box that’s used to support the motorised pot or it can be mounted inside the projector. Fig.2 shows the parts layout on the PCB. Check the PCB carefully for any April 2011 65 33pF 1k 10nF 1k A SHIELDED TWO-CORE CABLE LED3 LED1 LED2 E,K K 2.2k 1k IC1 PIC16F88 A C BC327 BC327 X1 100nF Q4 Q1 BC337 TO POT. MOTOR M 1k D1 + 10k – Q3 1k 33pF 100 F + 470 9–12V DC POWER 100 F 11140131 REG1 Q2 BC337 1k L ORT N O C DEEPS R OT CEJ ORP C A E+K TO PHOTO INTERRUPTOR Fig.2: follow this diagram to assemble the PCB. Note that two different transistor types are used for Q1-Q4. defects, then check that the corner holes are drilled to 3mm. Seven PC stakes are used for all the external wiring connections and their holes should all be 1mm. Begin the assembly by installing the single wire link (adjacent to REG1), then install the resistors. Check each resistor using a DMM before installing it – don’t just rely on the colour codes as some colours can be difficult to read. Diode D1 is next on the list and this must be orientated as shown. That The PCB should take no more than about 30 minutes to assemble. Take care with component orientation. done, install the capacitors, crystal X1, the IC socket and the PC stakes. Make sure that the electrolytics go in the right way around. Regulator REG1, transistors Q1-Q4 and the three LEDs can now go in. These parts must all be orientated correctly. Take care not to get the transistors mixed up – Q1 & Q2 are both BC337 (NPN) devices while Q3 & Q4 are both BC327s (PNP). Note that if you intend mounting the PCB in the UB5 box, then the electrolytic capacitors and REG1 will need to be bent over to clear the lid. In particular, REG1 would have to be mounted with its leads bent at right angles, so that it lies over the adjacent capacitors. On the other hand, if the PCB is to be mounted within the projector, this should not be necessary and the parts can be mounted as shown in the photos. In our case, we mounted the PCB inside the projector case on 15mm stand-offs and there was plenty The photo-interrupter, Speed Controller board and power socket are mounted inside the projector case. The PCB is secured on two 15mm tapped Nylon spacers using machine screws. Alternatively, the PCB can be mounted inside the case that’s used to mount the motorised pot. 66 Silicon Chip siliconchip.com.au The fast (F), lock (L) and slow (S) LEDs protrude through holes drilled in the projector housing, while the power socket for the speed controller board was fitted to an existing square cut-out. of room for REG1 and the electrolytic capacitors. Be sure to install REG1 with its metal tab towards the adjacent 33pF capacitor. The three LEDs can all be mounted at full lead length, so that their tops either protrude through the projector casing or through the lid of the box. Take care with their orientation – the anode is the longer of the two. The motorised pot is mounted so that its shaft drives the projector’s existing speed control knob. Note that the resistive element and end-stops in the pot housing must be removed – see text. Modifying the motorised pot The next step is to remove the resistive element and the end stops inside the motorised pot. That’s done by first bending out the metal tabs that hold the housing together. Once the element has been removed, the housing can be reassembled. As shown in the photos, the speed control knob on our projector has in- siliconchip.com.au The shutter blades in the projector rotate, increasing the apparent frame rate and blocking the light through the lens as each film frame is progressed. This close-up view shows the photointeruptor. It must be accurately positioned, so that the shutter blades pass through its slotted opening. April 2011 67 Avoiding Flicker: Why Film Frame & Video Field Lock Is Necessary A PROJECTED film image is presented as a series of still images (or frames) on the screen. These individual frames are interrupted by blanked-out intervals, where light from the projector lamp is blocked from passing through the film and the lens. The blanking intervals hide the progression of the film from one frame to the next. This is necessary because during projection, each frame is held stationary for a short period and then progressed to the next frame. Additional blanked-out intervals are included to increase the effective projection rate. This results in the perception that the images are continuous due to persistence of vision of the eye. Each film blanking period is about 10% of the frame period and This photo shows how the projector and video camera are set up. The film is projected onto a small screen about 250mm away, while the video camera is positioned alongside the projector to record the images. The projector and the camcorder should each be angled so that they cancel out trapezoidal distortion. 68 Silicon Chip together they account for 30% of the overall frame period. When the projected film image is copied using a video camera, the camera effectively takes photos of the image as a series of still fields at a 50Hz rate. This gives a video frame rate of 25Hz, ie, there are two fields to a frame. Therefore, if the film frame rate is set at 162/3 fps, each 25Hz video frame will contain two thirds of a film frame. This in turn means that each second and third video frame will show a different portion of the film frame (or frames). This cycle repeats every three video frames or after exactly two film frames. As a result, the film frame rate and video frame (and field) rates can be considered to be in lock. Fig.3 depicts the film frames and video frames side-by-side, to illustrate how the video camera records the film. The film blanking periods and the video vertical blanking intervals are both shown to scale. During film blanking, a black screen is presented to the video camera. Conversely, when there is no film blanking, the camera “sees” the projected image. Each video frame comprises two separate interlaced fields with a blanking interval between them. That is why a blanking period is shown at the beginning and in the middle of the video frame. No film image is recorded during the video vertical blanking periods. Fig.3(a). shows two separate film frames (Film Frame 1 and Film Frame 2) against three video frames (Video Frame 1, Video Frame 2 and Video Frame 3). This is when the two are in lock. As can be seen, when the film frames and video fields are in lock, the end of Video Frame 3 lines up with the end of the Film Frame 2. Successive film frames will therefore remain synchronised with successive video fields. Note that this video recording technique assumes that the differences between Film Frame 1 and Film Frame 2 are minimal, otherwise Video Frame 2 will be blurred. Fig.3(a) shows Video Frame 1 starting at the same time as Film Frame 1. This ensures that each video frame occurs within a full film exposure period. In other words, video field blanking occurs only during the film frame blanking periods. Fig.3(b) shows what happens to the synchronisation if Video Frame 1 starts after Film Frame 1 begins. In this case, video field vertical blanking occurs within the film frame exposure period. This results in a slightly reduced average light level exposure for the video picture. In practice, this means that each video frame in Fig.3(b) will operate for 62% of the film frame period compared to 70% for Fig.3(a). However, provided that the film and video remain in lock, there will no variations in this average level over time. These 70% and 62% figures represent the highest and lowest exposure periods that can be obtained when randomly starting the projector and dentations around the rim and these match the flutes on the motorised pot shaft. The motor/gearbox assembly are mounted on a plastic case using aluminium brackets and the case is then fastened to the side of the projector so that the shaft mates with the speed control knob. If you have a motorised pot with a smooth (ie, non-fluted) shaft, try fitting it with a rubber sheath. This should then provide sufficient friction to drive the projector’s speed control knob. A suitable rubber sheath can be obtained from the cable grip section inside a 3-6mm diameter IP68 cable gland. Alternatively, try fitting some rubber tubing (preferably ribbed) over the pot shaft. Wiring it up The photo-interrupter is mounted inside the projector and is positioned so that the shutter vanes pass through its slot. It’s then connected to the PCB via twin-core shielded cable. Note that both the cathode (K) and emitter (E) leads of the photo-interrupter are connected to the shield wire – see Fig.2. The pot motor can be connected using medium-duty hook-up wire. You will have to experiment with the siliconchip.com.au A the camera. This random starting nearly always means that the video fields and film frames are not synchronised to start precisely together. Doing that would be difficult with a mechanically-operated projector and is in any case unnecessary because the exposure periods do not differ much between the two extremes. Note that when the film and video are in lock, each video frame has the same duration of exposed film and the same duration of blanking – see Fig.3(a). If the film frame rate changes slightly so that it is no longer locked against the video field rate, then each video frame will begin to receive varying amounts of film frame (ie, the exposure alters). The video frame can now include the film’s own vertical blanking period as shown in Fig.3(b), while at other times the blanking will not affect the exposure level as in Fig.3(a). This exposure level variation becomes worse as the film frame drifts further from video field lock. Fig.3(c) shows what happens with a film frame rate of 14.5 fps, while Fig.3(d) shows what happens at 18.5 fps For Fig.3(c), Video Frame 1 is fully exposed to Film Frame 1 and the video field blanking coincides with the film blanking. There is also only one film frame blanking period during this video frame. By contrast, Video Frame 2 has one of its own vertical blanking periods occurring within the film exposure period plus two film frame blanking periods. By the time Video Frame 4 occurs, just when the sequence should repeat, there are two video blanking periods polarity until it operates correctly. If the polarity is incorrect, the motor will run continuously and set the projector to either its fastest or slowest speed. At that point, the clutch will slip but the pot motor will continue running. Conversely, when the polarity is correct, the motor will run to maintain the projector’s speed so that it remains in lock. In practice, the motor will be continuously moving back and forth as it endeavours to maintain a constant speed from an imprecise projector mechanism. That’s it – you are now ready to SC transfer your films to DVDs. siliconchip.com.au Film Frame 2 Film Frame 1 Film blanking (30%) Video vertical blanking (1.6ms) Field 1(a) Field 1(b) Video Frame 1 Video Frame 2 B Film Frame 2 Film Frame 1 Video Frame 1 C Video Frame 2 D Film Frame 1 Video Frame 1 Film Frame 3 Video Frame 3 Film Frame 2 Film Frame 1 Video Frame 1 Video Frame 3 Video Frame 2 Video Frame 3 Film Frame 2 Video Frame 2 Video Frame 3 Film Frame 3 Video Frame 4 Film Frame 3 Video Frame 4 Fig.3: the effect of different film and video frame rates. In Fig.3(a) and Fig.3(b) they are in lock. Fig.3(c) shows what happens when the film frame rate is too slow while Fig.3(d) shows what happens when it is too fast. within the film frame exposure period plus two film blanking periods as well. As a result, the video frames are no longer matched as they are in Fig.3(a) and Fig.3(b). A similar effect occurs in Fig.3(d) where the projector frame rate is too fast. In summary, if the video frame and film frame rates are out of sync, then the amount of the film frame captured in each successive video frame varies continuously. In addition, there will be variations in the locations of the film blanking periods and these can be captured in the video fields. This will cause variations in the average brightness of successive video fields and cause a very noticeable flicker. This photo-interrupter must be positioned to align with the shutter blades when the case is closed (ie, the shutter blades must pass through its slots). April 2011 69