0
\$\begingroup\$

What does the below circuit do?

It was found here. I was under the impression it somehow helped with making the sounds required for AFSK 1200 baud and sending them to the audio input of a radio. I have no idea how. Does anybody recognize what the circuit is doing or how it helps me?

The circuit is designed for Arduino's, but it's not even clear from the code what the Arduino is doing to this circuit.

\$\endgroup\$
  • \$\begingroup\$ Screenshot is good :) \$\endgroup\$ – clabacchio Feb 4 '12 at 22:37
  • \$\begingroup\$ Thanks! I have gotten some rude comments on their use on other sites, happy to see them welcome here! \$\endgroup\$ – Kyle Feb 5 '12 at 0:19
  • 1
    \$\begingroup\$ Screen shot is OK, as long as the image isn't too cluttered. Screen shots of schematic programs that can properly export the schematic without screen-related droppings is definitely not OK, and rude comments are quite deserved. \$\endgroup\$ – Olin Lathrop Feb 5 '12 at 0:52
  • \$\begingroup\$ Awesome. I will keep that mind. \$\endgroup\$ – Kyle Feb 5 '12 at 3:25
11
\$\begingroup\$

Looks to me like a very simple (and not very precise) 4 bit digital to analog converter. It takes the 4 bits and produces a voltage between 0V and a maximum which is determined by R6. C2 is used to remove DC offset.

\$\endgroup\$
  • \$\begingroup\$ That's what it looks like to me, too. Seems pretty horribly imprecise; I think the output would be monotonic, but the ratio between 1K and 2K2 fully 10% off what it should be. \$\endgroup\$ – supercat Feb 5 '12 at 0:13
  • 1
    \$\begingroup\$ Yup, that's what I thought too, +1. If this is just to make rough sounds for 1200 baud modem, then this accuracy is good enough. \$\endgroup\$ – Olin Lathrop Feb 5 '12 at 0:54
  • \$\begingroup\$ What would have to be done to make those rough tones though? Just pulse the pins? \$\endgroup\$ – Kyle Feb 5 '12 at 3:01
2
\$\begingroup\$

R1-R4 & R6 form a 4 bit digital to analog converter.
Various hi/lo on/off digital signals can be applied to R1...R4 which causes a vaying voltage to appear at that top of R6. This ac value is couple to thye output by C2.

Note the ratios of the resistors are approximately 1:2:4:8 - ie they are "binary weighted".

Using high and low drive only a4 bit analog value can be produced by applying the correct codes sequentially to R1...R4 and this allows a 16 level peak-to-peak sine wave to be produced. While this is very coarse by most standards and while the resistor ratios are quite innacurate, the resulting waveform is far superior to using just a square wave.

For extra points you can use high/open circuit/low on the input pins to produce additional levels. Fot true ternary on 4 pins you get 3^4 = 81 levels BUT some of these are liable to overlap in this case, especially with the very inaccurate resistor ratios. Odds are that they just use 4 bit binary.

Above I said "sine wave" but for eg DTMF you could work out the end result for adding two sinewaves and output the combined value. Greater accuracy would be desirable when multiple sinewaves are combined.


Paralleling resistors to get desired value.

An often quoted formula is used to calculate the resistance Rp of two resistors R1 & R2 in value

  • Rp = R1 x R2 / (R1 + R2)

A simple rearrangement of this circuit produces an extremely useful but little quoted formula.

       R2 = R1 x Rp / (R1-Rp)

ie If you have a resistor R1 and want a smaller resistance R2, then R2 is the value required to be placed in parallel.

eg here, the desired values are 1k, 2k, 4k, 8k.
The standard E12 values at or above the desired value are
1K, 2K2, 4k7 & 8k2

To get 2K you use Rparallel = R_now x R_wanted / (Rnow - Rwanted)
= 2.2 x 2 / (2.2-2k) = 4.4/0.2 = 22 = 22k

4k7 -> 4K: 4.7 x 4 / (4.7-4) = 18.8/0.7 = 26.857 -> 27k

8k2 -> 8K: = (8.2 x 8 )/.2 = 328k or
10k - > 8k : (10 x 8)/ (10-8) = 40k
etc

If using E12 resistors you can choose another initial value or calculate to see how close a std resistor gets you - noting that the std resistor actual resistance will probably not be its nominal value.

\$\endgroup\$
  • \$\begingroup\$ Finally figured out this can make a nice sine wave (and that is music to my ears compared to all those square waves I have been hearing). I think I'll keep it simple with the $10 of 5% resistors I just bought. I know they're not perfect, but that'll do for now! \$\endgroup\$ – Kyle Feb 5 '12 at 5:02
  • \$\begingroup\$ You can "select on test" to get closer to desired values or parallel resistors to get desired value. See addition to my answer for a magic formula. \$\endgroup\$ – Russell McMahon Feb 5 '12 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.