Runescape Cheat-a-tron

by ExquisitePixelz in Circuits > Arduino

225 Views, 0 Favorites, 0 Comments

Runescape Cheat-a-tron

photo_2021-05-28_07-47-50.jpg

I made a XY plotter using old CD drives that had stepper motor's in them. The X and Y arms are programmable and have a servo on top that can interact with the screen of an android phone.

Supplies

- 2x cd drive
- wood for housing
- soldering iron
- solder
- arduino uno
- arduino l293d motor shield
- servo

Research

clickatron-exploding view_2.gif

The gif above is showing my concept visualised in a exploding view. I've seen XY plotters like these before, however mine had to be small enough it would be an eyesore on my desk, it had to hold an phone and a battery pack. The design would be a shelf for my phone to be stored in and still have a small enough footprint so that I could freely use my desk. I started researching smaller and smaller core XY ideas and finally came to the conclusion using timing belts would be to big. The stepper motors found in CD/DVD drives were precisely what I was looking for. These stepper motors did have a downside to them however. They wouldn't be able to get a large enough surface to track on the screen since the travelscrew would be to short.

Research done:
Video 1 : Core XY explained

Video 2 : Easy homemade plotter

Video 3 : World smallest 3d printer

Video 4 : World cheapest simplest plotter

Video 5 : Plotter using CD drives

