1
\$\begingroup\$

In layman's terms, I want to replace a Commodore 64 Paddle controller with a programable one.

I thought that the best approach is to replace the manual ~500k ohm pot used by the paddle with a digitial one, which will be controlled by a microcontroller. But I noticed that digi-pots, at least the common ones, are no bigger than 100k ohm.

So, what should I do in order to have a programmable pot that supports up to 500k ohms?

I know that I could put five 100k ohm digi-pots in series, but I would prefer to use just one digi-pot if possible.

Can I amplify the output of the digi-pot by 5? How can I achieve that ? By using an op-amp? or something else? or should I take a different approach ?

Thanks!

update: Since it was asked, I'm adding more information about this:

what I'm doing is a remote controller for the c64. I'm using a esp8266 to control the joystick. And I'm sending the joystick movements from a smartphone. Basically a remote virtual d-pad. At that is working Ok. But now I want to add paddle (and mouse) support to it. That's why I want to control the value the pots programatically. (BTW: I'm building this device: UniJoystiCle )

\$\endgroup\$
1
\$\begingroup\$

The circuit in the Commodore Paddle is connected as an R/C (resistor-capacitor) circuit. It uses the combination of P1 and C1 to form an "RC time-constant" where the computer discharges the capacitor, and it times how long it takes for R1 to charge-up the capacitor. The lower the resistance of P1, the shorter time it takes to charge C1.

And the other section P2 and C2 work exactly the same way. Alas, the variable resistor is NOT used as a true potentiometer. If it were, then you could substitute a 100K digital pot without any problem.

If you want to substitute a resistance of 100K instead of the original 500K, then you would need a corresponding capacitor that was 5x as big to maintain an equivalent RC time-constant, at least in theory.

It seems like a rather awkward way of controlling the paddle inputs. You didn't mention what is controlling your digital pot(s). It may be more expedient to replace the pot with a field-effect transistor (FET). Or simply monitor WHEN the Commodore discharges the capacitor and then wait an appropriate length of time (proportional to the "position" to apply a voltage to SIMULATE the RC time constant charging.

\$\endgroup\$
  • \$\begingroup\$ Thanks. I've just added more info into the question. BTW, I have no idea what a FET is, so that might give you an idea the knowledge that I have. \$\endgroup\$ – ricardoquesada Apr 18 '16 at 6:58
  • \$\begingroup\$ 100k digipots have quite significant capacitance, incidentally. The AD5241 100k variant for example, has a -3dB bandwidth of 69kHz at midscale for an effective capacitance of about 47pF. \$\endgroup\$ – Peter Smith Apr 18 '16 at 9:15
0
\$\begingroup\$

You should study the circuit around the pot you intend to replace to see what effect, if any, changing the value of the pot would have.

If the pot is connected as a voltage divider between Vcc and ground, changing the value will probably not be a problem, but other circuit arrangements may not tolerate a changed value, or perhaps may not allow a digital pot at all, if the voltages on the terminals will be outside the digital pot's premissible range.

\$\endgroup\$
0
\$\begingroup\$

If you are going to electronically change the apparent value of a resistance, you can just as easily create an apparent resistance from an MCU output.

Something experimentally found with current sources might work here, since it seems the C64 works with charge times. But you would need to include an anti-log function in the micro-controller.

If the C64 really uses charge timing (which is very common in older systems) you can also take a 5 times larger capacitor with the 100k pot, by the way. Charging a cap with a resistor gives a curve that is influenced through an R*C factor, so if you divide one by a number, multiplying the other by the same number gives exactly the same curve (in theory / with ideal components).

Be careful not to make the capacitance huge to use a super cheap pot with a low value, since the system may not be able to handle very large capacitances and/or very low resistances.

\$\endgroup\$
  • \$\begingroup\$ so, if I understood correctly I could avoid the digi-pot altogether, is that correct? Could I achieve the same thing with a switch (lets say a 4066 IC) ? The idea would be to open/close the switch to control the time it takes the capacitor to be fully charged. Will that work? Is there a better way to do it? Thanks! \$\endgroup\$ – ricardoquesada Apr 18 '16 at 15:30
  • \$\begingroup\$ You may be able to "PWM" the cap charging with an analogue switch (though it may require a high frequency PWM signal, which... ehhh), just be sure to connect up the grounds, because especially old chips like the 4066 don't cope well with negative signals. What I my explanation meant was using a controllable current source and some experimentation, but it's maybe also possible to PWM a P-MOSFET at a high enough frequency to "fool" the C64. But hacking like that is always a risky thing and involves a lot of careful experimentation. \$\endgroup\$ – Asmyldof Apr 18 '16 at 16:24
  • \$\begingroup\$ @amyldof oh yes. I will avoid the 4066 and use the PWM instead. Not sure if the esp8266 has a high enough frequency signal (according to the documentation it is between 100Hz and 1KHz), but I will give it a try. Is it safe to connect the esp8266 PWM directly to the c64 pot, and connect the esp8266 ground with the c64 ground? thanks \$\endgroup\$ – ricardoquesada Apr 18 '16 at 16:39

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.