Advanced Search

Search Results (Searched for: )

  • blazini36
  • blazini36
19 Jan 2025 06:23 - 19 Jan 2025 06:28
Replied by blazini36 on topic Arduino IO Expansion

Arduino IO Expansion

Category: Show Your Stuff

Nice setup old chap, puts my merger efforts at PCB design to shame.

I remember there was a thread about the BSPI thing, tried searching but couldn't find it.
 

Yeah I make plenty of PCBs, I tend to make one or two revisions, get everything working, and then stuff it on the shelf because I stop working on whatever it was mean for.

That one was for a pick and place machine I made that I wanted to get working with OpenPnP on top of LinuxCNC. I did get it moving around but I was having too much trouble getting both OpenPnP and LinuxCNC to play nice......so on the shelf it went. I don't really have the attention span to try to get LinuxCNC fully integrated for a PnP by itself but I'm sure it can be done, the guy who does the Mitsubishi servo cards managed to do it.

These break out boards intended for Arduino Connector have probably been sitting around for like a year now. Had to bodge out a couple of mistakes on both the Mega and Teensy 4.1 versions but it'll be good enough to get my control panel finally working. Then I'll go back and make a (hopefully) final revision.
  • blazini36
  • blazini36
19 Jan 2025 06:17
Replied by blazini36 on topic Arduino IO Expansion

Arduino IO Expansion

Category: Show Your Stuff

I like the I2C IO expansion Idea. I don't have these chips here yet. As I am working on the next Version of Arduino Connector I would implement it in the newer version as it will improve on all the Issues learned from the current version, as it will also get rid of the #defines etc for the user.
Also I forgot to mention that the new Version already supports the connection to multiple Arduinos simultaneously.

If you would like to peek into it you can see it on Github in the dev branch, but keep in mind currently it doesn't work.
Here is a preview of how the new Yaml configuration looks like: github.com/AlexmagToast/LinuxCNC_Arduino...lob/dev/config2.yaml


 

Yeah I've seen the v2 but never tried it because it's mentioned in the repo that it doesn't currently work.

I got my Teensy 4.1 break out board working and that handles the encoders much better than the Arduino Mega. The Teensy doesn't have that many IO pins so I have an I2C expander right on the break out board in addition to the 4 expanders on the keypad, I've got that working too.

I'm using MCP23017 expanders on these but I've used PCF857x on other boards, they aren't pin compatible but the libraries are similar.

Right now I'm just looking at how Arduino-connector handles connection states. It seems that even the normal outputs don't reset when LinuxCNC is closed so things that were previously on (like LEDs) stay on. The same happens with the I2C outputs so I suppose it's expected.  Not sure if that's the intended behavior but I've trying to figure out how to reset all outputs (pull low) on disconnect. It's a bit hard to debug since there's only 1 serial connection referenced and it's taken over when LinuxCNC connects, but I have another serial port I can direct debug prints to.

Other than that it all seems to work pretty good, I found a blocking delay in the comalive function that was creating a bit of delay. I replaced that with a timer and it works much better. That plus the tweaks mentioned in the git issues, it's pretty responsive now.

Once I get done putzing around, I'll clean up my code a bit and upload it somewhere.
Displaying 19951 - 19952 out of 19952 results.
Time to create page: 0.409 seconds
Powered by Kunena Forum