CNC style Pendant
-
@gtj0 that's the reason I'm asking. HTTP approach looks better but dunno if there are penalties. I went forward last night and since I need a "send g-code" function in one place only it's not a big deal to have few different ones (one for telnet, one for http, one for - whatever...) as it will not be affecting the code.
I took a 2stick module from some broken game controller, that gives me 2 buttons + 4 axes with limited speed control (2k2 pots on the axes are not very precise, I can safely detect 2 speeds, maybe 3 especially as I added 4k7 in series so the swing is even lower, I might remove the 4k7 but 4x2k2 in parallel on the 3v3 rail is 6mA constant drain on the battery), attached to ESP32+BMS.
Telnet works for now but I'm still thinking if I need to add more buttons and leds.
-
Somewhere in all the above I ordered a pendant a few weeks back. JUST after I ordered it, Dave published his code. Which is great, not having to write it... so I haven't done much since then.
I have received the pendant now.
I'm thinking about an ESP32 (massive, massive, overkill, but they are $5 each...!) setup to do Serial or Network, including RRF2 or RRF3 printers. And just experimenting to see if it "feels" right when hooked up by various methods.
And a battery and an "off the shelf" USB charger/manager for the battery.
Going back and forth on having a small display, XYZ.
-
@Danal Lock picking for fun and profit??
-
Ooops... need to move that.
You nailed the goal. That is my practice set, they get progressively harder. Keep the 'ol fingers skilled up.
-
@Danal The LockPickingLawyer is my hero.
-
Arduino Nano to Duet PanelDue connector connections: Nano Duet +5V +5V GND GND TX1/D0 Through 5K6 resistor to URXD, also connect 10L resistor between URXD and GND */
I don't have any 5K6 resistor at home, and I don't feel like driving 75 km to get one. Is there any way to make this connection possible? My 2 ideas are:
- Using a 3.3 to 5 v logic converter
- Using a 3.3v board to drive the pendant (I have some overkill ESP32 on stock)
Also, I'm guessing that 10L means to be 10K, right?
-
Yes 10L should be 10K. You need 2 resistors with a resistance ratio of 2:1 or a little less. For example, 10K and 18K. Or 6K8 and 10K. Or, if you have lots of 10K resistors, 5K (i.e. 2 of them in parallel) and 10K. Even 10K and 10K will probably work. The idea is to reduce the 5V output from the UART on the Arduino Nano to somewhere between 2.5V and 3.3V.
The sheet that came with the pendant says it needs a 5V supply for the rotary encoder. Maybe it will work on 3.3V, maybe not.
-
-
@FelixH said in CNC style Pendant:
Is there any way to make this connection possible?
Most of atmega's can work on 3v3 so instead of powering nano from 5V, power it from 3v3 and USART levels should be ok.
-
@arhi said in CNC style Pendant:
Most of atmega's can work on 3v3 so instead of powering nano from 5V, power it from 3v3 and USART levels should be ok.
Yes, if the encoder in the CNC pendant will work on 3.3V. Or alternatively, if it has open-drain or open-collector outputs so that t can be powered from 5V without feeding 5V to the A and B outputs.
-
@dc42 said in CNC style Pendant:
The idea is to reduce the 5V output from the UART on the Arduino Nano to somewhere between 2.5V and 3.3V.
So I could also use a logic converter there, right?. I have a bunch of "3.3 to 5 Bidirectional Bus" mini boards
-
@dc42 never tried but IIRC from the DS atmega is 5 V tolerant when running from 3 V so powering encoder with 5V and Atmega with 3V should be safe. The major possible problem is if it will run properly on 16 MHz on 3V (iirc 4.5 minimum for 10+ MHz) but I never had issue myself, they always worked ok.
@FelixH as you mentioned logic level converter, if you have one that would for sure work safest
-
Z and 4 Pendant cables are together to pin D6? or is Cable 4 to pin D7?
-
-
Well, just finished soldering cables here and there, I connected the TX/D0 pin of the Nano via a Logic Converter to the PanelDue port... the Duet does not boot if I connect the Pendant. The Nano and the logic converter seem to boot up, since the leds are lit up. If I start up with the display plugged in, and then I change for the pendant, the Duet shuts down. I can also see that on the web interface... not sure what could be wrong. I'm pretty sure the connections are sound
If I connect it to the computer and start the serial monitor, only a M112 command shows up continuously. No matter what I do, it doesn't show anything else
-
I've just got my pendant working. I've updated the code and changed the wiring slightly (STOP now goes to A0, and LED+ goes to D13). Latest files are on github now.
Here's how I wired it. I soldered the black, orange/black, blue/black and white/black wires to the cable shield and ran a single black wire from them to ground on the Arduino. I used 6K8 and 10K for the output resistors.
I configured the code so that on the x1 setting, each step is 0.1mm.
Next step is to design a printable enclosure for the Nano. I found a generic one on Thingiverse but it looks like it doesn't hold the Nano securely.
It would be nice to do a version that includes a PanelDue passthrough, but that would require a microcontroller with two serial ports, whereas the Arduino Nano has only one.
-
@dc42 said in CNC style Pendant:
Next step is to design a printable enclosure for the Nano. I found a generic one on Thingiverse but it looks like it doesn't hold the Nano securely.
I was thinking on fixing the nano inside the pendant.
-
@FelixH said in CNC style Pendant:
I was thinking on fixing the nano inside the pendant.
I didn't realise it would fit, but I've now taken the back off, and it will! Here's one possible place for it.
Now I need to re-do all the wiring You and your bright ideas!
-
@dc42 said in CNC style Pendant:
Now I need to re-do all the wiring You and your bright ideas!
Sorry...?? on the plus side, everything is much tidier...
By the way, would the +5V of the PandelDue be able to supply enough current for: the PandelDue, the Nano and a ESP32 used as a splitter (to be able to use both the PanelDue and the Pendant simultaneously). I want to use an ESP just because it has more convenient pinout with Rx/Tx ports
-
@FelixH said in CNC style Pendant:
By the way, would the +5V of the PandelDue be able to supply enough current for
probably - but it comes down to how much overall current the Duets 5v supply has to deliver to itself, and other peripherals. But the 0.5mm trace to the PanelDue port is good for 1 amp and some change.