I’m really happy about all the enthusiasm. It’s ‘complete’ as far as the design and the firmware goes but the documentation is lacking and I only have experience with the RAMPS-like boards, not Rambo.
Let me see if I can pull together a more self-contained document that’s a bit easier to read than this thread.
At a minimum you will need to know how to enable a couple lines in the configuration and re-flash your board. The switch and joystick can be wired directly to the board if you skip the LED indicator light, so it shouldn’t need much skill beyond making good electrical connections. I’ll see if I can get a guide together this weekend.
Here’s a photo of the rambo (not rambo mini) connections I used.
On the left, Brown=ground, red = +5V
Working right, Blue purple grey are XYZ, and green is enable.
If you google how to wire up potentiometers you will see how the joysticks are supposed to be hooked up… power and ground on the outside pins, and signal on the middle.
Are the configuration values for the joystick in EEPROM? It might make it possible to add in the default firmware (but pins are precious). But for that to be worthwhile, you wouldn’t want to have to reflash it to change the min/max/deadzone. You’d also need to choose a Gcode/Mcode…
I’m trying to figuring this out, but it’s quite the treasure hunt. I have an Archim board. In the conversation above, folks are referring to pins that have specific names on certain boards.
So this comment assumes that everyone knows what board we are talking about, but nowhere in the first post does it name the board. I assume it is the RAMPS?.
So then how to we trace things out to get to the other boards?
I know the microcontroller has in/out pins. They have numbers. I know that these pins get mapped to pins on the control board and can be used for various purposes. Some are clearly set up for the motors, the fans, the extruders, thermistors, etc.
Some pins are still free for various jobs. Some pins can be remapped for other purposes. I’m going to keeping poking away at these boards and get a better understanding of all the pins and connectors.
And awaiting Jamie’s clearer documentation. Thanks in advance!
You can choose the pins you want. They need to be capable of analog in (for the 3 axis inputs). Many of the rambo pins have assignments already, like the xmin endstop. But there are spare ones on the aux connectors.
I have an Archim2. This is the perfect project to help me understand these boards better and how to control them to control other things.
So I could define the pins in the J20 header with the undefined GPIO pins referred to here in /Marlin/src/pins/pins_ARCHIM2.h? Just guessing. I am currently using one of the fan pins for a cooling fan on the control board. It seems I can use the other fan for the PMW part of the joystick.
Otherwise I am trying to figure out where the firmware is configured for this.
Hello, great article and great work. Thanks. I only have a problem with the Z axis. After using the M119 command, the values jumps. Actually on each axis they jumps but the most on the Z axis is also another potentiometer
2 4.7kR potentiometers X and Y axis
1 potentiometer 1.5-3.6k in the Z axis
I have used the lastest firmware, but wanted to be able to software invert the polarity of the axis, so I have included the code from jamies pull request.
Files for the housing can be found here: https://www.thingiverse.com/thing:4144229
Another Rambo success! I finished adding this to my machine today, many thanks to Jamie, Greg (for Rambo specific details) and of course Ryan !
Process was relatively smooth minus me glossing the fact that you need a double throw switch to enable the… enable led to work I did run into some weirdness in that my analog pin3 didn’t seem to work right. My Y axis reading came out ranged 14-25-40 while the other axes were pretty close to Jamie’s published offsets. I switched Y to analog 6 after confirming wiring and resistance of the pot and it worked. Printed quick enclosure and off to the races!
I found a 2x5 header block in my parts bin along with a cat5 surface mount jack. Made an adapter cable that dangles out of the bottom of Ryan’s enclosure and ran a cable from the joystick to the plug. Painter’s tape holding it to the main stepper bundle will be replaced with a ziptie at some point.
How would I go about doing the same thing via the AUX2 port on the Ramps board, but with with 4 direction buttons instead. I need continuous jogging and the other solutions I’ve seen only jogs in increments.
You’d need a circuit that would make about 2.5V with not buttons pressed and then higher with one button pressed and lower with the other button pressed.
If you used 4 resistors of the same size (about 1k-10k) in series. You can wire buttons across the second and third resistors. The output is in the middle. With no buttons pressed, the voltage will be 2.5V. With B1 pressed, out will be 1.65V. With just B2 pressed, it will be 3.35V.
Repeat that for X and Y. You need completely separate buttons though. A D pad with a common pin for all 4 switches wouldn’t work this way.
I did think the starting point would be 2.5V as if the wiper was in the the middle of the potentiometer, but didn’t know how to go about getting the other two extents. But you cleared that right up.
Planning on using 4 tact switches so this would work perfectly.
Hi. I almost have this working, however I’ve not quite got the fine tuning down yet. I have a bunch of questions. I’m running a Rambo like @tailslide , with dual end-stops. At moment I am only working with x and y. My z seems to have a broken wire.
I am able to get the values from m119 but when I change the firmware values it doesn’t quite respond as expected. For instance, the dead band at ± 100 was very sensitive… I’ve tried increasing this a bunch but it doesn’t seems to be adjusting as much as I’d like so as to avoid those small off axis moves when positioning. How wide can this be?
Also should it stop and start or be completely smooth? If I push the stick full tilt too quickly it goes then halts. If I push slowly, it will mostly go ok. But still halts once in a while in travel. I’ve had to increase the over all range values (max and min) from what was recommended by @jamiek as well so that I could move the stick more freely, i.e. so it is not limited close to center. My range of values from M119 appear to be 0 (min travel) to 16378? (max travel). I expected to be able to go full on stick and have it run at its max speed but it seems to just stop. Normal?
Precision. Not really a joystick problem but it kind of stinks the lcd only reports X & Y at 1mm increments. If I drive to a location. Reset zeros (G92 X0 Y0). And machine something. If I later need to rehome for any reason (after disabling steppers for something) , there is zero chance I could return to exact same location. Best I could do is within .5mm. Better to use the menus.
Finally, I have found that it does not seem to respect the end stops (machine limits?). I can crash the gantry pretty easily using joystick. Should that be the case or is something amiss? I’m runnning dual end stop firmware. It seems this version of Marlin (downloaded in the last few days from V1 for this feature) does not handle endstops the same as my older version (downloaded last summer). In past version, when I home with G28 X Y, the coordinates X Y coordinates would set to zero. Does not seem to do that anymore. Could be why I can crash. Is this the new normal?
Sorry for long post. Any input is appreciated. Thanks.
Seeing pretty much exactly the same thing. I am a developer by trade and tried applying some smoothing algorithms to deal with the start-stop issue which didn’t help… I think the problem might be something other than bad analog readings. Also saw the same thing with the endstops not being respected. Fortunately it seems to be a minor annoyance that doesn’t prevent me from finding it very useful. All in all I’ve still found it the most time saving upgrade I’ve done.
Also regarding finding the same spot I have mine hooked up to raspberry pi cnc.js so it’s easier to read off or set the coordinates although in practice I never seem to need to but might try it some day on a very long job.