What additional elements do I need in my circuit to compensate for changing a pair of manual 500k ohm pots to a pair of digital 10 ohms?

I'm a beginner implementing an Atari Punk Console on Raspberry Pi following a circuit I found online. That circuit called for two 500k ohm variable resistors that are used in combination to vary the sound coming from the device. I want that effect-making under computer control so I swapped in a 42010 digital pot (which has two pots built in) but which only has 10k ohm resistance per resistor. The circuit works but the volume is less substantial than the original and the range of impact of effective digital values is small, with the effect only occurring on the low end from 1 to 100 on one, and 1 to 60 on the other. I guess that is to be expected insofar as it's at the higher resistances that the interesting sounds might be.

There is also a NE556N timer involved in the circuit. I've adapted it to the Raspberry Pi and I'm using 3.3 volts. Here's the circuit I started from:

enter image description here

Atari Punk Console

Here's the data sheet for the MCP42010:

MCP42010 Datasheet

  • \$\begingroup\$ What is your power supply voltage? What is the exact part number of the 556 dual timer? Also, please correct the resistor values in your question to be kilohms where appropriate...there are no 500 ohm pots in the circuit you linked. \$\endgroup\$ – Elliot Alderson Jan 3 at 17:19
  • \$\begingroup\$ I've fixed the resistor values and added that there is a NE556N involved. Power supply is 3.3 volts and I've added that in. Thanks Elliot! \$\endgroup\$ – Rob Reuss Jan 3 at 17:26
  • \$\begingroup\$ How about a schematic of what you've constructed? Presumably you've replaced VR1 and VR2 with the MCP42010, so the volume shouldn't be affected - VR3 remains a physical variable resistor? \$\endgroup\$ – Phil G Jan 3 at 17:30
  • \$\begingroup\$ The minimum recommended supply voltage for the NE556N (from TI anyway) is 4.5V and the circuit you linked is designed for 9V operation. It's not much of a surprise that you get a low sound volume at 3.3V \$\endgroup\$ – Elliot Alderson Jan 3 at 17:34
  • \$\begingroup\$ it seemslike it would be eaiser to synthesize these sounds using software (like was originally done) \$\endgroup\$ – Jasen Jan 3 at 21:44

Presumably you've worked out how this circuit works? The left side is set up as an astable, and as such the DISCH (pin 1) pulls the timing cap back down to the lower threshold, so you need a series resistor with VR1 to limit the current going through it with either the mechanical VR or the MCP chip (bit of an oversight on the original version) The right side is set up as a monostable, so again the DISCH pin (13) pulls the cap down at the end of the pulse, so a series resistor is needed for VR2.

Making the circuit work with the 10k range of the chip can be improved by making the timing caps proportionally greater to maintain the same frequency range. There are formulas and even online calculators available for this in many web sites (example). The overall effect is that VR1 controls the frequency, and VR2 controls the width of the pulse at the output, which will change the harmonics present, and hence the tone.

