Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: I was looking at some parts the other day...  (Read 3185 times)

0 Members and 1 Guest are viewing this topic.

morton

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 336
  • Last login:July 23, 2021, 09:36:59 am
  • I want to build my own arcade controls!
I was looking at some parts the other day...
« on: June 25, 2017, 10:32:31 am »
... and wondered, if a single encoder and shaft from an Imperial trackball and the inside of a spinner were the same? I have access to busted trackballs that have bad bits, but the encoders and such seem to be in good condition. I haven't considered a spinner before, but I am always trying to find a way to reuse old bits around the house for a project. Any tips are appreciated. Thanks.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9397
  • Last login:Today at 03:15:12 am
  • Designated spam hunter
Re: I was looking at some parts the other day...
« Reply #1 on: June 25, 2017, 12:09:20 pm »
... and wondered, if a single encoder and shaft from an Imperial trackball and the inside of a spinner were the same?
Yes.  A trackball is essentially two spinners mounted at a right angle to each other.

Both trackballs and spinners have optical boards that output quadrature waveforms.

I have access to busted trackballs that have bad bits, but the encoders and such seem to be in good condition.
By "encoders", I assume that you are actually referring to the optical boards (output to a Molex harness), not the optical encoder that translates quadrature waveforms into mouse movements. (output to USB or PS/2)

If you want to interface the optical boards from your trackball to USB, check out either GGG's Opti-Wiz or StephanBurger's Illuminated Spinner firmware for Arduino ProMicro. (firmware hex file is under the "Thing Files" tab at the Thingiverse link in the OP, load it using Arduino Builder)


Scott

KenToad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1500
  • Last login:Yesterday at 02:14:24 pm
  • Flap Flap Flap
Re: I was looking at some parts the other day...
« Reply #2 on: June 26, 2017, 05:40:49 pm »
I think he means encoder wheel, the part that spins, with the teeth.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9397
  • Last login:Today at 03:15:12 am
  • Designated spam hunter
Re: I was looking at some parts the other day...
« Reply #3 on: June 26, 2017, 10:43:53 pm »
I think he means encoder wheel, the part that spins, with the teeth.
Yeah.  Gotta' have one of those, too.   ;D


Scott

jimmer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 561
  • Last login:March 17, 2024, 06:03:11 pm
  • I want to play Defender like at the arcade.
Re: I was looking at some Rotary Encoder parts the other day...
« Reply #4 on: October 21, 2018, 11:40:47 am »
Calling PL1 or anyone else.

I've previously built a tempest style spinner with a diy opto board linked to a ProMicro. All the opto board had on it was the sensors and a current limiting resistor.

Now I'm thinking of getting some opto PCBs made for trackballs. When I look at the red opto boards from Happ and how much stuff is on there, I'm just slightly worried that I'm missing something!  What does anyone think ?

I'll be using standard resolution wheels like this:
 

On forums jimmer speaks for himself as a Defender fan, not as proprietor of www.jbgaming.co.uk  << Is that advertising or disclosure ? or both ?

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9397
  • Last login:Today at 03:15:12 am
  • Designated spam hunter
Re: I was looking at some Rotary Encoder parts the other day...
« Reply #5 on: October 21, 2018, 12:58:23 pm »
I've previously built a tempest style spinner with a diy opto board linked to a ProMicro. All the opto board had on it was the sensors and a current limiting resistor.

Now I'm thinking of getting some opto PCBs made for trackballs. When I look at the red opto boards from Happ and how much stuff is on there, I'm just slightly worried that I'm missing something!  What does anyone think ?
Long story short:  Why rei-nvent the wheel?

It's almost impossible to match the quality of the Happ Red Boards with a home-engineered board.

- You have to get optos with the correct spacing for the encoder wheel.


- You have to select the right components for a fast response time for the leading and trailing edge transitions of the quadrature waveform.
-- Slow response reduces the time for the encoder to identify the transition from one phase to the next = more chance of backspin.

- You have to get the physical spacing and position right for the optos and wheel.

IMHO, it's probably not worth the R&D effort to design a replacement for the Red Board but YMMV.   :dunno


Scott

jimmer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 561
  • Last login:March 17, 2024, 06:03:11 pm
  • I want to play Defender like at the arcade.
Re: I was looking at some parts the other day...
« Reply #6 on: October 21, 2018, 02:14:46 pm »

It's just a cost thing, unless someone can point me somewhere else they were something like $12 ea from Happ, which adds up to about $30 per trackball with shipping and tax.

For my first batch of 4.5" trackballs I just bought chinese 3" trackballs and used all the innards. That worked out about £50 ($65) per trackball.   It should be more like $20.



My tempest style spinners worked fine and I don't think the pulse rate will be any faster on the trackball. I didn't actually do any testing of what pulse rate it could handle (I would do some before I order opto pcbs). I'm playing with my encoder software now, so I'll just measure the trackball pulse rate. Back in a bit :)


