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: Illuminated Arcade Spinner  (Read 10154 times)

0 Members and 1 Guest are viewing this topic.

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Illuminated Arcade Spinner
« on: January 07, 2017, 06:30:53 am »
Hi there,

finished design, assambly, firmware coding and testing of the DIY Illuminated Arcade Spinner and release the files on Thingiverse:
http://www.thingiverse.com/thing:2021152

Instruction video will follow soon.

Regards
Stefan

BTW: Illumination turned out to work great. Used 5mm NeoPixels for animated colors (but any type of 5mm LED can be used).

processedmeat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 245
  • Last login:March 18, 2024, 06:49:22 pm
  • Ikeakade Here I come!
Re: Illuminated Arcade Spinner
« Reply #1 on: January 07, 2017, 12:48:17 pm »
Looks great.  2 questions:

What thickness of panel did you design this for?

If I wanted multiple spinners would you recommend an arduino for each one or do you think it would be possible to connect multiple spinners to one (obviously changing the sketch of course).

Thanks

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #2 on: January 08, 2017, 07:42:16 am »
Hi,

I designed it for panel thickness of 6mm (approx 1/4 inch) with +-1.5mm tollerance.
For significant different thickness, the shafts of tospin_knob.stl and tospin_flywheel.stl need to be adapted (not a big deal).
In case of thinner panels (e.g. 3mm) some spacing layer between the panel downside and tospin_base.stl can also work.

About mulitple spinners:
For each spinner needs two external interrupt IO pins (a special kind of IO pin that is quite rare on the arduino).
The Arduino Pro Micro has 5 of them where 2 are on the serial pins 0 and 1 and shoul not be used.
Which leaves just 3, not enough for a second spinner.

But that arduino is relatively cheap (3 € at AliExpress for example) I wouldn't waste hours of time just to save 3 €.

Regard
Stefan

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #3 on: January 09, 2017, 09:34:11 am »
This is a cool DYI project. How does it work and can you post a video?

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #4 on: January 09, 2017, 04:02:41 pm »
Hi,

I'm in the middle of creating an video with build instructions.

But in the meanwhile, you might want to watch that short demo:


You can see how nicely the wheel spins and how reactive the software performs on that input.
Due to the dark envirenment you can also see how nicely the illumination turns out.

I'm very happy with the result.
It's quite nice to see that the whole design, build and programming within only one week with just 10€ budget turned out.

How it works?
The knob is connected along the middle axis to a combined fly-wheel/ encoder-while. When spinning, the encoder wheel on the downside (hidden inside the controller housing) triggers two optical sensors that count the interruptions of light by the passing toothes of the encoder wheel. Those counts are passed over USB connection to the host computer as mouse input.
When you watch the video closely, you can see the toothes of the encoder wheel spinning.

Regard
Stefan

pbj

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10871
  • Last login:Today at 09:00:13 am
  • Obey.
    • The Chris Burke Band
Re: Illuminated Arcade Spinner
« Reply #5 on: January 09, 2017, 04:17:13 pm »
That looks pretty cool.  Are you going to sell them?

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #6 on: January 09, 2017, 04:22:00 pm »
That wasn't my intention.

What would you say is a reasonable price?

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:42:27 am
Re: Illuminated Arcade Spinner
« Reply #7 on: January 10, 2017, 12:51:13 am »
I had not the chance to read the code, but as far as you are not using the serial comunication, you can use pins 0 and 1 without problems.
Interrupts are not necessary in old 30 fps games: i would bet your code run in way less than 33ms ;)

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #8 on: January 10, 2017, 02:24:17 am »
That video is sick.

If I had access to a 3D printer I would probably be making one right now.

I don't know if it would be worth your time to sell them due to all the printing time. It may make sense to sell a kit and have people do there own printing.  :dunno

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #9 on: January 10, 2017, 05:18:17 pm »
Hi,

inspired by the posts of processedmeat and baritonomarchetto I redesigned the spinner shield (hand soldered pcb) and rewritten the firmware.

Now it is possible to connect two spinners to one arduino controllers.
Both connected spinners can be configured independently to affect either the X-axis or the Y-axis by just setting or removing a jumper on pin headers.
All combinations are possible (spinner A on X and spinner B on X, spinner A on Y and spinner B on Y, spinner A on X and spinner B on Y, spinner A on Y and spinner B on X);

Of course its still possible to only connect one spinner.

By having that feature the new controller/ firmware can also be used for track balls.

According to the tech specs, the controller should be compatible with Ultimarcs U-Track and SpinTrack.

As additional option I implemented another pin header to control NeoPixels that might be installad inside the spinners.
While the firmware for motion control is already done, I didn't had an idea on how to animate the NeoPixel color/intensity.

Do you have any ideas regarding the light animation?

Here are some pics:

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:42:27 am
Re: Illuminated Arcade Spinner
« Reply #10 on: January 11, 2017, 12:17:53 am »
May I suggest you to avoid jumpers with arduino and put notes in the code instead? I can see the shield approach, but keep in mind that the nicest thing of arduino is that anyone can easily tune the sketch to best fit the personal need
AND
the less (code), the best (speed).
Very good work and thanks for sharing

thatpurplestuff

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 667
  • Last login:Today at 12:19:42 am
Re: Illuminated Arcade Spinner
« Reply #11 on: January 11, 2017, 12:39:16 am »
incredible!  very cool project

So once again, we find that evil of the past seeps into the present like salad dressing through cheap wax paper, mixing memory and desire.

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #12 on: January 11, 2017, 02:48:13 am »
If I find a 3D printer service near me I am so building this.

Would you mind sharing your code so we and have a look?

Isn't it at the link in first post?

Yes it is. My bad.
« Last Edit: January 11, 2017, 03:07:11 am by Locke141 »

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:42:27 am
Re: Illuminated Arcade Spinner
« Reply #13 on: January 11, 2017, 02:55:50 am »
Isn't it at the link in first post?

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #14 on: January 16, 2017, 01:51:44 pm »
Did another demo video that demonstrates the supported second spinner and (maybe more interesting) the color animation of the NeoPixels that I implemented into the firmware:


Have tons of video footage for instructions that I need to edit now.

Regards
Stefan

PS: printed the spinner knob in high quality and applied some sanding for smooth and shiny surface

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:42:27 am
Re: Illuminated Arcade Spinner
« Reply #15 on: January 16, 2017, 03:34:32 pm »
Very nice light effect!

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #16 on: January 16, 2017, 06:48:57 pm »
That looks cool.

I just ordered my parts and picked the printer part I orders locally.

matsadona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 760
  • Last login:October 28, 2023, 06:00:12 am
Re: Illuminated Arcade Spinner
« Reply #17 on: January 17, 2017, 05:42:03 am »
This is really cool. Having both a 3D printer and a pile of unused Arduinos I really don't have any excuses for not doing a spinner based project now :) Thanks!
Building, collecting and playing arcade machines :)

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #18 on: January 17, 2017, 02:08:51 pm »
@Locke141: that looks like a nice print quality.
@matsadona: be aware that it must be an arduino based upon ATMEGA32u4 (otherwise it will not work as USB Mouse, which makes it quite useless)

In the meantime I finished the build instructions (sorry for bad audio and lousy translation)


Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #19 on: January 17, 2017, 10:11:33 pm »
Yea, I was very happy with it but for $16 it better be good. I really need to get a printer. On the pulse side now that I have ordered from the guy next time I can email him directly and not have to pay 3Dhub a cut. Also all the other parts I ordered for this build, except for the arid ardunio, came in 10 peas sets. He said he would give me a substanchel discount if I order 9 more of the same job. I don't need 10 spinners right now but it's an option.

After doing some reading on the ATMEGA32u4 it seems to be a very cheep way to do a keyboard incoder, cheeper then kade.https://www.sparkfun.com/tutorials/337
« Last Edit: January 17, 2017, 11:13:05 pm by Locke141 »

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #20 on: January 17, 2017, 10:57:13 pm »
...
After doing some reading on the ATMEGA32u4 it seems to. E a very cheep way to do a keyboard interface, cheeper then kade. https://www.sparkfun.com/tutorials/337

yep! 3€ for a keyboard encoder is not so bad at all.
already did it. some sample code, just modify the struct km[] (io-pin assigned to key-stroke):

Code: [Select]
#include <Keyboard.h>

typedef struct keymp {
  int iopin;
  int key;
  int statcur;
  int statold;
  unsigned long lastchng;
};

#define keynum 16

struct keymp km[] = {
  { 2, KEY_UP_ARROW },     //joystick up
  { 3, KEY_DOWN_ARROW },   //joystick down
  { 4, KEY_LEFT_ARROW },   //joystick left
  { 5, KEY_RIGHT_ARROW },  //joystick right
  { 6, KEY_LEFT_CTRL },    //button 1
  { 7, KEY_LEFT_ALT },     //button 2
  { 8, ' ' },              //button 3
  { 9, KEY_LEFT_SHIFT },   //button 4
  {10, 'Z' },              //button 5
  {16, 'X' },              //button 6
  {14, '5' },              //credit
  {15, '1' },              //player 1 start
  {18, '2' },              //player 2 start
  {19, KEY_TAB },          //menu
  {20, 'P' },              //pause
  {21, KEY_ESC }           //exit
};

void setup() {
  // put your setup code here, to run once:
  for (int x=0; x<keynum; x++){
    pinMode(km[x].iopin, INPUT_PULLUP);
    digitalWrite(km[x].iopin, HIGH);
    km[x].statold = HIGH;
    km[x].statcur = HIGH;
    km[x].lastchng = millis();
  }
  Keyboard.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
  for (int x=0; x<keynum; x++) {
    km[x].statcur = digitalRead(km[x].iopin);
    if (km[x].statcur != km[x].statold and (millis()-km[x].lastchng)>=20) {
      if (km[x].statcur==LOW) {
        Keyboard.press(km[x].key);
      } else {
        Keyboard.release(km[x].key);
      }
      km[x].statold = km[x].statcur;
      km[x].lastchng = millis();
    }
  }
}

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Yesterday at 02:42:27 am
Re: Illuminated Arcade Spinner
« Reply #21 on: January 18, 2017, 12:43:50 am »
I made a full PC to Jamma encoder with arduino and a video amp, with >15khz video block function... I mean, a perfectly working 25 dollars Jpac. I must have to find a couple of free hours to translate the topic from Italian to English , but you can take a lookin the meantime (code included)

http://www.arcademania.eu/viewtopic.php?t=710

Just to say how powerful this arduino things are.
« Last Edit: January 18, 2017, 12:46:42 am by baritonomarchetto »

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #22 on: January 18, 2017, 11:00:39 am »
That sounds cool,

NASA used to use micro controllers as the brains of space probes like ICE3, so there is clearly lots that can be done with them.

I wonder if these ATMEGA32U4 are compatible with the KADE soft ware? They used the ATMEGA32U2 chip set.

Edit: So it looks like Scott answered this one already, it takes some work.
http://forum.arcadecontrols.com/index.php/topic,134781.0.html
« Last Edit: January 18, 2017, 11:52:14 am by Locke141 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9393
  • Last login:Today at 11:02:41 am
  • Designated spam hunter
Re: Illuminated Arcade Spinner
« Reply #23 on: January 18, 2017, 12:39:07 pm »
I wonder if these ATMEGA32U4 are compatible with the KADE soft ware? They used the ATMEGA32U2 chip set.
Not sure if you'd need to recompile the firmwares for 32u4 or if the32u2 firmwares would work as-is.   :dunno

IIRC, trackballs work with the KADE optical firmwares, but there are several unresolved KADE bug reports of backspin when using high-resolution spinners. (Arkanoid, TT2, Spin-Trak, etc.)

According to the tech specs, the controller should be compatible with Ultimarcs U-Track and SpinTrack.
Has anyone tested StefanBurger's Arduino sketch for backspin with a high-resolution spinner?

It would be great news if his sketch works even better than KADE.   ;D


Scott

scubajoe

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:January 03, 2018, 09:30:56 am
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #24 on: January 18, 2017, 02:07:07 pm »
I am putting my parts order together and there are many options for 180ohm resisters. 1/8w, 1/4w, 1w, 2w, 3w...... what did you use?

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9393
  • Last login:Today at 11:02:41 am
  • Designated spam hunter
Re: Illuminated Arcade Spinner
« Reply #25 on: January 18, 2017, 03:31:04 pm »
I am putting my parts order together and there are many options for 180ohm resisters. 1/8w, 1/4w, 1w, 2w, 3w...... what did you use?
His build pictures above show 1/4w resistors.

There won't be enough current flow through the optos to require the heat dissipation of a 1w or greater resistor.
(Watts = Volts * Amps)


Scott

