Close

Sawtooth + Sampling

A project log for Zappotron Super-Sequencer

NES Zapper Controlled drum sequencer

russell-kramerRussell Kramer 03/19/2017 at 03:160 Comments

I need to create a sawtooth wave triggered by the NTSC Hsync. This can be used with a sample-and-hold circuit to produce an analog voltage that responds to the zapper's horizontal position.

A 2N3904 is used to discharge a 1nF capacitor to ground at every Hsync pulse. The capacitor then charges up through a 2N3906 based current regulator. If the charge-up happened through just a resistor it would not be a linear sawtooth. The capacitor would charge quickly in the beginning then slow down at the end resulting in a rounded wave.

The TLC274 is used to buffer the sawtooth. Without it the voltage of the 1nF capacitor would be affected by the circuits recieving the sawtooth which would effect the waveform. TLC274 is a high speed quad op-amp. I only ended up using one of its elements, so I should have used a TLC271 single op-amp instead. That would have saved a dollar.

Audio op-amps like LM324 are not fast enough to handle the sawtooth wave properly. The buffer needs to be a high-speed op-amp.

The zapper light detection triggers a CD4066 switch to close. The input of the switch is the sawtooth. The other side of the 4066 switch goes a set of physical control buttons. (covered next)

A CD4066 has four switches in it, so this circuit uses the same chip that does NTSC video porching.

I cut open the Zapper's cable and soldered its wires directly to the breadboard. The detection wire is blue. Vcc is brown. Ground is white.

A look at the prototype so far. This is getting unintelligible so I'm going to stick to breadboard sketches mostly.

Discussions