Jump to content

Control scheme idea


123 replies to this topic

#43 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Fri Apr 6, 2007 9:20 PM

View PostGrover, on Fri Apr 6, 2007 7:49 PM, said:

...has anyone progressed further with using PWM/PFM/PPM to simulate a paddle? I was thinking a nice solution would be to use a 556 timer (or two 555 timers) as outlined in the attached PDF to generate PWM from a variable voltage - what do you think? what value resistor and capacitor would work best? (the only thing I'm not sure about is just how variable the voltage could be - looking at spec sheets, the control voltage pin on 555/556's seem to offer a very narrow range) thanks for any ideas!

First of all, for good performance you should use the pot to generate a DC VOLTAGE rather than a resistance. In other words, wire the two ends of the pot to +5 and ground (possibly extending one or both ends of the pot with resistors, but with both ends of the pot remaining at constant DC voltages in any case).

Beyond that, there are a number of approaches that may work better. I haven't had a chance yet to find out what the threshold voltage is for the 2600's paddle inputs, but something like this may work
Attached Image: paddle.GIF
The chip is an LM311 which grounds its output when its "+" input is higher than the "-". When the Atari 2600 paddle pin is grounded, the LM311's "-" input will be lower than the "+", so the comparator will ground the output. Thus, only the 1M resistor near the right side of the circuit will charge the 2600's cap.

When the cap voltage reaches the voltage on the pot, then the comparator output will switch off, allowing the 1K resistor to pull up the Atari's paddle input. This should cause it to switch in fairly short order.

The time required for the paddle input to switch after it is released should thus be the time required for the 1M resistor to charge up to the pot voltage, plus the time for the 1K resistor to charge from there to the TIA switching threshold.

Other chips may be somewhat better suited to the task, but the LM311 should be widely available. The cap near the "+" input is non-critical and could be omitted altogether, but it may slightly reduce jitter when used with really dirty paddles. I'd suggest something small, on the other of a 0.001uF or so.