scubajoe

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:January 03, 2018, 09:30:56 am
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #26 on: January 18, 2017, 03:32:38 pm »
Thank you for the assist.

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #27 on: January 18, 2017, 03:43:14 pm »
I wonder if these ATMEGA32U4 are compatible with the KADE soft ware? They used the ATMEGA32U2 chip set.
Not sure if you'd need to recompile the firmwares for 32u4 or if the32u2 firmwares would work as-is.   :dunno

IIRC, trackballs work with the KADE optical firmwares, but there are several unresolved KADE bug reports of backspin when using high-resolution spinners. (Arkanoid, TT2, Spin-Trak, etc.)

According to the tech specs, the controller should be compatible with Ultimarcs U-Track and SpinTrack.
Has anyone tested StefanBurger's Arduino sketch for backspin with a high-resolution spinner?

It would be great news if his sketch works even better than KADE.   ;D


Scott

Unfortunately I have no high-resolution spinner for testing.
But I share the firmware sketch for evalution and adaption.
Code: [Select]
// ToSpin 2.0 firmware, 2017 by Stefan Burger (aka "ToS")

#include <Adafruit_NeoPixel.h>
#include <Mouse.h>

#define pinA1 0   //Paddle A, Sensor 1
#define pinA2 1   //Paddle A, Sensor 2
#define pinB1 2   //Paddle B, Sensor 1
#define pinB2 3   //Paddle B, Sensor 2
#define pinAc 7   //Paddle A, Config X/Y
#define pinBc 8   //Paddle B, Config X/Y
#define pinNP 5   //NeoPixel
#define faktor 3  //multiplier counts to mouse-move
#define msanim 60 //update frequenzy for neopix animation

Adafruit_NeoPixel np = Adafruit_NeoPixel(2, pinNP, NEO_RGB + NEO_KHZ400);

long cntX=0; //counter for mouse X-axis
long cntY=0; //counter for mouse Y-axis
long cntA=0; //counter for paddle A neopix animation
long cntB=0; //counter for paddle B neopix animation
int oldAC1=0;
int oldAC2=0;
int oldBC1=0;
int oldBC2=0;

long lastcntX;
long lastcntY;
long lastcntA;
long lastcntB;
int currA1;
int currA2;
int currB1;
int currB2;
int isAY;
int isBY;

long mslastA;
long mslastB;
 
void setup() {
  pinMode(pinA1, INPUT_PULLUP);
  pinMode(pinA2, INPUT_PULLUP);
  pinMode(pinB1, INPUT_PULLUP);
  pinMode(pinB2, INPUT_PULLUP);
  pinMode(pinAc, INPUT_PULLUP);
  pinMode(pinBc, INPUT_PULLUP);
  digitalWrite(pinA1, HIGH);
  digitalWrite(pinA2, HIGH);
  digitalWrite(pinB1, HIGH);
  digitalWrite(pinB2, HIGH);
  isAY=digitalRead(pinAc);
  isBY=digitalRead(pinBc);
  cntX=0;
  cntY=0;
  lastcntX=cntX;
  lastcntY=cntY;
  lastcntA=cntA;
  lastcntB=cntB;
  attachInterrupt(digitalPinToInterrupt(pinA1),changeA1,CHANGE);
  attachInterrupt(digitalPinToInterrupt(pinA2),changeA2,CHANGE);
  attachInterrupt(digitalPinToInterrupt(pinB1),changeB1,CHANGE);
  attachInterrupt(digitalPinToInterrupt(pinB2),changeB2,CHANGE);
  np.begin();
  np.show();
  mslastA=millis();
  mslastB=millis();
  Mouse.begin();
}

void loop() {
  //send mouse update to usb
  if(cntX!=lastcntX || cntY!=lastcntY){
    Mouse.move((cntX-lastcntX)*faktor,(cntY-lastcntY)*faktor);
    lastcntX=cntX;
    lastcntY=cntY;
  }

  //neopix animation for paddle B - abs(cntB-lastcntB) -> absolut number of counts since last neopix animation update -> speed indicator
  if(cntB!=lastcntB && (millis()-mslastB)>=msanim) {
    np.setPixelColor(0,min(255,abs(cntB-lastcntB)*9),0,max(0,(255-(abs(cntB-lastcntB)*9))));
    np.show();
    lastcntB=cntB;
    mslastB=millis();
  }

  //neopix animation for paddle A
  if(cntA!=lastcntA && (millis()-mslastA)>=msanim) {
    np.setPixelColor(1,min(255,abs(cntA-lastcntA)*9),0,max(0,(255-(abs(cntA-lastcntA)*9))));
    np.show();
    lastcntA=cntA;
    mslastA=millis();
  }
}

