Copyright (C) 1986-2009 by Daniel H. Hudgins, All Rights Reserved.
No part of "This Web Site" (HTML document), including associated files, may be: distributed, sublicensed, transmitted, copied, archived, mirrored, modified, bundled, embedded, sold, given away, rented, loaned, or shared in any form without express written permission in a formal Vendor agreement contract dated and signed in ink obtained directly from Daniel H. Hudgins by registered postal mail. All agreements for permission to distribute expire after a period no greater than one year from the date of the signing of the agreement by Daniel H. Hudgins. See the current "EULA" for information regarding limited copying and storage for the purpose of "Beta Testing" "This Web Site."
To view or use the current version of this Web page you may need to reload or refresh the display of this page by your browser. Just clicking on the browser's [Reload] or [Refresh] icon may not be enough to insure that all of the page's most current contents have been cached and displayed. Some browsers may have additional commands to help display the page's most current contents such as: holding down the [Shift] key and clicking on the [Reload] icon, holding down the [Control] key and clicking on the [Refresh] icon, holding down the [Control] and [Shift] keys and clicking on the [Refresh] icon, pressing the [Control] and [F5] keys, pressing [Control] and the [R] key, or some other combination of keys or clicks. Check to see which commands your HTML browser uses to load the most current page contents into its cache and then to display them onto the screen.
This Web site is dedicated to the thousands of "users" of my programs, those who have helped test my programs over the last 23 or so years, and especially those who shared their experiences with me.
You must read this notice: This is a licensed Web site (HTML document and associated files). You must read and agree to be legally bound in contract by the Terms of Use and conditions given in the End User License Agreement ("EULA"), Legal Notices, Instructions, Warnings, Disclaimers, and all other text in "SECTION: 0" of "This Web Site" (HTML document and associated files) before reading or using any of the information, software programs, and or files, contained in, linked to, and or associated with, "This Web Site" (HTML document and associated files). Any use or "Beta Testing" of "This Web Site" constitutes your acknowledgment of your full agreement with the current End User License Agreement ("EULA") and your decision to have this current license supersede all prior and contemporaneous agreements and understandings. Information and files in "This Web Site" (HTML document and associated files) have been placed here so that long time users of "The Author's" programs DANCAD3D.COM (tm) , DANCAD87.EXE (tm), DANCINEL.EXE (tm), DANCINES.EXE (tm) , DANCAM.EXE (tm) , or DANPLOT.EXE (tm) could help proofread the text of the documentation files or screens displayed, and also help test data files, example files, and or any software programs that might be made available from time to time, to aid "The Author" in finding mistakes, bugs, and other errors, omissions, defects, mistakes, and faults. Everything in "This Web Site" (HTML document and associated files) is "Beta Test", "Beta Code", Experimental, Preliminary, requires proofreading, or is being evaluated for possible revision, and is NOT warranted to be free of defect. To help "The Author" report any bugs, foul-ups, defects, or mistakes that you find, see "SECTION: 8" for instructions. "This Web Site" (HTML document and associated files) and all other files and programs by Daniel H. Hudgins are made available "AS IS" without warranty of any kind express, expressed, or implied. All offers and specifications are subject to change or discontinuation without notice of any kind. Please look over "SECTION: 8" of "This Web Site" before contacting "The Author."
SECTION: 5.22 is for some information and illustrations relating to the ANIMATE commands and circuits for use with it.
The use of circuits with the ANIMATE command is experimental, and information relating to such is subject to change or revision without notice. Information in this section may not apply to the program revision you are currently "Beta Testing".
The SYNC1 circuit is described here so that "Beta Testers" of the revised ANIMATE command can try to "Beta Test" the sync sound trigger options. This circuit makes direct connection to the computer's Parallel Port, so you should not use or experiment with this SYNC1 circuit unless you are willing to accept the possibility that you might damage your computer, your mother board, and or your Parallel Port card. To perhaps reduce some of the risk to your mother board, you may wish to add an extra Parallel Port, i.e. LPT2 or LPT3, with a Parallel Port PCI slot card so that if that port gets damaged, all you may just need to replace is that port card. It is possible to use Opto-isolators on the Parallel Port inputs and outputs, but my experience with my CAM programs using the Parallel Port has not yet convinced me that the risk is sufficiently great to justify the extra cost, in some instances. You need to decide how much risk, if any, you wish to take with damaging your computer. I will not be liable in any way for any damage or loss resulting from your trying to use this circuit, and will not pay for anything associated with such damage or loss. You should verify any connections you are making with independent sources of reliable information and not relay solely on information contained here, as information contained here may contain mistakes, errors, and omissions, which should be immediately reported to the author.
This SYNC1 circuit converts the Analog audio beep signal from the sound track to your Pixel frame sequence into a TTL digital signal that can be input to your computer through its Parallel Port.
The ANIMATE command can then be triggered to sync on one or more beep tones in the audio track. The WAV LINK command Mode 3 can be used to make beep tones at the start of each shot that are twice as loud as the audio, allowing the SYNC1 circuit to better discriminate between the beep tone and the audio content.
If just a start trigger is needed, the sound in your audio track before the clapper board slap can be zeroed (made silent rather than cut out) in your audio editing software so that the first sound played will be the clapper board slap which can be used to sync the display of the Pixel frame sequence and the audio track.
The audio track should be played from a crystal sync source other than the computer used to display the Pixel frame sequence since the heavy computer processing needed to display the frames, and audio, may result in glitching. You can play the audio WAV file from another computer, or burn it to a CR-R-R/W and play it from a CD player. You could also record the audio track on a HI-FI VHS recorder, or MiniDisk (tm) and play the audio track from there, but never try to record and then play the audio on a non-crystal sync recorder such as a cassette or reel-to- reel tape recorder.
Even though both the audio track and Pixel frames are governed by crystal sync sources, the images and sound will drift out of sync over time, unless you use the re-sync option in ANIMATE. Just how long it will be before the sync drifts more than one frame if you just use a head beep as the sync start will vary depending on the equipment you are using, the temperature and other factors. Generally one minute should work most of the time, and most of the time you would be out one or more frames after ten minutes, but where between one and ten minutes the sync will drift enough to become noticeable can be hard to predict. If you use the automatic re-sync at an interval of every five to fifteen seconds then you may be able to play long frame sets with sync sound.
To have the sync work well the Pixel frame files need to be small enough to load at a free running rate (see ANIMATE Mode 1 to find the maximum free running rate, see the inter-frame delay to zero and time a section of known length with a stop-watch it should run more than twice as fast) of about twice the desired crystal sync running rate. The harddisk may be the "bottle neck" on your system. A computer 2.8GHz with a 7200RPM harddisk with a 8MB buffer may be the minimum system requirement for displaying frames in sync with sound, but you can check your system to see how many lost frames you get while playing, press [W] in ANIMATE command Mode 2 to turn on the lost frame read-out.
If you are using DOS there may be issues With accessing large file sets quickly. The Divided numbered file set format can be used to partly compensate for this issue by limiting the number of Pixel frame files in each sub-directory to 1000. The Divided numbered name format automatically creates extra sub-directories as more numbered files are generated thereby dividing the file set into separate sub-directories of a thousand files each. When running in a Windows 98SE (tm) type DOS window the file access rate may seem better than if you have Windows 98SE reboot into exclusive single program DOS mode.
This SYNC1 is only intended for use in "Beta Testing" the ANIMATE command in my CAD programs, use for other purposes is not granted. You are not granted permission to manufacture and sell this circuit.
The schematic shown varies slightly from my prototype circuit in the photos below in that I have replaced the single trim pot with two fixed resistors and a lower value trim pot to increase the useful range of the trim pot. If you have problems getting the circuit to work in connection with your "Beta Testing" of the ANIMATE command, contact be through support channels and let me know what you have observed.
PARTS LIST FOR SYNC1 (tm) CIRCUIT R1,R2............... 10K ohm 0.25 watt 5% resistor. R3,R4............... 100K ohm 0.25 watt 5% resistor. R5,R6............... 4.7K ohm 0.25 watt 5% resistor. R7.................. 2.2K ohm 0.25 watt 5% resistor. R8.................. 1K ohm 0.25 watt 10% trim pot or 10 turn panel pot. C1,C2,C3............ 0.1uf 50 volt ceramic disk capacitor. C4.................. 100pf 50 volt ceramic disk capacitor. C5.................. 100uf 25 volt electrolytic capacitor. D1.................. LED high brightness clear red. U1.................. LM393N 8 pin Dual Comparator IC and 8 pin socket.
Do not substitute Plastic or other film capacitors for the ceramic disk type specified. In addition to the parts in the list you would probably want to mount the circuit on a small perforated circuit board and add connectors for the signal and power supply. You would also need a 25 pin connector to connect to the computer, or cut an old printer cable in half. The power supply should be able to be three 1.5v dry cells in series or an isolated 5v regulated wall transformer. The five volt supply must be isolated since it will directly connect to the computer through the Parallel Port. It is possible to damage your computer's Parallel Port and Mother board by making connections to the Parallel Port, if that would bother you then you should not use this circuit. Usually such damage would occur if the power supply was not isolated, the circuit was not wired properly, the power supply became over voltage, there was be brief short or open circuit, or something else happened that exceeded the limits of the Parallel Port signal limits.
To adjust the circuit or operation, first with no signal at the audio input of SYNC1 adjust the trim pot to be near, or slightly off, center until the LED lights up, then turn the trim pot a little back and forth to and from center so that the LED just stays off. Next set the play volume to line level 0db VU or about 1.228 volts RMS and play your audio track, the LED should blink strongly when your track beeps and blink not at all or less strongly during very loud audio such as music and talking. If you have processed your audio track with the WAV LINK command Mode 3 the adjustment of the trim pot is more critical, you need to have the LED on during the beeps and off during the audio track sounds. A ten turn pot may be helpful in getting the critical adjustment set better. When no signal or low audio (audio signal less than about -12db VU) is present the LED should stay completely off.
The input of the SYNC1 circuit is HiZ, about 10K ohm, so it should work with the Line out on sound boards, CD players, and other audio line level sources, you can check the output impedance of the audio source, the output impedance should be less than 10K ohm for it not to be over loaded. Many professional audio sources line out are less than 10K ohm, in some cases 600 ohms. Impedance matching does not need to be exact, just that the source is lower than the load. The SYNC1 input is AC coupled, and unbalanced with one side grounded. The signal feed into SYNC1 should be between about 0.7 to 1.0 volts AC RMS. Do not exceed about 2.5 volts peak-to-peak since the supply is only 5 volts and you do not want to drive the input of the LM393N negative to ground.
The trim pot can be adjusted above or below its mid point, that will change if it trips on the top or bottom of the audio wave form. You want the wiper of the trim pot as close to center as will give adequate freedom from false triggers, that is you do not want the trim pot set all the way to one side. In my prototype circuit I used a 10K ohm trim pot, but the SYNC1 circuit drawing shows R8 surrounded by R5 and R6, this change was made to increase the useful range on the trip pot. The resistors R5 and R6 are a matched pair and need to be the same value if you substitute a slightly different value. Likewise R3 and R4 are also a matched pair and need to have the same resistance, within about 5%. If you need higher impedance on the input you can try to increase R1 to 100K ohm and R3 and R4 to 1M ohm, but I did not test that modification as of writing this (make sure R3 and R4 are of equal value, check them with an accurate ohm meter).
If the LED does not light up and go dark when you move the trim pot from one end to the other you may have the LED connected backwards. To check that cut the end of R2 going to the junction of R7 and U1 and short the cut end of R2 to the +5 volt supply, if it does not light it may be installed backwards, defective, or infrared or ultraviolet. Be sure you have a visible wavelength high brightness LED. Do not operate your LED without a 10K resistor in series (it does not matter which leg the resistor is on most of the time) since you may over current the LED and burn it out. When you get the LED to light reconnect R2 in its proper position on the output. If the LED still does not go on and off as you turn the trim pot form one end to the other you may have a wiring mistake or defective part. Check that the wiper of the trim pot is about 2.5 volts from common ground when it is near its center point, and check that the junction of R3, R4, and R1 is also around 2.5 volts. In operation a slight difference between the two 2.5 volts sources caused by the trim pot on one and the audio signal on the other is what makes the LM393N output go from logic low (0 to 0.3 volts) to logic high (2.7 to 5 volts). R7 is a pull up resistor on the LM393N output to make sure it goes up to logic high under the load of the parallel port and LED, it should not be smaller than 2.2k or larger than 3.3K. R2 sets the LED brightness, but also loads the output, so it should be left at around 10K, and not be smaller than twice R7 (R2>4.4K).
Capacitor C1 is the input coupling capacitor, 0.1 microfarad should give sufficient low frequency response with R1 being 10K, but if you need more low frequency response you could increase it to about one or two microfarad, if you use a polar input capacitor negative lead would go to the audio source. C4 is a RF bypass capacitor of 100 picofarads but it may reduce the high frequency response a little, if RF is not a problem you could decrease it to 10pf or if RF is a problem you could increase C4 to perhaps 1000pf. C2, C3, and C5 are to stabilize the power and reference voltage and should be the stated values of two 0.1 microfarad ceramic and 100 microfarad electrolytic. In the past I have noticed users substituting film capacitors when I have specified ceramic capacitors, they are not identical in there frequency response in some cases, so you should probably use the type of capacitor specified. C5 is polarized and needs to have its positive lead going to the positive five volt supply.
I do not recommend modifying the SYNC1 circuit before you have witnessed it operating properly as originally specified. It is a simple circuit, and each of the parts has a reason for being in the circuit. The unused output from the second comparator should be left open circuit, and its two inputs should be arranged so that one goes to +5 volts and the other to ground, as an attempt reduce the chance of it from going into oscillation and affect the other comparator or over heat and burn out.
The supply should be regulated and isolated. You should be careful that the audio source is not grounded to one side of the AC "Mains" wall current, 120VAC or 240VAC since you might end up putting line current into your computer through the Parallel Port. Never connect a diode bridge to a variable autotransformer as a DC power supply without passing the AC power to the variable transformer through an isolation transformer since the DC out will be connected ("grounded") directly to the AC line current resulting in a very dangerous situation where you can get two devices out of phase and have the full line current between them.
This is really a simple circuit that should be easy to adjust and use. The cost should be less than $20, if you skimp by using fixed resistors in place of the trim pot and take other shortcuts you might be able to build it for $5. I made mine out of parts that were laying around from other projects.
Other solutions for sound sync may be introduced for subsequent revisions, but the SYNC1 is a simple and inexpensive way to show Pixel frames with sync sound. To output the sync sound display to video tape you can use a VGA to NTSC/PAL/SECAM converter box, you just plug the converter box between your video board and your monitor, then connect your VCR to the converter box's composite video output jack. You can then digitize the video tape in the usual way and make a DVD if you like.
The best video mode for displaying Pixel frames at about 24fps seems to be the E640M16 (640x350x4) video mode with the dithering set to about 32 to 48 for conversion from the 24bpp BMP source images (the frames tend to look somewhat less grainy and sharper when running at speed). You may need to restart the program in EGA video board mode by selecting E from the video board menu over the opening screen to access that mode. Your ability to use larger monochrome or color pixel files for sync sound play will depend on how fast your harddisk and other system parts are, the video board part of the frame loading throughput might seem to be less of an issue until you go beyond 640x480 pixels or 8 bits per pixel. Color may be workable in the V320P256 mode but a small monitor should be used since pixels may be too large on a normal monitor.
Many sound boards and CD players can output the 0db VU signal level (about 1.228 volts RMS into a 600 ohm load) but if you need more gain you could add a Low voltage Operational amplifier chip ahead of the SYNC1 circuit, raising the cost a few dollars for the extra parts and a input gain control. Generally it is better to max out the signal coming to the SYNC1 circuit at the signal source, rather than boosting the gain at the SYNC1 circuit end, since noise, spikes, and EMI or RF would all bet amplified by the extra gain from adding an Operational Amplifier to the SYNC1 input. Noise in the signal could cause false triggering of the frame start or restart. The ANIMATE command has a digital filter on the trigger input to hopefully improve false triggering, but keeping the signals going to the Parallel Port clean won't hurt.
In the SYNC1 schematic the LM393N is shown from the top view. Here are the definitions of the pins on the LM393N.
PIN CONNECTIONS FOR LM393N DUAL COMPARATOR 8 PIN IC
Output A =1* 8= +5 Volts supply (allow for 100mA)
Inverting input A =2 7= Output B
Non-inverting input A =3 6= Inverting input B
Supply common ground =4 5= Non-inverting input B
There are two comparators in this IC, only one is used in the SYNC1 circuit, they are indicated as A and B. Since B is not used Pin 7 is left unconnected. In operation the DC bias voltage on Pin 2 and Pin 3 is slightly different, when the audio AC mixed with the DC bias on Pin 3 fluctuates with the audio input signal the output on Pin 1 will rapidly change from more than three volts to less than one volt in a square wave of the Beep tone frequency. If you have trouble getting the trigger to start even though the LED blinks brightly, try reducing the frequency of the beep tone. A 1000Hz tone seemed to work for the Pixel frame start trigger in testing under Windows 98SE (tm) and an AMD XP 2800+ cpu, if you are using a later version of Windows (tm) please report any problems you encounter. Pin 1 is the pin on the LM393N that should have a molded dot next to it.
Remember to adjust the trim pot R8 so that the LED D1 is off when there is no signal and on when there is a strong beep in the audio track. If you use the re-trigger sync option, the DC bias needs to be more carefully adjusted so that the loud beeps inserted by WAV LINK Mode 3 light the LED but the audio sounds from the track audio do not. Since you can use a scratch copy of your audio track you can lower the audio portion of the track quite a bit below the beeps to help the SYNC1 circuit differentiate. If you make a stereo track, one channel can have the beeps and the other not have beeps, so that the one with the beeps can go to SYNC1 and the other channel to your audio monitor amplifier, in that way you do not need to hear the beeps. The sound of the clapper board can be used without beeps if just a head trigger is needed to view a single shot of frames.
This is a top view of the SYNC1 circuit prototype. There is not much too the circuit, a few resistors, capacitors, an IC, a LED, and a trim pot. I used a 10K trim pot, but the circuit specifies a 1K trim pot and two 4.7K fixed resistors to give more range in the adjustment of the trim pot. A ten turn trim pot or panel pot might make adjusting less delicate. If the 1K trim pot needs to be set beyond its range, you can reduce the audio input level, or increase R1 to reduce the audio signal getting into the SYNC1 circuit.
This is a bottom view of the SYNC1 circuit prototype. I used tinned copper wire across the pad-per-hole board to make the circuit connections, you just tack it down to the pads with a little solder. With luck you might be able to get this circuit finished in about two hours or less.
You should enclose the SYNC1 circuit in a metal box, with the box grounded to the audio signal shield. The wire going to the Parallel Port connector should be shielded if it is more that a foot long. The power supply leads should be kept short since a regulated supply would be used. Also you do not want the power supply and output wires to act as an antenna for EMI and RF. The audio input lead can be several feet long if you use good quality shielded wire and keep the wire away from potential EMF and RF sources such as fluorescent lights, motors, bug zappers, air ionizers, monitors, and TV sets.