It's a fun circuit to try out, but using a Pi to control the MCP chips to control this circuit seems to be a long way around to generate what is effectively a variable frequency pulse width modulated (PWM) signal, when the Pi has a PWM generator built in - though the hardware PWM doesn't divide down that well to audio frequencies, there are methods of generating PWM in software for lower frequencies.

  • \$\begingroup\$ No, I have barely scratched the surface on how it works, so your discussion is very helpful. The original article didn't provide much detail. A lot of what you say is beyond my understanding but I'll study it. That's very interesting about frequency and width of the pulse - makes sense from an auditory standpoint. What do you mean when you refer to "timing caps"? Learning more about the Pi PWM capabilities is on my agenda - I'm fascinated by it but really muddling my way through at this point. Utilizing a digital VR presented itself as obvious once I had built the manual circuit. \$\endgroup\$ – Rob Reuss Jan 4 at 1:01
  • \$\begingroup\$ @RobReuss if you look up the "555 timer astable" circuit, you'll see that the timing caps are the capacitors that the 555 timer charges and discharges to measure time. It's a very educational, general purpose and well documented beginner level chip. 555s are the best at only one thing - educating. Most of the common 555 circuits are even documented with in depth explanations of how they work, so once you read a bit you'll be able to mess with the values as he suggests. It's the ratio between certain resistances and capacitances that determines the cycle. \$\endgroup\$ – K H Jan 4 at 1:37
  • \$\begingroup\$ Phil, I switched in 500nf capacitors, which according to the site you gave would give me a comparable frequency of 96Hz relative to the 500k VRs. Sounds much better - lower pitched, growly. I also swapped in a MCP41010 for the remaining 5k VR (volume) but it's not working because of the difference in resistance (the MCP41010 provides 10k ohms of resistance). I can hear the volume changing but the sound is very weak (have to put my ear against the speaker). Any way I can mitigate having too much resistance, or should I post a different question for this? \$\endgroup\$ – Rob Reuss Jan 4 at 3:22
  • \$\begingroup\$ @KH I'll definitely look it up! I've been tinkering without much theory and I need to step back and understand what I'm working with more deeply. Doing things like swapping components is helping me get a feeling for some of the basics like voltage, current and resistance, as well as the function of basic components. I'll do some learning on the 555. \$\endgroup\$ – Rob Reuss Jan 4 at 3:24
  • \$\begingroup\$ There's plenty of tutorials for the 555 circuits, since it's been around for decades such as electronics-tutorials.ws/waveforms/555_oscillator.html C1 and C2 are the timing caps, they along with the resistors determine the rate of rise and fall of the signal at the comparator inputs, and hence the timing of the switching, I doubt that you'll be able to use the MCP chip for directly controlling the volume of the speaker, the wiper resistance is high enough that you'll lose a lot even at minimum resistance. May be better to use it as a potentiometer and add an amplifier after it. \$\endgroup\$ – Phil G Jan 4 at 14:23

It would most likely be fine to use a 10k digital pot in replacement for the 500k pots. There are a few gotchas when working with digital pots, the first one is they can't take a lot of current (only 1mA for the wiper current of this part) through them or they burn out. In this case you should be fine because the input of the 556 is high impedance and takes very little current, the cap is also high impedance at DC and also takes little current.

You may want to use a 100k part instead of a 10k part, to get the same resistance range, otherwise you might want to increase the cap by a factor of 10 to get the same RC time constant range.

The other problem is the resolution, with only 256 taps, this limits the frequencies that can be generated. A regular pot is continuous and can generate as many frequencies as you want with the RC filter of the 556 timer. A digital pot will restrict this to whatever the pot can handle.

  • 1
    \$\begingroup\$ will work so-long as the pot is not set lower than 3.3K else you'll exceed 1mA \$\endgroup\$ – Jasen Jan 3 at 21:08
  • \$\begingroup\$ that's because 1 anf 14 are outputs. \$\endgroup\$ – Jasen Jan 3 at 21:16
  • \$\begingroup\$ I only looked at the 500k that was connected to 13 and assumed both sides were symmetrical. 14 looks like it's tied to VCC in the above example \$\endgroup\$ – Voltage Spike Jan 3 at 21:36
  • \$\begingroup\$ I could not find the 100k part or I would have used it - only the 10k was available at multiple suppliers. But your suggestion was super helpful - putting in .1uf capacitors improved things dramatically. If you compare my device to the video in the project plan linked to above, you'll hear that it's not quite as...muscular, and buzzy. Perhaps that's a voltage thing - I'm still running on 3.3V and other another commenter said the relatively low voltage could be the reason. But when I switch to the RPi's 5V, the digital pots are unresponsive. \$\endgroup\$ – Rob Reuss Jan 3 at 23:42
  • \$\begingroup\$ youtube.com/watch?v=AfJaE7U14WI&feature=youtu.be \$\endgroup\$ – Rob Reuss Jan 3 at 23:42

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.