void changeA1() {
  if(isAY) {
    doACountY();
  } else {
    doACountX();
  }
}
void changeA2() {
  if(isAY) {
    doACountY();
  } else {
    doACountX();
  }
}
void changeB1() {
  if(isBY) {
    doBCountY();
  } else {
    doBCountX();
  }
}
void changeB2() {
  if(isBY) {
    doBCountY();
  } else {
    doBCountX();
  }
}

void doACountX() {
  int actAC1=digitalRead(pinA1);
  int actAC2=digitalRead(pinA2);
 
  if(actAC1!=oldAC1 || actAC2!=oldAC2) {
     if((oldAC1!=oldAC2 && actAC2!=oldAC2)||(oldAC1==oldAC2 && actAC1!=oldAC1)) {
       cntX--;
       cntA--;
     } else {
       cntX++;
       cntA++;
     }

    oldAC1=actAC1;
    oldAC2=actAC2;
  }
}
void doACountY() {
  int actAC1=digitalRead(pinA1);
  int actAC2=digitalRead(pinA2);
 
  if(actAC1!=oldAC1 || actAC2!=oldAC2) {
     if((oldAC1!=oldAC2 && actAC2!=oldAC2)||(oldAC1==oldAC2 && actAC1!=oldAC1)) {
       cntY--;
       cntA--;
     } else {
       cntY++;
       cntA++;
     }

    oldAC1=actAC1;
    oldAC2=actAC2;
  }
}

void doBCountX() {
  int actBC1=digitalRead(pinB1);
  int actBC2=digitalRead(pinB2);
 
  if(actBC1!=oldBC1 || actBC2!=oldBC2) {
     if((oldBC1!=oldBC2 && actBC2!=oldBC2)||(oldBC1==oldBC2 && actBC1!=oldBC1)) {
       cntX--;
       cntB--;
     } else {
       cntX++;
       cntB++;
     }

    oldBC1=actBC1;
    oldBC2=actBC2;
  }
}
void doBCountY() {
  int actBC1=digitalRead(pinB1);
  int actBC2=digitalRead(pinB2);
 
  if(actBC1!=oldBC1 || actBC2!=oldBC2) {
     if((oldBC1!=oldBC2 && actBC2!=oldBC2)||(oldBC1==oldBC2 && actBC1!=oldBC1)) {
       cntY--;
       cntB--;
     } else {
       cntY++;
       cntB++;
     }

    oldBC1=actBC1;
    oldBC2=actBC2;
  }
}

matsadona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 760
  • Last login:October 28, 2023, 06:00:12 am
Re: Illuminated Arcade Spinner
« Reply #28 on: January 20, 2017, 04:26:57 am »
I made a full PC to Jamma encoder with arduino and a video amp, with >15khz video block function... I mean, a perfectly working 25 dollars Jpac. I must have to find a couple of free hours to translate the topic from Italian to English , but you can take a lookin the meantime (code included)

http://www.arcademania.eu/viewtopic.php?t=710

Just to say how powerful this arduino things are.

Please start a new thread regarding this  :applaud:
Building, collecting and playing arcade machines :)

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9393
  • Last login:Today at 11:02:41 am
  • Designated spam hunter
Re: Illuminated Arcade Spinner
« Reply #29 on: January 20, 2017, 01:15:37 pm »
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:

Congrats, StefanBurger.  Looks like you nailed it.   :cheers:


Scott

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #30 on: January 21, 2017, 07:58:19 am »
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:

Congrats, StefanBurger.  Looks like you nailed it.   :cheers:


Scott

Awesame!   ;D
Thanks for testing and sharing the info!

BTW: as mentioned before, another arduino of the same kind can be a cheap keyboard encoder (up to 18 switches)

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #31 on: January 23, 2017, 01:54:10 am »
Dho :banghead:

Two teeth brook off in my move from Bangkok back to Laos and I lost one.
I may try masking a mold with clay and melting a lago in to the mold. Then glueing the broken one and the lago molded replacement in place. At least until I can have a new one made.
« Last Edit: January 23, 2017, 01:59:23 am by Locke141 »

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #32 on: January 23, 2017, 05:03:54 am »
Dho :banghead:

Two teeth brook off in my move from Bangkok back to Laos and I lost one.
I may try masking a mold with clay and melting a lago in to the mold. Then glueing the broken one and the lago molded replacement in place. At least until I can have a new one made.