If you build the circuit and the end of the paddle nearest ground doesn't move the player far enough, it may be necessary to reduce the 1K resistor, though I wouldn't go beyond 470 ohms (if the circuit doesn't work with 470 ohms, it will need to be redesigned). If the player doesn't move far enough the other way but the pot's full range of motion is usable, it may be necessary to reduce the 1M resistor attached to the pot. It the player stalls at some position short of full motion (e.g. turning the pot 2/3 of the way moves the player 3/4 of the way across the screen, but further turning has no additional effect) it may be necessary to increase the 1M resistor attached to the joystick port.

BTW, the 1M pot was chosen because that's what the Atari 2600 uses. If some other value is more convenient, feel free to substitute. Change the resistor that's attached to the pot appropriately in that case.

Edited by supercat, Fri Apr 6, 2007 9:27 PM.


#44  

    Dragonstomper

  • 517 posts
  • Joined: 09-July 01
  • Location:Santa Clara, CA

Posted Fri Apr 6, 2007 11:18 PM

View Postsupercat, on Sat Apr 7, 2007 3:20 AM, said:

View PostGrover, on Fri Apr 6, 2007 7:49 PM, said:

...has anyone progressed further with using PWM/PFM/PPM to simulate a paddle? I was thinking a nice solution would be to use a 556 timer (or two 555 timers) as outlined in the attached PDF to generate PWM from a variable voltage - what do you think? what value resistor and capacitor would work best? (the only thing I'm not sure about is just how variable the voltage could be - looking at spec sheets, the control voltage pin on 555/556's seem to offer a very narrow range) thanks for any ideas!

First of all, for good performance you should use the pot to generate a DC VOLTAGE rather than a resistance. In other words, wire the two ends of the pot to +5 and ground (possibly extending one or both ends of the pot with resistors, but with both ends of the pot remaining at constant DC voltages in any case).

Beyond that, there are a number of approaches that may work better. I haven't had a chance yet to find out what the threshold voltage is for the 2600's paddle inputs, but something like this may work
Attached Image: paddle.GIF
The chip is an LM311 which grounds its output when its "+" input is higher than the "-". When the Atari 2600 paddle pin is grounded, the LM311's "-" input will be lower than the "+", so the comparator will ground the output. Thus, only the 1M resistor near the right side of the circuit will charge the 2600's cap.

When the cap voltage reaches the voltage on the pot, then the comparator output will switch off, allowing the 1K resistor to pull up the Atari's paddle input. This should cause it to switch in fairly short order.

The time required for the paddle input to switch after it is released should thus be the time required for the 1M resistor to charge up to the pot voltage, plus the time for the 1K resistor to charge from there to the TIA switching threshold.

Other chips may be somewhat better suited to the task, but the LM311 should be widely available. The cap near the "+" input is non-critical and could be omitted altogether, but it may slightly reduce jitter when used with really dirty paddles. I'd suggest something small, on the other of a 0.001uF or so.

If you build the circuit and the end of the paddle nearest ground doesn't move the player far enough, it may be necessary to reduce the 1K resistor, though I wouldn't go beyond 470 ohms (if the circuit doesn't work with 470 ohms, it will need to be redesigned). If the player doesn't move far enough the other way but the pot's full range of motion is usable, it may be necessary to reduce the 1M resistor attached to the pot. It the player stalls at some position short of full motion (e.g. turning the pot 2/3 of the way moves the player 3/4 of the way across the screen, but further turning has no additional effect) it may be necessary to increase the 1M resistor attached to the joystick port.

BTW, the 1M pot was chosen because that's what the Atari 2600 uses. If some other value is more convenient, feel free to substitute. Change the resistor that's attached to the pot appropriately in that case.
I have about 2 minutes here tonight, so keeping this short....

Actually, the pot in Grover's circuit IS generating a DC voltage to control the pulse width of the 555 oneshot. Ok, can't analyze further right now...so I'll pose a question. It's been a while since this thread had any updates and my mind has been swiss-cheesed by work since then. So...what was the original purpose of all this? I think it's worthwhile to summarize this, to guide the discussion a little. Seems to be going in circles, but again I only looked through for 30 seconds or so. Anybody wanna sum up for me? Ok, gotta go.

-Chris

#45 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Fri Apr 6, 2007 11:33 PM

View Postcwilkson, on Sat Apr 7, 2007 12:18 AM, said:

Actually, the pot in Grover's circuit IS generating a DC voltage to control the pulse width of the 555 oneshot.

Yes, but the voltages on the ends of the pot are not constant, and vary with the pot setting.

A dirty potentiometer will generally behave like a clean potentiometer with a randomly-varying resistance in series with the wiper. In Grover's circuit, the wiper resistance will greatly affect the measured value; 10K of random resistance would be an annoying amount of jitter, and 100K would render things completely useless. In the circuit I posted, 100K of random wiper resistance would probably be only barely detectable, and a meg of random resistance would still only have slight effect.

Quote

Ok, can't analyze further right now...so I'll pose a question. It's been a while since this thread had any updates and my mind has been swiss-cheesed by work since then. So...what was the original purpose of all this? I think it's worthwhile to summarize this, to guide the discussion a little. Seems to be going in circles, but again I only looked through for 30 seconds or so. Anybody wanna sum up for me? Ok, gotta go.

The basic idea is to produce circuit for a paddle control that will work well even if the pot becomes dirty.

#46  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sat Apr 7, 2007 1:54 AM

View PostGrover, on Fri Apr 6, 2007 7:49 PM, said:

...has anyone progressed further with using PWM/PFM/PPM to simulate a paddle? I was thinking a nice solution would be to use a 556 timer (or two 555 timers) as outlined in the attached PDF to generate PWM from a variable voltage - what do you think? what value resistor and capacitor would work best? (the only thing I'm not sure about is just how variable the voltage could be - looking at spec sheets, the control voltage pin on 555/556's seem to offer a very narrow range) thanks for any ideas!
One thing not very many people seem to know, is that the addition of a single diode to the standard 555 self-triggering circuit between pins 6 and 7 (cathode to pin 6) allows the duty cycle to be altered both sides of 50%, even closely approaching 0% and 100%. I don't know what effect this modification has on the pin 5 control input (if any), but it should work to allow the use of a single 555 instead of a pair or a 556.


View Postsupercat, on Fri Apr 6, 2007 8:20 PM, said:

First of all, for good performance you should use the pot to generate a DC VOLTAGE rather than a resistance. In other words, wire the two ends of the pot to +5 and ground (possibly extending one or both ends of the pot with resistors, but with both ends of the pot remaining at constant DC voltages in any case).

Beyond that, there are a number of approaches that may work better. I haven't had a chance yet to find out what the threshold voltage is for the 2600's paddle inputs, but something like this may work
Attachment attachment
If I understand your drawing correctly, the 4-way junction at the right side is a connection rather than a crossover, correct? At a first approximation, that looks like it should work well. I don't have an LM311 here, but I'll see if my local Fry's has it while I'm out running errands on Saturday. If not, I'll see if I have another suitable comparator in my parts bins. Then later I may have time to try out one or both of these circuits.

Edited by A.J. Franzman, Sun Apr 8, 2007 1:05 AM.


#47  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sat Apr 7, 2007 8:37 PM

OK, I built supercat's circuit from post #43 using an NTE922M, and a 1nF (102) cap on the non-inverting input and it doesn't work. EDIT: Actually, it does, with a slight correction. Please skip ahead to post #58!

As drawn, I could barely get the paddle to come partway onto the bottom of the screen in Video Olympics Game 1. Even at this stage, jitter was still evident (using my only assembled paddle with a jittery pot). Changing the resistor on the comparator's output from 1k to 220 ohms made some improvement, allowing the paddle to travel about 1/5 of the way up the screen, with about the same degree of jitter. Leaving that resistor in place and changing the diode from a silicon diode to a germanium diode (0.3 V forward drop instead of 0.6 V) allowed the paddle to travel all the way up the screen, but jitter became extremely severe -- the paddle could jump the entire screen height at once, and I could not get it to rest anywhere in the middle. Leaving the germanium diode in place and restoring the resistor to 1k, I could not get the paddle onscreen at all.

Edited by A.J. Franzman, Sun Apr 8, 2007 12:52 AM.


#48 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Sat Apr 7, 2007 9:48 PM

View PostA.J. Franzman, on Sat Apr 7, 2007 9:37 PM, said:

As drawn, I could barely get the paddle to come partway onto the bottom of the screen in Video Olympics Game 1. Even at this stage, jitter was still evident (using my only assembled paddle with a jittery pot). Changing the resistor on the comparator's output from 1k to 220 ohms made some improvement, allowing the paddle to travel about 1/5 of the way up the screen, with about the same degree of jitter. Leaving that resistor in place and changing the diode from a silicon diode to a germanium diode (0.3 V forward drop instead of 0.6 V) allowed the paddle to travel all the way up the screen, but jitter became extremely severe -- the paddle could jump the entire screen height at once, and I could not get it to rest anywhere in the middle. Leaving the germanium diode in place and restoring the resistor to 1k, I could not get the paddle onscreen at all.

I'll have to check the data sheet for that part. Perhaps the TIA paddle inputs switch at a higher voltage than I'd thought. By "jitter", do you mean jitter just when moving the pot, or jitter even when the pot is motionless?

Germanium diodes tend to be rather leaky, and could thus prevent the 1meg resistor near the right side of the circuit from operating.

I'll look up the specs on the NTE922M and see if I can figure anything.

#49 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Sat Apr 7, 2007 10:11 PM

View PostA.J. Franzman, on Sat Apr 7, 2007 9:37 PM, said:

OK, I built supercat's circuit from post #43 using an NTE922M, and a 1nF (102) cap on the non-inverting input and it doesn't work.

Looking at the NTE's data sheet, I couldn't see whether the input voltage range extends to ground when using a single +5 supply. (Admittedly, I'm not quite positive of the LM311's range, but I think it extended to ground but not to VDD).

I'll probably have to test out my 2600 with a scope to see where I erred in my assumptions.

#50  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sat Apr 7, 2007 10:28 PM

I mulled this problem over a bit during dinner, and here's what I have:

View Postsupercat, on Fri Apr 6, 2007 8:20 PM, said:

The chip is an LM311 which grounds its output when its "+" input is higher than the "-". When the Atari 2600 paddle pin is grounded, the LM311's "-" input will be lower than the "+", so the comparator will ground the output. Thus, only the 1M resistor near the right side of the circuit will charge the 2600's cap.
Is this correct?

I thought a comparator was effectively the opposite of that, and with something like a digital logic output: if the "+" input is above the "-" input, the ouput should be high, and if the "+" input is below the "-" input, the output should be low.

If this is correct, A) the 1k resistor to V+ is unnecessary, and B) as designed, the circuit is operating the oppposite of what you wanted.

