# How does this circuit work?

Discussion in 'Analog & Mixed-Signal Design' started by line_code, Aug 8, 2018.

1. ### line_code Thread Starter New Member

Aug 8, 2018
21
0
Hello everyone! I have found an old circuit that is used to convert audio-level SMPTE/LTC signals back into a 5V square wave that can be understood by digital circuitry. Though I am decently familiar with digital circuitry, my knowledge of analog circuitry is pretty much non-existent. Could someone explain to me how this circuit works and how adjusting the resistors and capacitors would affect the operation of the circuit?

Also, I've found that the audio volume range that this circuit can handle is pretty narrow. Does anyone know of a way I could make this circuit work with a much wider range of volumes, really from the smallest and greatest volume that can be achieved? (Additional circuitry is OK.) Only frequencies between 2000 and 5400 Hz need to be regarded as acceptable. Anything outside this range can be ignored, if that makes a difference on how I could make the volume range greater.

Oh, and by the way, there's usually a 74HC14 chip between the output of the op-amp and the rest of the circuitry. I accidentally deleted that when I extracted this part of the circuit from the rest of the schematic.

Thank you!

Edit for clarity: VCC is 5V

• ###### squarer.png
File size:
13.3 KB
Views:
63
Last edited: Aug 14, 2018
2. ### crutschow Expert

Mar 14, 2008
19,746
5,523
It's an op amp configured as a comparator.
The high open-loop gain of the op amp causes the output to go from 0V to near the positive rail with just a very small change in the input voltage, thus generating a digital output.
Probably, but I can't do a design without knowing what that range of voltages is (?).

If someone asked you to design a digital adder that would add the smallest to the largest number, what would your first question be?

Mar 29, 2015
68
6

4. ### Plamen Member

Mar 29, 2015
68
6

Petkan:
Single polarity op amp used as comparator with hysteresis, needs virtual GND at half the power rail. Connect the 12k not directly to GND, but to adivider of two equal resistors between the + and GND. Add a cap to GND.

5. ### sghioto Active Member

Dec 31, 2017
520
71
Not in this case. The LM358 is designed for a single ended supply. Connecting the 12K to a voltage divider just raises the voltage on the +input.
I tested the circuit and didn't seem to find any problem with the audio range. The circuit as posted requires about 50mv to generate a 50% duty square wave from a sine wave. Waveform remained square up to a 10 volt input, the maximum output from my generator.
SG

6. ### line_code Thread Starter New Member

Aug 8, 2018
21
0
I don't know if this is unrealistic or even what I want, because, again, I'm not that familiar with analog circuitry, but I'd really like something as small as, say, 1mv to be acceptable, that way there's never a question as to whether the source volume is loud enough. If the signal source is a computer with the volume being adjusted through software, is the voltage actually what's being varied to change the volume? If not, that scenario would also have to be considered since I'm using LTC from my computer's sound card.

I feel like with 1mv sensitivity, teeny amounts of noise on the line would be ridiculously amplified. Would there need to be some sort of filter to filter out all the noise and to only pay attention to the 1000-5400 Hz range I am aiming for?

I'm not necessarily opposed to an entirely new circuit that would work like this one but with greater volume ranges, but if this one can be made to work, that would be even better since I already have the parts.

Does anyone have any recommendations on some website or book where I can learn more about designing circuits specifically similar to the one I posted, that way I can tinker with my owns designs instead of having to try to find circuits that do what I want?

7. ### sghioto Active Member

Dec 31, 2017
520
71
1 mv would be not be practical as you said due to the noise factor. Seems to me the 50 mv input is a good value.
Yes, this can be verified by measuring the line output level. The line level output on most computers is several hundred millivolts or more at full volume
SG

8. ### line_code Thread Starter New Member

Aug 8, 2018
21
0

When I play LTC through this circuit, I only have a relatively small range of volumes that work. For example, when I use VLC player to play the LTC signals, at best only around 40%-125% volume works reliably. I'd like to aim for as low as 5% volume (VLC's lowest).

I've tried to measure the voltage of the audio output using the "200m" volt feature on my multimeter, but the voltage seems to slowly count down from around 40 mv no matter how I adjust the volume or if anything is even playing. Maybe I need a better multimeter.

Edit: It looks like the 200m volt option is DC, not AC. My meter only has a 200V and 750V AC feature. Could this be the issue?

9. ### sghioto Active Member

Dec 31, 2017
520
71
Are you measuring AC voltage? What is your multimeter?
SG

10. ### line_code Thread Starter New Member

Aug 8, 2018
21
0
Guess I edited my post too slowly lol. It was DC. My multimeter is just a cheap Harbor Freight one. Probably should invest in a nicer one.

