Amiga Framegrabber. Software version 3. Hardware revision 5. (C)1996 LJS. Check your hardware is up to date!!!!!! Fast Data Aquisition! I will not be held responsible for any damages or injury due to misuse or incorrect construction of this device. Building and use of this device is at the risk of the constructor/user. Shareware. This project and included software is shareware. Registration fee is 10 pounds sterling. This is a small price to pay considering the amount of work and research that has gone into producing this. What you will get. You will get any later versions of the software and details of any modifications/improvements to the hardware. Film etc. Remember you dont know who gets hold of your piccies if you release them. If you are capturing from films etc... 20th sweaty sox or whoever may take offence if you are using their stuff from films and using it to advertise breath mints or something. And then you get fined by the nuts for some junk you dont really care about. I have changed the example file for this exact reason!!!! Included files. You should find in this archive:- 3 IFF schematic files. This file! And the frame grab software. Maybe some examples if I have been bothered to include them. Frame Grabber. I needed a device which would capture a single frame from a video signal. The frame grabber described here has only been tested with the British PAL system. Other PAL systems should work although I don't know about the NTSC system. The SECAM system may also work as this is quite similar to the PAL system. The only thing that would prevent the grabber to work on different systems is the polarity and periodic time of the horizontal and vertical sync. pulses. Also the bandwidth of the input signal to the grabber will affect the results. Operation. The unit when built is simple to operate. A composite video signal is connected to the input of the grabber (get this from the back of your video recorder (Most have a video in/out and audio in/out connector)). Play the video tape you want to grab pictures off and when the picture you want comes up press a nice capture button on the front of the unit. The next video frame will be captured (this process happens very fast). After you have your image captured all you do then is transfer the data (128kbytes worth) into your Amiga. This is done through the parallel port. Then the image is decoded by the frame grab software into a normal IFF picture which you can edit (Print out and make posters for your propaganda, obey me or 'I'll be back' etc..) The parts. You shouldn't have much trouble in obtaining parts for the frame grab. Saying that I have heard that the 74123 is hard to source since it apparently isn't manufactured anymore but I am looking into this. Most parts are standard components (There aren't any weird martian components in it). The only two chips that may cause a problem (apart from handing your hard earned cash over for them) are the 128k memory chip and the Flash A/D converter (They aren't that obscure, most electronics places should have them (Maplins definite in UK)). All the other parts are widely available. Further stuff. I think I will be keeping this project up to date. Speeding things up and improving picture quality, bringing the construction costs down that sort of thing. So you know if you build this thing then you can be sure of further developments on it popping up allover the place. My approach. The grabber is pretty much straight forward. The video signal once inside the grabber is split up into three bits. The unchanged video signal goes directly to the A/D converter. From the video signal the horizontal (H.sync.) and vertical (V.sync.) sync. pulses are split out from the rest of the junk. The H.sync. pulses which occur at the beginning of each TV line are simply stored on bit 7 in the RAM and do nothing else in the circuit. The V.sync. pulse goes to an input of a AND gate. The push button (grab button) simply sets a Flip-Flop after being debounced by another Flip-Flop. When the output from the Grab button flip flop is high AND a V.sync pulse is detected yet another flip flop is set. This last flip flop enables an oscillator which runs at 6.5MHz (In theory a signal should be sampled at twice its maximum frequency so for a video signal the sampling frequency should be 11MHz but in practice you can get away with just over (6.5MHz). If you own a sound sampler you will know you can get acceptable results when you sample at some stupidly low frequency like 8kHz, in theory you should sample audio signals at twice the band width. The band width for audio is 20kHz (Hi-Fi) so you should sample at 40kHz but you don't need to in practice). Boy that was a long bracketed thing wasn't it? The oscillator clocks the A/D converter and a large binary counter (used to address the memory chip). Each sample is stored at a different address in memory. The grabber resets all the flip flops and stops the oscillator when the memory chip is full (It also resets the address counters). The oscillator is infact a free running oscillator, the output is just gated with an AND gate. The data held in the RAM is then ready to be transferred to the Amiga. Big grindy gears! All this thing is, is an electronic 'gear' it slows the video information down to a speed the computer can handle. If you had a computer which could access the parallel port at video speeds you wouldn't need this equipment. BUT your stuck with slow parallel ports so you have to build this *8-( Power supply. The power supply for the main board is 5 volts (surprise surprise). The project includes its own regulation circuit so you can stuff in any voltage between 8 and 35 volts (I think its 35V I cant be bothered searching through data sheets to find the correct value). Supplying the maximum would be stupid, the power regulator would get very hot and probably decide to output the full input voltage, blowing up all your expensive chips. A sensible voltage to stick into the regulator is 8 volts. Personally I wouldn't go for anything above 12 volts though. Saying all that I have designed the power supply bit with a 'crow bar' circuit stuck on its output. If the regulators output voltage should rise above about 5.6 volts it simply shorts out the output, instantly cutting power to the board and blows the safety fuse (good eh?). One of those adaptors you can get from Tandy or other places will do. If you have something like a games console you could throw away the console and use the power supply to power the grabber {8-). An old Spectrum supply or even a Commodore 64 supply would work fine (I didn't like the C64 I had a nice Commodore Plus 4. I also had a plethora of ZX Spectrum's but alas they are all a bit strange now (2 half work in a strange 16k mode!)) Yikes I've only been typing half an hour and look at all the junk I have churned out! Oscillator. The oscillator is a crystal controlled one. Comprising of 3 inverters, 2 resistors, 1 capacitor and the crystal. If you want you could replace the oscillator with a ready built clock module operating at the same frequency as the crystal. This has no benefit only it makes the construction very slightly easier (Saves you soldering 4 components woopee). I haven't tried the module thing so don't blame me if you decide to be lazy and stick one in and it doesn't work. (Anyway what's wrong with my circuit?) Decoupling. The circuit should be well decoupled with capacitors. The capacitors of about 100nF should be soldered directly across the supply pins of the chips. This could be done on the solder side of the board. This simply removes any electrical noise on the supply. When I was building this I went over the top a little with the decoupling but this has no side effects. Construction techniques. There is no PCB yet (and is unlikely to ever be one). It could be built on strip board. Mine is built on general purpose printed circuit board. Thousands of holes with copper pads for each hole on the other side. All the connections are made with solid wire. Telephone extension wire has a rubbish plastic insulator which shrinks like mad when heated! Computer communications cable seems to work best. LAN cable is widely available and comes with quite a few conductors, A meter of this cable should see you through this project with ease. Anyway its up to you to construct in the way you are most comfortable. Box. If a metal box is available use it. I used a box from a bit of old British Telecom equipment I bought from an electronics sale. Although shielding would be recommended I don't know if it has much effect in this project. All I did was back a sheet of aluminium foil in sticky back plastic on both sides and hot glued this to the inside of my plastic box! If you don't want to fork out for a metal box a biscuit tin would work. It may look a bit crudd when you have finished but screening is excellent. If it works for a pirate radio transmitter this project will be no problem! Parts list. Wot u need. IC's 1..74HC04 (OR LS but HC is better ;-) 2..74LS74 1..74123 (NOT LS!) 1..74LS08 (RECOMMEND 74HC08 SEE TEXT) 1..74HC4040 1..74HC4024 1..CA3306 FLASH A/D 1..431000 (85ns CMOS STATIC RAM 128Kbytes or 1Mbit) 1..7805 1..CF106D (THYRISTOR (SCR) SEE TEXT) Discrete components. 6..BC547 2..BC557 2..LED'S 1...75R 14..1K 5...2K2 3...10K 2...470R 4...47K 2...18K 4...4K7 1...33K 1...5K MULTI TURN PRESET 3...10nF 1...68pF 1...560pF 4...100nF 2...1nF 1...15nF 3...220nF 2...10uF 1...22uF 1...1000uF 4...1N4148 (OR 1N914) 1...5V6 500mW ZENER (SEE TEXT) 1...1A FUSE (AND HOLDER) 25 pin male D connector. Board, Box, Phono plugs(Video input) , SPDT pushbutton (2 off) See text stuff: The SCR, Zener, and associated components (shown in dotted box in schematic) can be omitted if you want. These are included to provide a 'crowbar'. Should the 7805 fail due to some weird space ray or something the SCR will switch on, shorting out the supply and blowing the 1A safety fuse. This stops any of your chips being fried (with a nice piece of cod and a tub of peas please!) Dont use a 74LS08 in place of a 74HC08. Some LS's may work but its a bit dodgy. Because I have used two diodes instead of an OR gate the level at the other side of the diodes may not be sufficient enough for the counters to see it a a valid logic level. So use HC. Setting up. After building there is only one piece of setting up to do really. With a volt meter set the voltage at pin 9 of the ADC (CA3306) with the aid of the multi turn pot. to 4 volts. First tests. Assuming you have used sockets for all the chips, before plugging the chips in and powering up do some checks. Check you have approx. 5 volts on the power pins of the IC sockets. This is all you have to check really. Start off by inserting the 74LS04. Power up and check for a fast output at pin 6. Use a logic probe, oscilloscope etc.. If you don't have any of these and can't borrow one (You are advised to borrow one from somewhere) Get a small length of wire and stick it into the socket at pin 6, plug in the 74LS04 and use a short wave radio tuned to 6.5MHz, you should get a noise if the oscillator is working. Failing the radio test:- Ultra simple logic probe. U need (You don't have to build this but if you don't have a logic probe get one or build this) 74HC04 (For low input currents. You could also use 4049) 330 to 470 ohm resistors (you need 2) Red LED and a Green LED Strip board, wire, croc clips, etc.. This will probably look like junk:- 5v |\ | +--------| O---------330R--RLED---+ | |/ | Probe tip <----------| | | |\ |\ | +--------| O---| O---330R--GLED---+ |/ |/ Its sort of simple to follow! When the probe tip is high the red LED will light. When the probe tip is low the green LED will light. Even with nothing connected to the probe you will probably get something lighting up because of floating voltages and junk like that. With a logic probe connected to pin 6 of the 74LS04 both LED's should light and no flicker between them should occur. Next insert the 74LS74 which is connected to the capture switch. At the Q output there should be a logic '1' high. On pressing the switch this should go low. Insert the second 74LS74 the 74LS08, 74HC4040 (CMOS) and the 74HC4024 (CMOS). Power up and test pin 5 of the 2nd 74LS74. Should be low going high and staying there when switch is pressed. Pins 11 and 2 on the CMOS counters (74HC4040 and 74HC4024) should be low. Next apply a video signal from your recorder or the composite video out on the back of your Amiga *8-) On pressing capture switch a short burst of oscillations should be present at 74LS08 pin 6 and also at 74LS08 pin 11 and also at 74LS04 pin 10. After switch press output from CMOS counters should all be low. Press and hold the capture switch. The LED (Not power) should remain lit. On release of the switch it should go out. Plug in other remaining chips. After powering up check all chips especially RAM chip and A/D converter for heat. None should get even warm (Apart maybe for the 74123 which is a TTL device and consumes more juice than the others). If any get warm disconnect power and check wiring! This reminds me of a bit in the ZX Spectrum service manual:- Symptom Action On switch on smoke Disconnect power appears. immediately. Now then. Turn everything off (Amiga and frame grab). Plug in frame grab to parallel port. Switch on monitor, switch on Amiga, switch on FG. If amiga doesn't come on or boot up switch off immediately, check wiring. If it boots up everything must be OK. Check heat on chips again. No conflict should occur between Amiga and FG because of 1K resistors on data bus of FG. Fault finding. Because construction has been left to you this section may not be to helpful. Pressing capture button with a video signal going in can cure some faults Hold the capture button in. The active LED should remain lit. If the active LED just gives a short flash replace the 74??08. If you have used anything but a 74HC08 this chip is suspect, change it for a HC version. Captures OK but loads of noise visible through the software (Display Graph option) Again I have found that the use of anything but a 74HC08 causes random noise and oscillations. Since all the oscillator output goes through the 74HC08 using a LS tends to cause problems. In use. Well you have a composite video signal going in. You watch on a separate TV for the image you want and then press the capture button. It is advisable to press the capture button before the image you want comes up. This captures a picture you don't want but also resets the internal counters of the FG ready for the piccie you do want 8-} Then use the FG software executed from Workbench. Select transfer data. The LED (NOT power) on the FG should begin to flicker or just light up. After a couple of seconds or so, everything stops! Now select Decode and watch the piccie appear before you. Greyscale offset. The picture may be a bit dark or light. Adjust the greyscale offset to adjust brightness etc.. You could also do this with DPaint or something after saving the IFF image. Just play with the colour palette. You can save the RAW video data or load it to/from a file (131072 bytes). You can get the software to display a greyscale for general setting up and stuff like that! Selecting contrast enhance, enhances the contrast! Do this only after decoding the current image and don't adjust the parameters after decoding the image. Obtaining a video signal. On the back of most VCR's is a video out socket, use this. If you have equipment with a scart socket there are video out pins from that. You will have to find out which pins yourself! OK then I'll look up the pins for you. On PERITEL/SCART socket pins for video are as follows: Video out - 19 Video ground - 17 SCART/PERITEL Whatever! The SCART outputs work but with mine I needed to add a variable resistor in parallel with the output to reduce the voltage slightley. Because the input impeidance of the FG is quite high and the output impedance of your video is quite low (75R) there needs to be some matching with the SCART output. Simple video O/P sockets (PHONO) dont give any problems. With 75R on input and 220nF cap added this problem is no more! Frame grab, the next generation! I think I will be changing and messing around with the hardware and software. You can look forward to:- Colour images (coming soon) Higher quality images Double the sampling frequency to about 13.5MHz doing this requires twice as much memory in the FG BUT! instead of buying two RAM chips (bank loan etc..) I will use commonly available SIM's (256K) These are relatively cheap and since they are 9 bit (8-bits and one parity bit) maybe I could go for an 8-bit A/D converter which would give a better colour range and reduce quantization error! Real time stuff! Where the Amiga is constantly downloading info and building an image and the FG is constantly capturing images. So you could watch what was happening on the screen and if you liked a piccie you just click and data transfer stops until you have saved and clicked continue. I don't know about the current software for this (Its a bit slow). And really anything else I can think of to improve it. If you have any ideas or questions don't hesitate to contact me. Lee Atkins 49 Park Lane OSWALDTWISTLE LANCASHIRE ENGLAND BB5 3AF OR E-Mail me at L.A.ATKINS@UCLAN.AC.UK I could type more but I have already done 2510 words and I cant think of anything else to type so I'll shut up now and let you get on with some soldering! Bye. EOF.