EDIT: Checked the datasheet, and I see this comparator has a TTL-style open-collector output, but the operation still seems to be opposite of what you described. In that case, swapping the "+" and "-" inputs should fix it.

Edited by A.J. Franzman, Sat Apr 7, 2007 10:35 PM.


#51  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sat Apr 7, 2007 10:47 PM

Strange, swapping the inputs had no apparent effect.

#52 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Sat Apr 7, 2007 10:57 PM

View PostA.J. Franzman, on Sat Apr 7, 2007 11:28 PM, said:

EDIT: Checked the datasheet, and I see this comparator has a TTL-style open-collector output, but the operation still seems to be opposite of what you described. In that case, swapping the "+" and "-" inputs should fix it.

Many comparators have open-collector outputs. Using an op-amp with an output that could pull high would change the circuit topology somewhat.

Very puzzling that swapping the inputs wouldn't change the circuit behavior. That suggests that perhaps the common-mode range of that comparator doesn't extend to ground and it's operating in the goofy region. I just checked and the LM311 doesn't go to ground either. Hmm... Good rail-to-rail comparators exist, but I don't know offhand what they are.

Try inserting a 220K resistor below the 1M resistor near the right side of the circuit (increasing the total resistance to 1.22M) and wire the comparator input to the junction of the resistors instead of to the 2600 paddle input. Then short out the 1M resistor near the left of the circuit. The change should shift the operational range of the comparator inputs away from ground.

