Arduino IO Expansion

More
1 year 9 months ago #318198 by Cant do this anymore bye all
Or for inputs you could use one of those USB arcade boards which appear as a HID, whether you are going to use the arduino or HID device, it's all going to filter its way through the USB stack.

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #318200 by blazini36
Replied by blazini36 on topic Arduino IO Expansion
The MCP23017 is for inputs OR outputs. In the keypad example it is independently controlling the LEDs inside of the pushbuttons.

Like I said it has almost nothing to do with a keypad, this is just IO, it could be anything so I have no specific use for keypad encoders.

You can see there I'm using 4 16bit IO expanders, that's 64 extra IO from a single I2C port. These use 3 address pins so you could be using 8 of them on 1 I2C port. I already made this so I don't have any use for some other type of hardware plus that is not useful to other people.

The code will eventually get stuffed in there, even if I have to fork it and bribe a friend to do it.

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #318602 by blazini36
Replied by blazini36 on topic Arduino IO Expansion
So an interesting thing happened last night......

I was watching something on Youtube and someone mentioned ChatGPT, which reminded me how I joke with a friend that his code sometimes looks like ChatGPT wrote it.

So then It dawned on me that I should peg ChatGPT about adding the I2C IO to Arduino Connector. I'd never used ChatGPT before but I figured why not......

A couple hours later I have  the MCP23017s all working as inputs/outputs within Arduino Connector......

I was pretty blown away by how that turned out.
The following user(s) said Thank You: tommylight, besriworld, AlexMagToast

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago - 1 year 9 months ago #319177 by AlexMagToast
Replied by AlexMagToast on topic Arduino IO Expansion
Hello my guys, I am very surprised of how much conversation I have missed, somehow I was not notified of new posts in this thread.
@cornholio and @blazini36 honestly between your "discussion" I was not able to understand what exactly you suggest.
I have been in several discussions in the direction "USB -> bad :( " where we explored other connection possibilitys, for example Ethernet TCP and UDP connections.

Personally I feel like USB offers a good ratio between ease of use and speed good enough.
However I do see the benefit of offering a faster Option for those that need it. But at the end we have to see that Arduino-connector offers a cheap alternative to Mesa Cards, but it will always have its limits and at some point the user should consider just using a Mesa card instead.
As I am not a very experienced Programmer I am always very happy for advice, so please continue to share your knowledge.

Currently I am reworking the Codebase to implement 2 basic but drastic changes.
1. The Configuration will change to a single YAML Config file, inspired by Klipper and ESPHome. This will allow to copy/ paste Feature specific configs more easily. Also a lot of Emails I get are related to little configuration mistakes. I hope this change will help people get it right more easily. 

2. The old Serial connection sends Pin states encoded in a string. The new version will send everything directly in a bitstream, so for example 8 Input Pins can be transferred in a single byte. The cost of that change is that the user looses the possibility to communicate with the Arduino manually for testing. I expect the communcation to speed up quite a bit from this change - pun intended.

Additionally I have collected a lot of feature requests to support more Hardware and offer more logic for existing features, which if i find the time i am willing to implement in the future.
Hopefully I will be notified again in the future so I can answer more quickly in this thread.

Cheers from Germany!
Alex
Last edit: 1 year 9 months ago by AlexMagToast.
The following user(s) said Thank You: besriworld

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #319184 by Cant do this anymore bye all
I wouldn’t be of the opinion USB = bad. I think it can be let down at the physical layer by less than great cables.
Whilst not the greatest fan of Arduino, it does allow for projects like yours and sharing is quite easy. Developers such as yourself should be thanked, as there is a lot of behind the scenes frustrations, hopefully you didn’t pull too much hair out. Keep up the great work.

Just another thought, Ethernet would add a bit of extra cost, and could mean a 2nd Ethernet card for the pc and such. And complexity for some setting it up. USB\Serial keeps it easy.

All the best from Down Under
Rob

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #319208 by blazini36
Replied by blazini36 on topic Arduino IO Expansion
An Arduino is just a board with a microcontroller on it, there's nothing wrong with the Arduino itself. Plus the fact that you can get into much faster microcontrollers with the same Arduino framework makes it alot easier to deal with.

The problem with USB isn't the speed, it's the fact that it has to run in userspace. A USB serial port isn't using a fraction of the speed of USB anyway and the 10/100 ethernet that Mesa uses isn't exactly fast either. USB is always mentioned with this but realistically it could be any serial port. That's where the more productive part of the conversation was going, the fact that a serial port technically can be made to run on the real-time layer. Nobody has ever bothered to make the LinuxCNC component for real-time serial which baffles me since LinuxCNC loves legacy interfaces.

The PC side of this is written in Python anyway, it can't even be real-time from that angle. It'd have to be reworked into a C component. Alex mentioned the Mesa card but a Mesa card for something like this wouldn't be doing anything special that an Arduino can't. The only draw for the Mesa card is the fact that it has a ready to go real-time environment already setup. The Mesa cards intended for use with a control panel aren't even FPGA cards, I believe they run a PIC MCU so hardware wise they aren't really special other than just being well designed.

Please Log in or Create an account to join the conversation.

Time to create page: 0.183 seconds
Powered by Kunena Forum