PCBWay 3rd PCB Design Contest
VOTE NOW!
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Design 1/4
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Usability 2/4
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Creativity 3/4
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Content 4/4

DIY Project: Upgrade your Amiga Tank Mouse into a high resolution Laser Mouse.


This project was one of my weekend retro projects done two years ago. At that time, I wanted to upgrade my Amiga Mouse and ended up with this hand made PCB. :)



After sharing the story in a local retro computing forum, people are interested in building their own. So I have modified the design to be manufactured by a factory and ordered a small batch of PCB's.


I am sharing this PCB for those who are interested in building their own. Some basic knowledge on PIC micros and a compiler is also required.


Hardware


The core of the project is an ADNS9800 laser mouse sensor. A PIC micro is used to convert x-y movements into Amiga type A-B quadrature pulses. Resolution of the mouse can be adjusted by placing the CONFIG jumper. When this jumper is in place, resolution can be increased/decreased by using the mouse buttons.


A 3D printed lens holder is used to fix everything to the mouse case. Lens holder 3D design will be shared to public.


BOM:

1 ADNS9800 + Lens

1 PIC18F2XK22

3 3.3K 0805

4 100nf 0805

3 1uF 0805

3 Short M3 screw

2 Micro Switch

2 Pin Header

1 P Ch Mosfet

1 3D Printed Lens Base


Since I don't want the project to be copied and sold without spending any efforts, I will not release the PIC HEX file. But it will very easy to write a simple firmware for this project. Also for those who are interested in building this project, core code sniplets are shown below.


#define HORV1 LATCbits.LATC7=0; TRISCbits.TRISC7=0;

#define HORV0 LATCbits.LATC7=1; TRISCbits.TRISC7=1;

#define HORQ1 LATCbits.LATC6=0; TRISCbits.TRISC6=0;

#define HORQ0 LATCbits.LATC6=1; TRISCbits.TRISC6=1;


#define VERV1 LATCbits.LATC4=0; TRISCbits.TRISC4=0;

#define VERV0 LATCbits.LATC4=1; TRISCbits.TRISC4=1;

#define VERQ1 LATCbits.LATC5=0; TRISCbits.TRISC5=0;

#define VERQ0 LATCbits.LATC5=1; TRISCbits.TRISC5=1;


#define LBTN1 LATBbits.LATB0=0; TRISBbits.TRISB0=0;

#define LBTN0 LATBbits.LATB0=1; TRISBbits.TRISB0=1;


#define RBTN1 LATBbits.LATB1=0; TRISBbits.TRISB1=0;

#define RBTN0 LATBbits.LATB1=1; TRISBbits.TRISB1=1;


void SetPhases(void)

{

if (HorPhase==0) { HORQ0 HORV0 }

else if (HorPhase==1) { HORQ1 HORV0 }

else if (HorPhase==2) { HORQ1 HORV1 }

else if (HorPhase==3) { HORQ0 HORV1 }

if (VerPhase==0) { VERQ0 VERV0 }

else if (VerPhase==1) { VERQ1 VERV0 }

else if (VerPhase==2) { VERQ1 VERV1 }

else if (VerPhase==3) { VERQ0 VERV1 }

}



This is the main loop:


adnsGetDelta(&x,&y);


while (((x!=0) || (y!=0)))

{

if (x>0) { x--; HorPhase--; if (HorPhase>3) HorPhase=3; }

if (x<0) { x++; HorPhase++; if (HorPhase>3) HorPhase=0; }

if (y>0) { y--; VerPhase--; if (VerPhase>3) VerPhase=3; }

if (y<0) { y++; VerPhase++; if (VerPhase>3) VerPhase=0; }


SetPhases();

Delay100TCYx(1); // 100uSec

}



NOTE: You will have to find an ADNS9800 library. ADNS9800 SPI pins are bit-banged, dedicated SPI hardware is not used.


Details of the project can be found below. (Unfortunately in Turkish)


https://www.commodore.gen.tr/forum/index.php?topic=14749.msg182994#msg182994


Bill of materials used in this project

ADNS9800 + Lens
1
PIC18F2XK22
1
Oct 20,2019
1,307 viewsReport item
  • Comments(2)
  • Likes(2)
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
    View More
    VOTING 2 votes
    • Engineer from
      • 1
        design
      • 1
        usability
      • 1
        creativity
      • 1
        content
      1.00
    • Alex de Bode from NETHERLANDS, THE
      • 2
        design
      • 1
        usability
      • 7
        creativity
      • 3
        content
      3.25
    View More