#53  

    Dragonstomper

  • 517 posts
  • Joined: 09-July 01
  • Location:Santa Clara, CA

Posted Sat Apr 7, 2007 11:07 PM

Ok...I got some time to look at this thread again last night. Now I'm posting. :)

Supercat...thanks for the summary. Now I know what is being sought. I agree about the dirty pot. But I don't think the voltage across the pot has to remain constant for jitter-free operation. Isn't it sufficient if there is no current flowing through the wiper?

A.J....I think the idea behind Grover's 2-stage circuit is a constant frequency, variable duty output. (Correct me if I'm wrong Grover!) Using a diode to short the 2nd resistor is a good idea for variable duty, but I'm not sure how the non-linear charging would affect the period. Period isn't super critical in this application (I think), but it's something to consider. Also if you DO attempt it and you want to even approach a constant period, I think you'd need to connect the pot pins to VCC, pin 7, and pin 6/2 in that order to trade off charge time for discharge time. (And the diode points from pin 7 to pin 6/2.)
Of course, now you're back to using a variable resistor instead of a ratioed divider.

I have another question for the group. How closely do you need to match the original RC charging type curve? If you're only using it on new games, it doesn't matter. You can make it behave any way you want and the software authors can deal. But if you want to play Kaboom! with it......?

I think when PWM was mentioned originally, it was so that the original charging characteristics could be matched with either a custom D2A, or in software. That was my understanding at least. If that's not important, I think the LM311 approach isn't bad. Though it needs some TLC to overcome jitter issues. (I built a test circuit last night and the 311 gives a pretty jittery output unless you use a lot of capacitance on the inputs. Both of them. Which means, you lose responsiveness. I don't have a paddle controlled setup to play with, so I was looking at it on a scope. It might be fine when you're actually playing a game. Most well-written paddle games are going to include some jitter "correction" code. I just point this out as something to check.

Also, if you're using the LM311, you might consider driving the cap directly with pin 1. You might get a strange charging curve, but it saves a few components. Here's the circuit I built last night.
Attached Image: untitled.PNG
There's nothing special about the component values...they're what I had lying on the desk, that would give "reasonable" results on paper. I didn't have a 2600 setup to test with, so I suspect you'll want to change the values.

-Chris

#54  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sat Apr 7, 2007 11:55 PM

View Postcwilkson, on Sat Apr 7, 2007 10:07 PM, said:

A.J....I think the idea behind Grover's 2-stage circuit is a constant frequency, variable duty output. (Correct me if I'm wrong Grover!) Using a diode to short the 2nd resistor is a good idea for variable duty, but I'm not sure how the non-linear charging would affect the period.
Here's a circuit I designed a few years ago to do just that, for controlling R/C servos without using a radio control setup: Servo Driver. It delivers pulses of about 0.6 to 2.4 msec at a 20 msec frame rate. The frame rate does vary slightly over the duty cycle range, but that wasn't critical for this application.


View Postcwilkson, on Sat Apr 7, 2007 10:07 PM, said:

Period isn't super critical in this application (I think), but it's something to consider. Also if you DO attempt it and you want to even approach a constant period, I think you'd need to connect the pot pins to VCC, pin 7, and pin 6/2 in that order to trade off charge time for discharge time. (And the diode points from pin 7 to pin 6/2.)
Of course, now you're back to using a variable resistor instead of a ratioed divider.
True, which is exactly what we want to avoid.


View Postcwilkson, on Sat Apr 7, 2007 10:07 PM, said:

I have another question for the group. How closely do you need to match the original RC charging type curve? If you're only using it on new games, it doesn't matter. You can make it behave any way you want and the software authors can deal. But if you want to play Kaboom! with it......?
Yes, we're looking for: full backward compatibility, small simple construction to fit into existing paddle controller cases, and should use the original 1 M ohm pot since that form factor is obsolete and near unobtainium. Also, remember that the timing capacitor is the 68nF (683) mylar that's built into the console, between the TIA pin and ground.


View Postcwilkson, on Sat Apr 7, 2007 10:07 PM, said:

I think when PWM was mentioned originally, it was so that the original charging characteristics could be matched with either a custom D2A, or in software. That was my understanding at least. If that's not important, I think the LM311 approach isn't bad. Though it needs some TLC to overcome jitter issues. (I built a test circuit last night and the 311 gives a pretty jittery output unless you use a lot of capacitance on the inputs. Both of them. Which means, you lose responsiveness. I don't have a paddle controlled setup to play with, so I was looking at it on a scope. It might be fine when you're actually playing a game. Most well-written paddle games are going to include some jitter "correction" code. I just point this out as something to check.
There are no well-written paddle games! Seriously, I don't think there's any jitter-correction code in any of them. In fact, Kaboom! contains a bug which creates a small amount of jitter.


View Postcwilkson, on Sat Apr 7, 2007 10:07 PM, said:

Also, if you're using the LM311, you might consider driving the cap directly with pin 1. You might get a strange charging curve, but it saves a few components. Here's the circuit I built last night.
Attachment attachment
There's nothing special about the component values...they're what I had lying on the desk, that would give "reasonable" results on paper. I didn't have a 2600 setup to test with, so I suspect you'll want to change the values.
Pin 1? That's the negative supply pin! :? What the heck do you mean? And you have the output tied directly to +5 V! Are we reading the same datasheets for the LM311? Also, it looks like the circuit you've drawn uses a 1k pot instead of the normal 1M pot found in the Atari paddle controllers.

#55 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Sun Apr 8, 2007 12:07 AM

View PostA.J. Franzman, on Sun Apr 8, 2007 12:55 AM, said:

Pin 1? That's the negative supply pin! :? What the heck do you mean? And you have the output tied directly to +5 V! Are we reading the same datasheets for the LM311? Also, it looks like the circuit you've drawn uses a 1k pot instead of the normal 1M pot found in the Atari paddle controllers.

I would guess that what's going on here is that the LM311 contains an NPN transistor between pins 1 and 7, which gets switched on when the comparator is "true". The LM311 doesn't particularly care about the relative voltages on pin 1-7; it just switches on a transistor between them.

Rather clever concept if it works, but I've never seen it done before.

Not sure the function of C2, and I'd still be worried about the operation of the comparator near VSS.

Also, the circuit definitely needs something to charge up the paddle input toward the proper threshhold (the function of the 1M resistor near the right side of my schematic).

BTW, was the "jitter" on my circuit constant, or did it only occur when the pot was bumped?

Edited by supercat, Sun Apr 8, 2007 12:09 AM.


#56 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Sun Apr 8, 2007 12:11 AM

View Postcwilkson, on Sun Apr 8, 2007 12:07 AM, said:

Supercat...thanks for the summary. Now I know what is being sought. I agree about the dirty pot. But I don't think the voltage across the pot has to remain constant for jitter-free operation. Isn't it sufficient if there is no current flowing through the wiper?

Perhaps, though when the voltages are constant it is often somewhat helpful to have a capacitor on the input; when voltages are time-varying signals, that is no longer possible. Still, your comment does raise some other intriguing circuit possibilities.

#57  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sun Apr 8, 2007 12:24 AM

Actually, LM311's negative supply is pin 4. Maybe that's why my circuit isn't working right...

#58  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sun Apr 8, 2007 12:35 AM

ACK!

Let's rewind back to post #47 (and forget everything that came from then to now)...

OK, I built supercat's circuit from post #43 using an NTE922M, and a 1nF (102) cap on the non-inverting input and it
WORKS PERFECTLY.
EDIT: Well, not quite, but it does get rid of jitter.

At least, it does now that I have the comparator connected properly. The problem was, supercat's drawing shows only one ground connection for the LM311 / NTE922M, but BOTH pins 1 and 4 need to go to ground in this application. (Hmm, how come these forums don't have an "embarrassed" smiley?)

