-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to include THC into the Teensy 4.1 using web builder #2
Comments
It fails to initialize if there is no analog input available - a message is output but lost due to the connection to the board happening after the message is sent. I guess I should add info in the $I response about failure to init... @phil-barrett has made a board providing isolated analog input via I2C but this is not yet available? I have one and there is code in place to read data from it. The board is based on a MCP3221 ADC. More work is needed on the plugin and I need someone with a machine to help out as I do not have one myself. You can do that? Which aux pins to use for the control lines is configurable via $-settings, default configuration is available via the |
Thanks for the info. I am willing to test but I am new at this, my plasma cutter has the typical CNC connection, ie: torch start, ARC voltage, start cutting. I am using only the torch start control lines (connected to the spindle control line on the board) and I have been able to start and stop the torch leaving other CNC control lines open. The machine will go through the whole g code and cut to completion. I would like to connect all the other control lines and implement the THC function. Any help will be greatly appreciated. Thanks. |
ARC voltage requires an analog input - that would be the first hurdle. You can ask Phil if he has any available?
Click Edit in macros frame, select the macro, delete the contents and press Ok. |
I may have a couple. Will be back from Vietnam on the 25th so will check then. |
OK will wait for Phil to come back and go from there. As for the macro, it was strange, I did exactly that before, but ioSender showed a blank macro, I can not get rid of it no matter how I tried. I tried again after your info. it disappeared, I must have done something wrong. Thanks. |
Me and a friend are in the process of building a diy plasma cutting table pretty big and heavy (2.8m x 1.7m table) and made the first successful tests moving the x and y (2 motors, self squaring) axes using an Arduino mega with Grbl 1.1. |
I checked and do not have any ADC boards left. Sorry - I only had 5 of them built. But, I am putting an order together for a batch of them (at least 10, maybe more) and will hopefully submit it tonight (jet lag willing). I need to make a few changes (different V Reg and layout change for mounting holes for more secure mounting). The factory was running 5-7 days for delivery in March so it shouldn't take long. I will sell these for a bit over cost (probably $10 USD) plus shipping/handling (around $5 USD for US delivery). Will be precise once I know actual costs. Note, if I productize them, the cost will go up - early adopters get a break. If I don't productize, I will release the files open source for anyone to use. Also, I will create a github page for the design/board in a few days. Phil |
Great, the main challenge is to insert Z-axis motion - currently I use a separate timer to generate steps, somehow they should be added to the regular step generation.
It depends on the mode - an external THC that outputs up/down signals can also be used. |
After interminable delays, I have the ADC working with isolated voltage support. (had counterfeit isolator, that was one problem, design error another, sigh) I'm trying to simulate the THC but don't get $352-$357 showing up in grbl settings? Not sure how to proceed. Also ioSender has these options for $350 - Off, N/A and Up/Down. How does that map onto modes 0, 1 and 2 as listed in the THC project Readme? Is 0 for Off? Seems a bit counter intuitive. I want to test the ADC to make sure grblHAL is seeing it. I have a stand alone program that verifies the ADC is working correctly so I know the HW is ok. Suggestions? [VER:1.1f.20230913:] |
If the board is not powered or the ADC driver is not compiled in the settings will not show up.
It maps 1:1, for now. I have to update ioSender to remove the N/A (Not Available) option when the ADC is not installed. The ioSender settings UI generally hides the mapping between setting values and the textual representation, however it is still available via
and this if not:
|
Fixes commited, Web Builder now adds the ADC driver code when the plasma plugin is selected - but it should be a separate option? |
Thanks for the update. will test today.
I don't have an opinion yet. will play with it more and get back to you. |
That works. Really nice with ioSender 2.0.44p3. A couple of nits - in the plasma flyout, the voltage display is in mV but only shows the highest 3 digits. Also, I think it is presuming the ref voltage is 4096 but in the case of the current ADC, it is 5V. I plugged in 1.2 for PAV scale ($361) and got exactly what my multimeter was showing. Sorry for reporting ioSender issues here. will do so in that repo. I will look through the code but how does it go from input voltage to arc height? I've still got a lot to work go through but have sent off for a small run of boards. That damn 3221 is relatively expensive for what it does. Looking at a cheaper TI ADC. |
I'll have to create a new edge version, I'll do it tomorrow:
$361 - $363 controls the conversion. I have yet to test this - and the feedback loop has to be verified and likely refined. |
OK, that is in volts, not mV? Makes sense. Target voltage is 100V for most Plasma Cutters? I have my input voltage dividers set up to have 2.5V as the median input to the ADC to give the max range, up and down. I'll look for 44p4. github repo for the the ADC is here. Pretty bare bones right now. Will add more today/tomorrow. comments welcome. |
I recently discovered this project while working on a custom board (and my own thc implementation) for fluidnc. Was actually modifying my torch ADC to add isolation and stumbled on @phil-barrett MCP3221 BoB. By the looks of it I should be moving on over here. I can help with THC testing but want to double check i have the right idea for setting up a testing environment as im new to grblHAL. Thinking a GRBLHAL2000 with the MCP3221 is safest place to start? I was thinking of whipping up a board that integrates the Isolated ADC with the USB-C (for I2C pendant) passthrough onto the two headers of mainboard. From what I can tell, the I2C is bog standard for pendant so I should be able to have both? I have two plasma tables that can be relatively quickly adapted to this project for testing. What's the best way for me to help? |
Does the GRBLHAL2000 have the I2C header? The pins on the ADCI_1 are set up for the T41U5XBB so might need a bit of adapting. I should be be getting the beta test batch on monday. |
From what i understand the grblhal2000 is using I2c for the breakout for the jog2k, which then fires i2c over a usb cable with some pricy extenders. Its a different header layout than what your using though. That said, your T41U5XBB looks better for testing anyhow so I ordered one. Thanks! |
I anyone is interested, I just got the beta build of the ADC with vreg on board for isolated power input. I have a few available. It seems to work ok. More about it here. |
Some new updates has just been committed. Here is a video of Voltage Mode in operation with my test jig. Currently the code only emit steps at 1KHz to keep the arc voltage in range, no PID and no acceleration and deceleration. |
@terjeio when I have no ADC connected I see this Should $350 have 0 and 1 available with no ADC connected or 0 and 2 (up/down) as you mentioned above? In web builder 0.8 a few days ago I could see the THC flyout in a version of IOsender I frankly cannot recall. However I cannot see the flyout with web builder 0.9 IOsender (Edge 2.045p1) . Can I assume this is expected or do I have another issue before I proceed with getting an ADC connected. Also there are a lot of MCP3421 modules available that may help testing. Would it be easy enough for a typical user to make the code adjustments to enable the 3421 from the 3221 code? |
It depends on whether the ADC code is compiled in or not, not if it is connected. If compiled in the up/down ports are not claimed by default, change $368 and $369 to valid aux ports then reboot to add the option to $350,
Perhaps, if able to read the datasheet and configure the chip correctly. I would modify the 3221 code first to make it easier, no other changes are then required. If adding the code in a new file with new function names changes has to be made elsewhere. |
@terjeio the adc code is compiled in (#define MCP3221_ENABLE is set to 1 in my_machine.h). I have no $368 and $368 settings. Is there a way to enable from the CPU_map file. By the way I'm not sure I need up/down if arc voltage mode works. For now I will make a breakout board for the 3221 adc, these are in stock at digikey. |
@troth530 You have to enable the plasma plugin. If you have done this already then what is your |
Finally getting back to this project. I have the mcp3221 running with a pot as per phils design, and ~2.5v driven in. I have compiled the firmware using the website and selecting the Plasma/THC plugin and do not see the THC monitor menu on side (iosender 2.0.44). I also compiled from source selecting the THC module and the ADC module and am having same issue. also tried iosender edge 2.0.45p3. I see some discrepancy with above ([PIN:MCP3221:0,Aux analog input 0,Arc voltage], no E0) but can provide the following $I, $pins if this helps I also see the above comment, but not sure what enough aux input pins means in this context?
|
When the analog input is "claimed" by the plasma plugin it can no longer be read by M66.
Some driver/board combos does not have any/enough input pins, yours have.
Yes, you have to assign one of the aux inputs as arc ok with $367. See the board map for details. Input 6 (or 5) is perhaps the best choice since it has an optcoupler in front. |
Thanks, assigned input 6 to that a bit ago. I still have no access to the other specific THC components $352-$357. Is there some option in web builder i'm missing beyond the required THC? I have tried quite a few variations of options. $$=352 |
Oops - I broke the settings handling earlier. I just committed a fix that hopefully works. |
That seemed to fix it, Thanks! Menu is visible and i can read the pot voltage |
Tried several time by adding the THC plugin on the web builder, but the firmware generated did not include the THC .
also like to know where all the control lines from the CNC Plasma cutter connect to on the phil-barrett breakout board, can not find any documents on that. Thanks,
The text was updated successfully, but these errors were encountered: