Joystick managed by Marlin

I’m unfamiliar with which pins can support analog reading. The thermistor ports would be possible in theory but they have pullup resistors that will make the readings wonky, depending on the resistance of the joystick. You will have to get your hands dirty in the firmware to disable or remap the thermistors and fix whatever else might break because of that.

You can connect the joystick without any hardware modifications and see if you get decent resolution on the ADC readings. If the joystick has high resistance then it is likely that you will have poor resolution. If you get lucky then the ADC readings might be usable and you would just set your dead zone and extreme limits based on the values you get from M119.

The other alternative would be to remove the pullup resistors from the board. Then your joystick will be able to use the full range of the analog pins.

Also, I tried to follow the existing pattern in Marlin for analog reading, which “should” work for the 32-bit boards, but as far as I know this has not been tested. I have not looked closely at the hardware abstraction layer, so there is a chance this might not be correct for non-Arduino boards.

Jamie,

could you please post the stl of your joystick-case …

 

Thanks Dieter

1 Like

Sure, here it is: https://www.thingiverse.com/thing:3826933

Also included is the scad source file in case tweaks are needed.

Also, by the way, I’ve just installed it in my machine:

[attachment file=110617]

The hole in the table is tight enough that it doesn’t rattle so didn’t feel the need to screw it down to the table.

2 Likes

Thanks :slight_smile: !!!

Aren’t you worried it will control itself and go skynet on us?

1 Like

I learned my mistake on my first machine, where the E-stop button was very close to the location where the tool change happens. A poor choice! Made me pause and think, what if it’s running and a tool change starts to fail. This would be exactly the time the E-stop is most important, but with a tool flopping around unpredictably, I shouldn’t be reaching in to hit the E-stop. Luckily I never had this scenario occur.

Now the E-stop and joystick are outside the work envelope by a comfortable margin, so I think I’m safe.

Excuse the mess, I just swapped my Einsy Rambo for a RAMPS 1.4 and I am currently building an enclosure. :wink:

-Dan

5 Likes

This got merged into Marlin today! Into bugfix 2.0.x

2 Likes

Cool! Congrats Jamie. :smiley:

Awesome Dan! I love it!

1 Like

Killing it, making me so jealous…but more proud. You seem to speak thinkyhead’s language!

This looks really good! Any thoughts on controlling the Z axis like a button to toggle between joystick XY and Z or maybe a second stick ?

1 Like

The joystick he used can be twisted for Z.

Ahh I missed that! Joystick on order :slight_smile:

 

Anyone have diagram I can follow on how to connect this to a Rambo v1.4?

I see he mentions this:

“Right now I have this connected on AUX-2, using A5, A10, D44, and A12” but want to make sure this is how he set it up and exactly what axis was used with what pin? or are those customizable?

Thanks!

See here

1 Like

klinke yes that is the correct mapping of analog joystick lines to pins. I don’t know what the corresponding setup would be for the Rambo since it doesn’t appear to have a similar Aux2. The thermistor ports are certainly analog capable but the pullup resistors will make the readings weird (nonlinear and asymmetrical) and I don’t know how deep the firmware update would need to be to even use those ports in the first place.

Sorry I don’t think I can offer much in how to adapt to the Rambo. I am not seeing obvious spare analog ports that would just work with a pin change…

1 Like

I ordered my Joystick before I realized this… I had a look and as far as I could tell getting it working on the rambo mini involves desoldering a surface mount pullup resistor. I decided to order a full blown rambo clone from aliexpress instead. It opens up some more options in case I wanted to control a 4th axis later. Should have some pins that work but I neglected to double check that before I ordered it’s not in yet :slight_smile:

 

 

 

Hopefully the clone works.

@Jamie,

I connected my joystick as described to AUX2 (Ramps 1.4) and used the latest firmware by Ryan within the analog joystick. Enable works but there seems to be some residual voltages with the effect that the router vibrates a bit strange. If I choose a direction the responsiveness is not that great and not linear at all as in your video. What to do?

PS: I do not have endstops