Using a breadboard and a handful of micro-clip leads, I have opened up a tested and known to be very jittery paddle controller, unsoldered two wires from the pot and connected them, the pot, and the ground wire to supercat's circuit, and now have totally jitter-free paddle control!

Edited by A.J. Franzman, Fri Apr 13, 2007 11:13 PM.


#59  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sun Apr 8, 2007 12:47 AM

I'm running out of time tonight, but this is a fantastic development which needs to be written up as a new topic with a subject like, "Jitter-Proof Your Paddle Controllers FOREVER!"

I'd like to contribute a circuit diagram for the electronically-challenged, as well as some photos and a tutorial, but will probably not be able to get to them until Sunday night.

#60  

    Dragonstomper

  • 517 posts
  • Joined: 09-July 01
  • Location:Santa Clara, CA

Posted Sun Apr 8, 2007 1:52 AM

View PostA.J. Franzman, on Sun Apr 8, 2007 5:55 AM, said:

Yes, we're looking for: full backward compatibility, small simple construction to fit into existing paddle controller cases, and should use the original 1 M ohm pot since that form factor is obsolete and near unobtainium. Also, remember that the timing capacitor is the 68nF (683) mylar that's built into the console, between the TIA pin and ground.
Ahh. So this is *not* a new controller, but a retrofit. Ok, that simplifies some things I guess. And of course complicates others (like forcing one to use a 1MOhm pot as you mention). The timing capacitor is C2 in the pic I drew. I wanted to explicitly include it in the drawing, but I forgot to point that out (and the drawing is crappy too, but I won't talk about that.) I had an errand to run and wanted to post in a hurry.

Quote

There are no well-written paddle games! Seriously, I don't think there's any jitter-correction code in any of them. In fact, Kaboom! contains a bug which creates a small amount of jitter.
I think some of the modern homebrews do that...they had to deal with 25 year old paddles that already suffered from oldage shakes, so they considered it during development. But there's not a lot of it.

Quote

Pin 1? That's the negative supply pin! :? What the heck do you mean? And you have the output tied directly to +5 V! Are we reading the same datasheets for the LM311? Also, it looks like the circuit you've drawn uses a 1k pot instead of the normal 1M pot found in the Atari paddle controllers.
No, pin 1 is the "ground" pin. Pin 4 is the negative supply. And tying the "output" pin to VCC is correct and intentional. (See below.) Yeah, I used a 1k pot because I don't have any 1MOhm pots lying around. Like I said, there was nothing special about the values. And I didn't have an actual machine to test with so I was using a .047uF cap.

View Postsupercat, on Sun Apr 8, 2007 6:07 AM, said:

I would guess that what's going on here is that the LM311 contains an NPN transistor between pins 1 and 7, which gets switched on when the comparator is "true". The LM311 doesn't particularly care about the relative voltages on pin 1-7; it just switches on a transistor between them.
Rather clever concept if it works, but I've never seen it done before.
That's exactly right. There's at least one small resistor in the path, but the output stage is basically a switch. What I'm doing is creating an emitter follower. It's pretty common when driving ground-referred loads with an LM311.
(Note that here I created a high output impedance to protect the TIA....that's unusual.)

Quote

Not sure the function of C2, and I'd still be worried about the operation of the comparator near VSS.
See above about C2. It's meant to be the one inside the 2600. Things worked fine for me. But it's really moot without being able to test with a real TIA. And I'm too lazy to write test code right now. :) If it needs adjustment, the you can add a series reistor below the pot. That's why the 10k resistor is there, BTW. To adjust the voltage range of the pot downward.

Quote

Also, the circuit definitely needs something to charge up the paddle input toward the proper threshhold (the function of the 1M resistor near the right side of my schematic).
That's what the 1k resistor is doing (and the internal E-F stage).

Quote

BTW, was the "jitter" on my circuit constant, or did it only occur when the pot was bumped?
Didn't actually build that one. I was short of components.

View Postsupercat, on Sun Apr 8, 2007 6:11 AM, said:

Perhaps, though when the voltages are constant it is often somewhat helpful to have a capacitor on the input; when voltages are time-varying signals, that is no longer possible. Still, your comment does raise some other intriguing circuit possibilities.
Yeah, I actually built a current source to mimic the current flowing into the cap in a normal setup. It worked great. But then I started to test your suggested circuit, found a critical shortage of parts, and then went off on some tangents of my own. :) The circuit that I mentioned with jitter was a hybrid, of what you posted and what I posted. I wouldn't worry about it too much. I will say this: there was no jitter visible to the naked eye in my first solution (not published yet).

-Chris

#61  

    Dragonstomper

  • 517 posts
  • Joined: 09-July 01
  • Location:Santa Clara, CA

Posted Sun Apr 8, 2007 2:00 AM

Oh, yeah...
Yes, I'm sure we're all looking at the same data sheet. I suggest every take a look at the schematic for the chip. It's helpful. Also, I missed this before, but there's an example of driving a ground-referred load right on the datasheet. Hmm, looking again I don't see mention of the common mode input range. Where did you see that? Looking at the schematic, the CM range clearly extends to (below actually) the negative supply.
So there shouldn't be any problems there.

So how well does the paddle range match a stock controller? Supercat's circuit certainly doesn't produce the same voltage curves. Is it acceptable?

-Chris

#62  

    Dragonstomper

  • 517 posts
  • Joined: 09-July 01
  • Location:Santa Clara, CA

Posted Sun Apr 8, 2007 2:33 AM

View Postcwilkson, on Sun Apr 8, 2007 8:00 AM, said:

Looking at the schematic, the CM range clearly extends to (below actually) the negative supply.
I'm an idiot. No it doesn't. And I knew that last night, when I was actually measuring the low end in the lab. going to sleep now.

#63 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Sun Apr 8, 2007 12:32 PM

View PostA.J. Franzman, on Sun Apr 8, 2007 1:35 AM, said:

Using a breadboard and a handful of micro-clip leads, I have opened up a tested and known to be very jittery paddle controller, unsoldered two wires from the pot and connected them, the pot, and the ground wire to supercat's circuit, and now have totally jitter-free paddle control!

Glad it seems to work well. Sorry I forgot about the split-ground issue.

Does the 1nF cap make any difference, or could it be Muntzed? How is the pot range? Is the 1M resistor tied in with the pot about right? How does the thing "feel" with that resistor eliminated? Coult it be Muntzed too, or would the pot be too touchy (bearing in mind that the reduced jitter would make greater pot sensitivity acceptable)?

If the circuit can be reworked to avoid the diode but the range-setting resistor is needed, the whole thing would boil down to one eight-pin DIP and three resistors. Probably about a 0.75"x0.5" board.

#64 ONLINE  

    Quadrunner

  • 6,366 posts
  • Joined: 01-June 05

Posted Sun Apr 8, 2007 12:33 PM

View Postcwilkson, on Sun Apr 8, 2007 2:52 AM, said:

That's what the 1k resistor is doing (and the internal E-F stage).

Internal E-F stage? I can see that the 1K resistor would charge the cap once the comparator fires, but what's going to charge it up to that point? Does the emitter of the output transistor leak current even when the comparator hasn't fired? I wouldn't think that could be very well relied upon.

#65  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sun Apr 8, 2007 9:37 PM

View PostA.J. Franzman, on Sat Apr 7, 2007 11:47 PM, said:

I'm running out of time tonight, but this is a fantastic development which needs to be written up as a new topic with a subject like, "Jitter-Proof Your Paddle Controllers FOREVER!"

I'd like to contribute a circuit diagram for the electronically-challenged, as well as some photos and a tutorial, but will probably not be able to get to them until Sunday night.


View Postsupercat, on Sun Apr 8, 2007 11:32 AM, said:

View PostA.J. Franzman, on Sun Apr 8, 2007 1:35 AM, said:

Using a breadboard and a handful of micro-clip leads, I have opened up a tested and known to be very jittery paddle controller, unsoldered two wires from the pot and connected them, the pot, and the ground wire to supercat's circuit, and now have totally jitter-free paddle control!
Glad it seems to work well. Sorry I forgot about the split-ground issue.

Does the 1nF cap make any difference, or could it be Muntzed? How is the pot range? Is the 1M resistor tied in with the pot about right? How does the thing "feel" with that resistor eliminated? Coult it be Muntzed too, or would the pot be too touchy (bearing in mind that the reduced jitter would make greater pot sensitivity acceptable)?

If the circuit can be reworked to avoid the diode but the range-setting resistor is needed, the whole thing would boil down to one eight-pin DIP and three resistors. Probably about a 0.75"x0.5" board.
I wanted to post this about 1:30 pm today, but my internet connection took a dive as I was loading this topic page and has been down all afternoon:
I jumped the gun a bit about the circuit working perfectly. It does eliminate all fast jitter, but creates a slow drift/oscillation whose source I have not yet been able to identify. The paddle position in Video Olympics Game 1 drifts unsteadily up and down about 10% of the available playfield height over a period of several seconds. Although this degree of drift has almost no effect during fast action gameplay, it is frustrating when trying to catch a slow-moving ball exactly on the edge of the paddle and the paddle drifts away or directly in front of the ball.

Things I have tried to eliminate the drift: I measured the voltage at comparator pin 2 (non-inverting input) and it was stable within 1 mV while I watched the paddle drift up and down the screen, so that's not the problem. I tried several different diodes, as well as 1% or 2% resistors in place of each of the 1k and 1M resistors (one at a time, haven't tried all three at once yet). I tried eliminating the 1nF cap, but all that did was add a small amount of jitter -- the drift remained the same. I also put a bypass capacitor across the comparator's power supply but unsurprisingly that didn't help.

Other than this issue, the pot range with the series 1M resistor per your drawing is similar to the original unmodified range.

I have a couple of ideas I'd like to try to eliminate the drift; will report again later.

Edited by A.J. Franzman, Sun Apr 8, 2007 9:54 PM.


#66  

    Dragonstomper

  • 517 posts
  • Joined: 09-July 01
  • Location:Santa Clara, CA

Posted Sun Apr 8, 2007 9:53 PM

View Postsupercat, on Sun Apr 8, 2007 6:33 PM, said:

View Postcwilkson, on Sun Apr 8, 2007 2:52 AM, said:

That's what the 1k resistor is doing (and the internal E-F stage).

Internal E-F stage? I can see that the 1K resistor would charge the cap once the comparator fires, but what's going to charge it up to that point? Does the emitter of the output transistor leak current even when the comparator hasn't fired? I wouldn't think that could be very well relied upon.


Sorry, I misunderstood....I thought you meant after the comparator trips. I've had about....zero sleep for the last few days. I was drawing the schematic from memory. I'm home now, and it's entirely different. I switched the inputs by mistake in the drawing. But yeah, I was using internal paths for current. I'd say not the output switch leakage, but mostly through Q11 (and Q12) and the resistor chain. You also get the cap charging by the current flowing out of pin 3. Of course, that's only 60 nA so by itself it would take about 2 seconds for the slowest pot setting. Heehee.