(some miscellaneous sites about arduino motor shields which weren't noteworthy)

Designing the Case

image (13).png
image (11).png
image (12).png
image (10).png
image (9).png
image (8).png
image (7).png
image (6).png
image (5).png
image (4).png
image (3).png
image (2).png
image (1).png

The most important thing to remember is that I'm designing my case using the measurements of my phone and powerbank. I wasn't designing the case with other phones in mind. This is a design choice. The finalised design wasn't meant for other people to enjoy. I started the design of the case in Fusion 360. The obvious place to start was to create an case in which the phone would lie sturdy and securely. Also the powerbank needed a similar place to stay. By stacking them on top of eachother, I hoped to eliminate some of the area it would need on my desk to rest. Also, by stacking them on top of each other the final design would be bottom heavy. The next steps That I would be taking in the design were mounting holes for the arduino and XY arms. I had some trouble deciding how much space I should leave for the servo to interact with my phone. In the end I decided dat I wouldn't need a lot of room but I should leave 4 mm of space to at least have some wiggle room.

Testing the Stepper Motors

Screenshot 2021-05-28 231308.jpg

Of course a big step I would need to take is to test the stepper motors I salvaged from CD drives. I bought a motor shield for arduino that could incorporate 2 stepper motors and a servo. Testing the wires coming out of the stepper motor with a voltmeter and then soldering them, I could finally add some code to my creation.

#include <AFMotor.h>
AF_Stepper motor(48, 1);
void setup() {
motor.setSpeed(0);
motor.onestep(FORWARD, SINGLE);
motor.release();
delay(1000);
}

void loop() {
motor.step(250, FORWARD, MICROSTEP);
motor.step(250, BACKWARD, MICROSTEP);
}

This code would move the stepper from 1 side to the other. As seen in this video

the next step would be to wire 2 stepper motors and see the interaction that would give me. The code for this is as followed:

#include <AFMotor.h>
AF_Stepper motor(48, 1);
AF_Stepper motor2(48, 2);
void setup() {
 motor.setSpeed(200);
 motor2.setSpeed(200);
 motor.onestep(FORWARD, SINGLE);
 motor2.onestep(FORWARD, SINGLE);
 motor.release();
 motor2.release();
 delay(1000);
}
void loop() {
 motor.step(250, FORWARD, MICROSTEP);
 motor2.step(250, FORWARD, MICROSTEP);
 motor.step(250, BACKWARD, MICROSTEP);
 motor2.step(250, BACKWARD, MICROSTEP);
}

This code is basically a copy of last, but with the difference that i would first move the first stepper and then the second one. As seen in this video.

Prototyping the Case

photo_2021-03-12_12-24-55.jpg
photo_2021-03-13_13-34-04.jpg
photo_2021-03-10_14-43-58.jpg
photo_2021-03-10_14-43-58 (2).jpg
photo_2021-03-10_16-14-21 (2).jpg
photo_2021-03-12_12-34-51.jpg

A rendered Fusion 360 model is nice and all, but it wouldn't be much of a help with deciding the placement of the stepper motors. Therefor I made a cardboard prototype which would help me visualise the dimension/measurements on a 2d platform while also being able to create a 3d shape in which I could test my fits. The following video is a demonstration of a dry fit. During this dry fit, I also managed to get new measurements of the mounting plate I would use to install the stepper motors on. The first cut of which is shown in the pictures above.

Creating an Array

image (16).png
photo_2021-03-26_14-37-50.jpg

The stepper motors would need to work in an array for me to be able to easily add coordinates that the stepper motors would need to operate. The code as shown in the picture is my first dabble with arrays. The code would turn on the led lights one by one.

I needed to use different coordinated per axle so I thought of a 2D array in which I could add steps as needed. The code below is the result.

int delayTime = 1500;
//positionArray[aantal stappen][aantal index] 
//Dit is het coordinaten systeem. Ik kan hier stappen aan toevoegen zoals ik wil. //Hij doorloopt de stappen en begint daarna weer bij stap 1 int Miner[3][3] = {{250, 50, 1}, {20, 10, 1}, {30, 40, 1}}; // {x,y,click}
int currentX = 0;
int currentY = 0;
int currentStep = 0;
#include 
#include 
AF_Stepper motorX(48, 1);
AF_Stepper motorY(48, 2);
Servo clicker;
void setup() {
  clicker.attach(9);
  motorX.setSpeed(200);
  motorY.setSpeed(200);
  motorX.step(250,BACKWARD, MICROSTEP);
  motorX.release();
  motorY.step(250, BACKWARD, MICROSTEP);
  motorY.release();
}
void loop() {
  goToPos(Miner[currentStep][0], Miner[currentStep][1]);
  if(Miner[currentStep][2] == 1){
  clicker.write(90);
  delay(500);
  clicker.write(0);
  }
  delay(delayTime);
  currentStep++;
  if (currentStep == 3){
    currentStep = 0;
  }
}
void forward(int steps, AF_Stepper as) {
  as.step(steps, FORWARD, MICROSTEP);
}
void backward(int steps, AF_Stepper as) {
  as.step(steps, BACKWARD, MICROSTEP);
}
void goToPos(int x, int y) {
  if (currentX > x) {
    backward(currentX - x, motorX);
  }
  if (currentY > y) {
    backward(currentY - y, motorY);
  }
  if (currentX < x) {
    forward(x - currentX, motorX);
  }
  if (currentY < y) {
    forward(y - currentY, motorY);
  }
  currentX = x;
  currentY = y;
}

The result of this array is shown in the following video

Creating the X and Y Axles

image (17).png
image (18).png
photo_2021-05-28_07-51-18.jpg
photo_2021-05-28_07-58-48.jpg

The X-axle was already cut to size as shown in the previous step. However, the Y-axle needed a more custom solution. Therefor it was back to Fusion 360 for me and time to create a new more compact system which would house the Y-axle. The first prototype I 3D-printed was a fluke. I took the measurement directly from the original case but downsided it. However, the measurement were off by allot and I needed a different design. The 3D model as shown in the picture worked wonders. I then could dry assemble all the part and check if the code would run again.

Final Fit

photo_2021-05-28_15-56-00.jpg
photo_2021-05-28_07-47-50.jpg
photo_2021-05-28_07-58-49.jpg

When everything worked as I wanted to, the only thing left for me to do was to create the structure around it. Of Course I already had the 3D model, but as I found out, 3D printing the entire case would take too long. Therefor I resorted to hand sawing the case myself. This didn't work out to well as the final result did look a bit shaggy. The measurement I made were perfect though and everything worked as intended. That's the power of triple checking all the measurements and even prototyping in cardboard I guess. If I would redo the case, I would resort to laser cutting the wood as this leaves a much nicer finish. Here is a video of the case and the product in working.

To create such an in depth documentation, I used Miro. The board can be found here: https://miro.com/app/board/o9J_lUTTsEY=/