Wrap around and glue a transparent foil of some stiffness (like those once used for overhead projectors) und use a permanent black marker to paint the missing tooth on that transparency foil.

Some 3d printing materials are very brittle others are not so much. Huge differences in proprties.

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #33 on: March 15, 2017, 05:14:05 am »
I just go my the last of the parts to try making my own. I also fixed my broken wheel. I'll start a build thread in a few days and will update the post with a link when I do.

Mike A

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5884
  • Last login:Today at 10:33:19 am
  • This plan is foolproof
Re: Illuminated Arcade Spinner
« Reply #34 on: March 15, 2017, 05:53:24 am »
This looks like fun. I have a 3D printer. I am going to give this to my son, and see if he can figure it all out without my help.

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #35 on: March 20, 2017, 10:25:10 pm »
I ordered a set of 18 ohm register but I would like to  confirm.

 I'm no good at this color reading thing. I think Brown, Gray, Black, Black, Brown. But that would be 180 OHM, Right?
\

Dam you dyslexia.  :angry:

I need a 180 ohm resistor so the one I have is correct.
« Last Edit: April 06, 2017, 05:49:26 am by Locke141 »

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #36 on: April 06, 2017, 05:22:25 am »
Ok so I'm stuck.

Is this how I should wire the ITR9608?

I had it wired up with the with the LED anode wired to 180 register, the two grounds spliced, and the light sensor emitter ( the one with the dot) to tx0. It didn't work.

The Neo pixel turns blue when I plug in the Arduino so it looks like the program was installed correctly.

I checked the continuity and voltages. The only thing to note was that the 180 resisters barely lowered voltages to 4.7 ish.
« Last Edit: April 06, 2017, 05:46:14 am by Locke141 »

StefanBurger

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:Yesterday at 10:29:06 pm
  • I want to build my own arcade controls!
Re: Illuminated Arcade Spinner
« Reply #37 on: April 10, 2017, 03:32:52 am »
Hi,

its a it difficult to diagnose that issue, based on only a few infos.
Can you provide a wiring diagram?

It seems strange that the 180 Ohm resistor did not lower the voltage to approx 2.2 volts as it should.

Another question is, are you sure not to confused the both sides of the TR9608?

Are you aware of the wiring diagram on thingiverse ("Shield proposal")?

Regards Stefan
Ok so I'm stuck.

Is this how I should wire the ITR9608?

I had it wired up with the with the LED anode wired to 180 register, the two grounds spliced, and the light sensor emitter ( the one with the dot) to tx0. It didn't work.

The Neo pixel turns blue when I plug in the Arduino so it looks like the program was installed correctly.

I checked the continuity and voltages. The only thing to note was that the 180 resisters barely lowered voltages to 4.7 ish.

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #38 on: April 11, 2017, 10:07:12 pm »
Hi,

its a it difficult to diagnose that issue, based on only a few infos.
Can you provide a wiring diagram?

It seems strange that the 180 Ohm resistor did not lower the voltage to approx 2.2 volts as it should.

Another question is, are you sure not to confused the both sides of the TR9608?

Are you aware of the wiring diagram on thingiverse ("Shield proposal")?

Regards Stefan


Yes, I used your diagram to make my shield and I have the TR9608 the right way.

I'm attaching photos of my shield and me testing. All the the resistor photos we're done with out using the shield with the resistor from the same package the ones used. The results are the same and testing directly shield.

Photo 1: OHM testing in the resistor.

Photo 2: The voltage with the same in line.

Photo 3: Same as above but no resistor at all.

Photo 4&5: My shield (not use an above photos what it results the same when I tried it)

Photo 6: My TR9608

Update:I pulled the Pro micro (TR9608) and pit it on my bread board. I tested a new 180 ohm and a 200 ohm resister. I even put them in one after the other for a total of 380 ohms resistance and I still burley detected a voltage drop. Could it be my new meter?
« Last Edit: April 12, 2017, 03:06:42 am by Locke141 »

Locke141

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1690
  • Last login:February 03, 2024, 06:00:00 am
  • Never grow up.
Re: Illuminated Arcade Spinner
« Reply #39 on: May 26, 2017, 06:20:02 am »
When I got stuck I  took a long brack from this. Today I got some feed back on the arduino forums, reassembled and it is working.

This is very cool