Anyway, if all that's needed is a charging circuit that's pretty linear (as opposed to the original exponential) then I think you have a nice simple circuit. But you do need to get a better comparator. Or you could probably just use a nice rail-rail opamp in open-loop configuration. That's probably what I'd do. I think you still need the output diode.

What is "Muntzed"?

-Chris

#67  

    River Patroller

  • 4,326 posts
  • Joined: 24-January 05
  • Syzygyst
  • Location:U.S.A. - See 'Map' link above

Posted Sun Apr 8, 2007 10:01 PM

View Postcwilkson, on Sun Apr 8, 2007 8:53 PM, said:

What is "Muntzed"?
From Earl "Madman" Muntz, a southern California entrepreneur of the 1950s. He sold cars in competition with Detroit's "Big Three", electronics, and probably was into several other ventures.

The verb "to Muntz" comes from his electronics ventures, in which he mercilessly slashed component counts (and quality) to the greatest possible degree to save every available cent of manufacturing cost. Since his marketplace was largely confined to within a few miles of downtown Los Angeles, his television receiver circuits were hacked to such a degree that taking one out to the then sparsely-populated suburbs a bit further from the antenna farm on Mt. Wilson would render it useless.

Front panel control knobs often operated trimpots (not designed for frequent adjustment) by long plastic shafts, rather than being mounted directly on standard control pots. Naturally, these arrangements led to early failures and him eventually getting the poor reputation he richly deserved.

Edited by A.J. Franzman, Sun Apr 8, 2007 10:08 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users