On forums jimmer speaks for himself as a Defender fan, not as proprietor of www.jbgaming.co.uk  << Is that advertising or disclosure ? or both ?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: I was looking at some parts the other day...
« Reply #7 on: October 21, 2018, 02:31:50 pm »
The electronic components of the pcbs aren't super important, only the spacing of the optic sensors.  I know this because the super old imperial and wico pcbs just have a pair of sensors and a resistor and that's it.  Personally if I were going to make a batch of pcbs I would look to the older ones as they have larger traces and less components so they'd be easier to make.  Hell I've just made them on perf board before they are so simple. 

jimmer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 561
  • Last login:March 17, 2024, 06:03:11 pm
  • I want to play Defender like at the arcade.
Re: I was looking at some parts the other day...
« Reply #8 on: October 21, 2018, 02:58:53 pm »
Exactly Howard, I'm just checking that I'm not missing something.  I can build a prototype with the sensor that I choose to test the speed. Or I suppose if I understand it the spec sheet will tell me.

I just measured my 4.5" trackball using 'standard' 3" internals. Spinning it fast and Marble Madness style, I was getting up to around 4000 interrupts per second  (that's pulse edges for 2 channels combined). So that's 1000 hz on each channel.

Now I reckon I span my tempest at up to 20 revs/s  x72 slots = 1440 hz (pulses per second) so my previous naked opto board seems like it would  be OK for the trackball. With unknown headroom as I never tested max speed.  Only thing is I want slightly smaller sensors than I used on the spinner, so need to compare the specs.

Anyway, I think I have my answer, it's doable if I want to.
 
 
« Last Edit: October 21, 2018, 03:00:32 pm by jimmer »
On forums jimmer speaks for himself as a Defender fan, not as proprietor of www.jbgaming.co.uk  << Is that advertising or disclosure ? or both ?

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9397
  • Last login:Today at 03:15:12 am
  • Designated spam hunter
Re: I was looking at some parts the other day...
« Reply #9 on: October 21, 2018, 04:25:00 pm »
If you encounter backspin and want to test whether it's caused by the optical circuit or the encoder, test the optical circuit using StefanBurger's Illuminated Spinner firmware on an Arduino Pro Micro.
Unfortunately I have no high-resolution spinner for testing.
But I share the firmware sketch for evalution and adaption.
Good news!  I figured out how to test your hex firmware (D/L'd from Thingiverse) with a Pro Micro, a TT2, and 4 or 5 jumper wires.   ;D

Even better news!  No matter how hard/fast I spun it, there was no sign of any backspin at any speed in either direction on either axis.   :applaud:
LMK if you'd like me to test your encoder firmware with a TT2.   :cheers:

The electronic components of the pcbs aren't super important, only the spacing of the optic sensors.  I know this because the super old imperial and wico pcbs just have a pair of sensors and a resistor and that's it.  Personally if I were going to make a batch of pcbs I would look to the older ones as they have larger traces and less components so they'd be easier to make.  Hell I've just made them on perf board before they are so simple. 
I agree that the simple circuits work in most cases, but there are many reports of backspin when using older Happ Green Boards. (P/N A052-1010)

I hope he can build a simple optical circuit like StefanBurger's that doesn't have problems with backspin.   ;D


Scott

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: I was looking at some parts the other day...
« Reply #10 on: October 21, 2018, 04:51:45 pm »
I've built spinners that use the old trackball pcbs and I've never ran into a backspin issue.  I mean I guess you could, but I haven't and I've built a few over the years.  I really need to do a how-to on that one of these days.  Spinners are easy to make, it's finding a good knob that seems to be the challenge. 

jimmer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 561
  • Last login:March 17, 2024, 06:03:11 pm
  • I want to play Defender like at the arcade.
Re: I was looking at some parts the other day...
« Reply #11 on: October 21, 2018, 05:12:09 pm »
LMK if you'd like me to test your encoder firmware with a TT2.   :cheers:

I started with stefan's code, here's a modification that's not at all necessary, but it speeds up the interrupt routine from about 8us to about 1us, add 2us for the interrupt means 10us to 3us. Therefore 3 times faster.

Quote
void doABmove() {  //  roller 1 is moving
  byte PortreadD = PIND;
  boolean A = boolean(PortreadD & 0b00001000);  // pin PD3
  boolean B = boolean(PortreadD & 0b00000100);  // pin PD2
  if((oldA!=oldB && B!=oldB)||(oldA==oldB && A!=oldA)) {
     intX = intX +incX;
   } else {
     intX = intX -incX;
   }
  oldA=A;
  oldB=B;
}


I did a lot of learning this weekend in order to get a trackball and a spinner onto a ProMicro (Because it only has 5 External Interrupts.) The libraries for Pinchange interrupts don't work with external interrupts so I had to do them directly.

I've managed to test my SpinTrak at 125 rev/s ! which is as fast as I could spin it without snapping the cotton. ;D



« Last Edit: October 21, 2018, 05:22:01 pm by jimmer »
On forums jimmer speaks for himself as a Defender fan, not as proprietor of www.jbgaming.co.uk  << Is that advertising or disclosure ? or both ?

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9397
  • Last login:Today at 03:15:12 am
  • Designated spam hunter
Re: I was looking at some parts the other day...
« Reply #12 on: October 21, 2018, 06:25:22 pm »
Nice performance boost.   :applaud:   :notworthy:


Scott