@ajmartins Great, happy to hear that!
Posts made by hurzhurz
-
RE: USB CNC Pendant project
@ajmartins It looks like the Duet Software Framework (DSF) is version 3.4.6 (you are using the Duet together with a Raspberry Pi, I guess?), but the Firmware on the Duet is just 3.1.1
-
RE: USB CNC Pendant project
@ajmartins Which version of RepRapFirmware have you installed?
I'm wondering if the macro parameters or the exists() function for them is "too new".
On my machine I'm running 3.4.6. And from the changelog I guess that at least 3.3 could be required. -
RE: USB CNC Pendant project
@ajmartins The errors look like these two lines might be missing in your config.g, can you check that?:
M98 P"pendant-continuous-init.g" global run_daemon=true
Or you can run them manually in the console once for testing.
And about your other question, doesn't your WHB04B-6 show the coordinates on the LCD?
It should work automatically... -
RE: Continuous movements in a new way
@meeloo You don't need to use my whole project, you could just look how I implemented the continuous mode in a G code way: via macros and especially the usage of the daemon.g.
If you want to try that (without Arduino etc.), you can prepare the macros like described here:
https://github.com/hurzhurz/Duet-USB-CNC-Pendant/blob/master/doc/ContinuousMode.md#preparationThen, to command a continuous movement, you have to send this command every 500ms (or more often):
M98 P"pendant-continuous-run.g" A"X" F1000 D1 # for moving the X axis in the positive direction with a feedrate of 1000
If the regularly sending of this command stops, the movement will automatically stop after a short time.
To immediately stop, you can send:
M98 P"pendant-continuous-stop.g"
Again, this not a perfect solution and you will notice a little delay, but I think it is working well enough.
-
RE: Continuous movements in a new way
While it is not nearly as good as a real implementation in firmware would be, you could have a look on how I did an implemented for continuous mode in my Duet-USB-CNC-Pendant project.
The rough principle is described here: https://github.com/hurzhurz/Duet-USB-CNC-Pendant/blob/master/doc/ContinuousMode.md#working-principle
Changing the speed while moving would be possible,
though I have not actually implemented that for the basic PS3 controller support.EDIT: just implemented it (in a separat branch for now) -
RE: USB CNC Pendant project
@IlI_Cnc You actually have two ports on your board where a PanelDue can be connected, the 10-pin "PANEL DUE" connector and the 5-pin IO_0 connector.
Both share the same serial interface (that you can enable withM575 P1 B57600 S1
).
The 10-pin connector is used if you want to use the SD card slot on the PanelDue.
https://docs.duet3d.com/en/User_manual/Connecting_hardware/Display_PanelDueI would suggest using the IO_0 connector like shown in my wiring diagramm on GitHub.
-
RE: USB CNC Pendant project
@oliof said in USB CNC Pendant project:
Great work @hurzhurz. It would be cool to see if you (or anyone else) could adopt the FluidNC M5Dial Pendant as well.
Thanks!
The FluidNC M5Dial Pendant looks like another neat solution!
And as it is already made to communicate via serial / G-code commands, it should probably be not that hard to adapt.
Most work should be needed for the part with the status display for coordinates etc. -
RE: USB CNC Pendant project
@chimaeragh said in USB CNC Pendant project:
@hurzhurz Will this work with the 4 axis version, WHB04B-4? I don't need to control that many axes and it seems to be half the cost of the 6-axis on AliExpress
I can't tell for sure, but I think the chances are good that the 4 axis version works as well.
For the most part, I used the protocol description from the LinuxCNC driver: https://github.com/LinuxCNC/linuxcnc/tree/master/src/hal/user_comps/xhc-whb04b-6
I think I read a comment somewhere that the WHB04B-4 was used successful with the LinuxCNC WHB04B-6 driver by someone.
And I can't imagine that there would be a difference needed in the protocol.Though it could be that the dongle of the 4 axis version has a different USB PID. But that would be trivial to fix.
-
RE: USB CNC Pendant project
@IlI_Cnc For the Duet side, the most important part is to enable the PanelDue port via M575, like @oliof already said.
In addition, you may want to create macro files to define what should happen when you press on the various buttons of the pendant.
If you press a button, you should be able to see in the console in the Duet Web Control which file it tried to execute und you have to create, to give that button a function.And to flash the Raspberry Pico, you can simply take the compiled firmware.uf2 file from my GitHub repository.
You need to connect the Pico via USB to your computer. But while plugging it in, you have to press the BOOTSEL button.
There should then appear a new drive. Just copy firmware.uf2 on that drive. -
RE: USB CNC Pendant project
Maybe some news:
- Just for fun, I have implemented support for the PlayStation 3 controller
- The limitation for the mentioned LogiLink Numpad is removed, so any keyboard can be used. But the key mapping might be less ideal on other devices.
And I have also made an attempt to implement some kind of continuous mode (move as long as button is pressed).
This can be found in a different branch: https://github.com/hurzhurz/Duet-USB-CNC-Pendant/tree/continuousEDIT: already merged into master branch
And here is documented how it works: https://github.com/hurzhurz/Duet-USB-CNC-Pendant/blob/master/doc/ContinuousMode.mdIt uses the daemon.g to generate the actual movement commands. This is a bit hacky, but at least, it seems to work...
-
RE: USB CNC Pendant project
@o_lampe Depends on where you look for the WHB04B-6.
I got mine from Amazon DE, where it is still available with Prime-Shipping: https://www.amazon.de/RATTMMOTOR-Fernbedienung-Handsteuerung-Drehmaschinen-Graviermaschine/dp/B096TNP5NF/
And AliExpress is a possible source, too.I have not implemented joysticks, but if they present themselves as HID devices, it should not be hard to do that.
Well, at least for button presses...
I'm not sure what's the best way to implement continuous movements via G-codes, as of course, you surely want it to stop as soon as possible, after the joystick (or a long pressed key) is released.I'm not sure if I want to rename it, but you have a point.
I have now added a small repository description that contains "Duet3D". -
USB CNC Pendant project
I would like to quickly present a small project that I finally had some time to do over the last few days:
https://github.com/hurzhurz/Duet-USB-CNC-Pendant
It is a bit similar to the CNC-Pendant-Firmware, but instead of modifying a simple (but still not cheap) CNC pendant, theoretical any USB HID device can be used.
It is based on a Raspberry Pi Pico, easy and cheap to build.Multiple months ago, when I looked for the pendant that is needed for the CNC-Pendant-Firmware, Amazon suggested me the combination of a cheap wireless numpad and matching CNC-themed key-stickers, which lead to this idea.
At that time I already managed to figure out the basic USB HID part, but had no time to go further.
Later I found the WHB04B-6 wireless USB pendant and recently bought it to motivate myself to do this project.So at the moment, the cheap numpad (LogiLink ID0120) and the WHB04B-6 pendant are implemented.
Other numpads should work too, but I have filtered for the VID and PID of the LogiLink one. But this can be changed easily in the code.
And other USB HID devices (keyboard, mouses, gamepads, …) should probably be relatively easy to implement as well.I would be happy if someone would like to try it out and give some feedback.
Though I want to point out that some things might not be implemented in the best way… I'm whether a full-time developer nor an experienced CNC operator
Any help is welcome!
-
Alternative PWM to 0-10V converter for spindle control
In case it is helpful for anyone, I want to hint to another PWM to analog converter that I found a while ago.
It is sold pretty cheaply on Aliexpress as a small PCB module called “PW1VA01”:
https://aliexpress.com/item/1005004402191795.htmlIt is based on an IC specialized for this task: Guestgood GP8101
Chinese Datasheet (try Google Translate for documents): https://datasheet.lcsc.com/lcsc/2202131930_Guestgood-GP8101-F50-NH-SW_C2837701.pdfFrom what I found from my testing, it has strong advantages over the other typical modules:
- the output is absolutely linear and also frequency and supply voltage independent
- doesn’t need fiddling with an adjustment potentiometer
- it can achieve the full 10V on the output, even if the supply is a bit below 12V (so it works fine with the 12V-ish output of my VFD)
Slight downside: The module from above doesn’t have an optocoupler on it, so one needs to add one separately.
For myself, I actually hacked together a PCB in EasyEDA with an optocoupler and also some additional I/O channels:
https://oshwlab.com/hcsts/cncopto_copy
(please excuse poor design and use at your own risk … I’m not very experienced in circuit and PCB design) -
RE: Duet WiFi Expansion Board. PMW Control of 80W Laser Module
@allsirius I'm using more or less the same laser module, probably just another form factor: LaserTree LT-80W-LE-Mini
I first used it with this circuit: https://photos.app.goo.gl/i8Mxxm5eNJhgfwycA
But now I have switched to the one from the wiki.
What is missing in the wiki is the info that this circuit needs a inverted signal.
And according to the wiki page about the breakout board, this is true there as well.
The example to control a servo is: M950 S0 C"!exp.heater7"
So, you probably have to use it like this: M452 C"!exp.heater7" F250And to control the fan you have to cut the +12V supply to the module.
As dc42 said, you can't use heater and fan outputs. If i recall correctly, they switch the negative side (GND).
So you probably would need a separate relay or so to do this. -
RE: laser as z probe
@chilli It is a number (between 0 and 1000 if I remember correctly) that represents the voltage:
0 for 0V and 1000 for about 3,3V (or the other way round, depends on the "I" parameter of M558). So you would enter something like G31 P500.
But I would try that out / look what G31 (without parameters) exactly tells when it is in the correct position.You also have to consider that these 1000 steps are the available resolution for the probe input.
So if you map the distance of 10mm to the sensor output voltage range, you actually get a resolution of about 0,01mm at the probe input.
Because of this, maybe the digital output would give you a better repeatability.
I think you should try both variants...For the probe input: @dc42 may correct me, but I think it shouldn't draw any noticeable current because it is a high impedance input.
There is also a 10k resistor from a RC filter which should limit it to 0,33mA (at 3,3V). -
RE: laser as z probe
@chilli I hope I understood it correctly, but I would do it like this for the analog output way:
For your example values: 10mm=0V / 5mm=2,5V / 0mm=5V
I would define the middle (5mm) as my target trigger point and later set my probe height offset accordingly (G31 Zxxx).
Therefor I would adjust the probe trigger value (G31 Pxxx) so it matches the value that the duet measures at 2,5V (or 1,65V in case of an ideal voltage divider).
This way, you can see if you are below or above the trigger point.Btw, we could also have a conversation in German if that helps...
-
RE: laser as z probe
Do you really need to deal with negative output voltage?
Pages 5&6 in the il1500 manual it look like you can set different output voltage range modes:
- 0V to 5V
- -5V to +5V
- 1V to 5V
So I think you can simply use the first one together with a voltage divider?
Well, any maybe you could simply use the digital output "LOW/HIGH judgment output".
Here you could use a optocoupler for isolation between it and the duet. -
RE: laser as z probe
@chilli Yes, I think so. Though, the needed resolution of the image sensor probably needs to be very high to achieve this crazy measurement resolution of 2-4µm... maybe they also use some clever algorithms to interpolate.
I just found this video with an illustration: https://youtu.be/g-EJ4FDB4qQ?t=34 -
RE: laser as z probe
@themelle I think the sensor @chilli wants to use does not work by the Time-of-Flight principle like the VL53L0X.
It probably uses triangulation / measureing the reflection angle by distance via a CMOS image sensor.
I saw a video about a similar sensor a while ago: https://youtu.be/0D9nJIzNVTY?t=130