Is there a certain frequency tone that I should use when I measure the voltage?

11. ### sghioto Active Member

Dec 31, 2017
520
71
I just read this from Wikipedia, "Longitudinal SMPTE timecode should be played back at a middle-level when recorded on an audio track, as both low and high levels will introduce distortion". So maybe you just leave the setting at say 60%.
SG

12. ### sghioto Active Member

Dec 31, 2017
520
71
I suppose you could add a preamp to boost the signal. Might try the circuit below.
SG
EDIT: Schematic

Last edited: Aug 14, 2018
13. ### Plamen Member

Mar 29, 2015
68
6
Petkan:
Even the telephone bandwidth is 300 Hz to 3.4 kHz. 1000Hz to 5400Hz looks strange. Apparently not an audio application.
Limiting the amp bandwidth could be achieved either as separate filter blocks, or by incorporating in the amp negative feedback RC passive filters. Study an example of RIAA pre-amplifier for turn table, a tape recorder play back and recording amplifier. You will see how relatively simple RC networks lead to desired gain vs frequency response.
On how to learn to design: There is no short-cut. It takes lots of successfully debugged circuits to learn the trade. I recommend downloading the free LTSpice and playing in it with various circuits. It is faster than prototyping real hardware. Study datasheets and application notes on popular ICs. Start with simple parts like diodes and transistors. The key to good designs is finding the parts for the task (today the ICs). Create a block diagram of the intended circuit on functional level, then look for suitable IC for each block. Simulate in LTSpice one block at a time. To design we need to know the specifics of many components - in order to use them in their best role.

14. ### line_code Thread Starter New Member

Aug 8, 2018
21
0
Will I lose any of my higher volume capabilities by using this? Low volume capability is more necessary than higher volume so its probably ok if some of the higher volume capabilities are lost. I explain this a bit more below.

I made up the values of 1000-5400 Hz. I chose these because these are the highest and lowest frequencies I believe I will need. I explain this below. Also, thank you for the information. I will investigate LTSpice soon.

To help you understand why I am asking about these particular capabilities, let me explain a bit more what the LTC is used for. Essentially, I have a stereo audio track containing audio on one channel and LTC on the other. The audio goes out to my speakers, but the LTC is routed to the circuit that I attached in the first post. The LTC is then sent to an animatronic controller which reads the LTC and decides which movements on the animatronic to activate for that LTC frame. I am using my computer to do this, but some of the older songs produced by other people years ago are on tape (cassette or reel) format. The volume of the LTC is not always within the volume range that the circuit can reliably square, both on my computer due to the volume being adjusted or on tape due to who knows what reason. The LTC is not always at the nominal data rate on tape due to either the tape being stretched, the player being slightly faster or slower than the original recorder, or the original animators using slightly faster time code for greater animation resolution. I chose 1000-5400 Hz because they include the lowest and highest frequencies that the controller is capably of reliably decoding with a bit of wiggle room on each side.

Also, I must note that its not really LTC, but something similar. The nominal data rate of this type BMC signal is around twice the nominal data rate of normal LTC to allow for greater animation resolution (I'm estimating around 4800 Hz for a one bit and 2400 Hz for a zero).

15. ### sghioto Active Member

Dec 31, 2017
520
71
I don't think so. Note that the schematic of the booster amp has been edited. Basically set the VLC at the low end you want to use and adjust the pot on the output for a reliable signal. The gain is set at 22, which I believe will be enough.
SG

16. ### line_code Thread Starter New Member

Aug 8, 2018
21
0
Wonderful! As soon as I can get the parts, I'll try this out and see how it works.

17. ### sghioto Active Member

Dec 31, 2017
520
71
Not sure if you know but the LM358 is a dual chip which is why I chose that part.
SG

18. ### line_code Thread Starter New Member

Aug 8, 2018
21
0
Yes, thank you. Just out of curiosity, is there a quad version of this chip that wouldn't require any circuit modifications? Would that be an LM324?

19. ### sghioto Active Member

Dec 31, 2017
520
71
Yes that is generally considered the quad version of the LM358. Would have to test to see if any components needed tweaking.

EDIT: LM324 works fine no tweaking required. Just note the unusual pin numbers for the supply voltage, #4 is +Vcc #11 is ground.
SG

Last edited: Aug 14, 2018
20. ### line_code Thread Starter New Member

Aug 8, 2018
21
0
Ok, thanks.

I tested the preamp you uploaded and I got results from recently made signals and signals transferred from tape. Here's the data:

Signals transferred from tape:
Lowest reliable volume with just comparator: 105%
Lowest reliable volume with preamp: 60%