Arduino IO Expansion

More
2 years 10 months ago #289155 by blazini36
Replied by blazini36 on topic Arduino IO Expansion
Is there any possibillity of adding a low performance stepgen with basic position feedback to this? I have a project where I need to remotely drive 3 tiny steppers @ 1khz max, possibly higher if microstepping is possible on that end but I'm not sure. Rest of the system already uses LinuxCNC and it wouldn't be practical to run these steppers from a Mesa card. I already have a custom PCB at that location, so I could add an attiny or something and communicate via UART @ 2.5mbaud. The documentation mentions this running over USB but it looks like it's just using the USB serial port so I assume UART would be fine as well?

Please Log in to join the conversation.

More
2 years 9 months ago #289457 by COFHAL
Replied by COFHAL on topic Arduino IO Expansion
I don't understand how to use the parameters, arduino. xx. x-invert. I understand that it is to invert the digital inputs.

Please Log in to join the conversation.

More
2 years 8 months ago #294515 by billykid
Replied by billykid on topic Arduino IO Expansion
I had made a meter for the current of a dc spindle with an acs712 connected to arduino nano analog pin 0 working with arduinoIO made by Dino. now I tried to install mint debian edition but I couldn't make it work anymore, so I tried arduino connector. Arduino is loaded in hal and also marks the analog value read, but when I want to use it it tells me that the pin does not exist. I attach the errors.

Please Log in to join the conversation.

More
2 years 8 months ago #294697 by AlexMagToast
Replied by AlexMagToast on topic Arduino IO Expansion
Sorry guys, I somehow was not notified by your posts.
@COFHAL If halrun can't find the py file run python3 --version.
then in the .py file change the first line to match your version, this seems to help.
Also arduino.xx.x-invert is a parameter you can set to True in your HAL file, to invert the Logic of this pin.

@blazini36 May I ask which usecase you have in mind? How would you like to interface with the stepgens?

Please Log in to join the conversation.

More
2 years 8 months ago #294698 by AlexMagToast
Replied by AlexMagToast on topic Arduino IO Expansion
@billykid
How are you using it? Maybe the arduino-connector is not loaded before hal tries to use the Pins?

Please Log in to join the conversation.

More
2 years 8 months ago #294718 by blazini36
Replied by blazini36 on topic Arduino IO Expansion
@Alex, you had responded to the github request I made of the same.

Please Log in to join the conversation.

More
2 years 8 months ago #294735 by billykid
Replied by billykid on topic Arduino IO Expansion
Now it works, I changed the position of the "loadusr arduino" line and it starts normally. it doesn't measure yet but I will have to change some settings... now pin a0 measures 511 which corresponds to 2.5 volts of the ACS712 sensor at zero current. However, if the current varies and the pin drops to 2 volts, the measurement on HAL does not move, it seems to only read the first time.

Please Log in to join the conversation.

More
2 years 8 months ago #294740 by AlexMagToast
Replied by AlexMagToast on topic Arduino IO Expansion
hmm, thats odd.

Please Log in to join the conversation.

More
2 years 7 months ago #294990 by blazini36
Replied by blazini36 on topic Arduino IO Expansion
I posted an issue in the git explaining most of the problems I'm having with this. Might be better to do it here. I'll attach some examples that do work since it may help.
 
There is some weird issue with loading the python component. I  made a separate hal file to load arduino-connector and make the connections. I kept getting "pin xxx does not exist" regardless of where "loadusr arduino-connector" was in the file until I set "[HAL] TWOPASS = ON" in the ini file.

I had some issues with encoders, first they were just counting non-stop but I realized this is just because of the joystick conflict, the joysticks have to be disabled in the firmware as well. I have 4 encoders. 3 are attached to both interrupt pins, 1 is no interrupt. 2 of the interrupt encoders work fine. The other 2 do not. I'm not sure why the 3rd interrupt encoder does not work as it doesn't work with a simple sketch using the QuadEncoder  library either. I found another sketch that uses no interrupt library and the 3rd and 4th encoder work fine with this. I guess the point is, arduino-connector does not seem to work with non-interrupt encoders for some reason.

This one works with the interrupts
 

Attachment not found



This one works with the non-interrupt encoders
 

Attachment not found



I can't get the key matrix or LED mux working at all really. The key matrix kinda works but the key pins are very unreliable. The matrix hal pins "stick" or don't register, or just register very flaky. I've tried setting the LED muxed hal pins and they just don't seem to work right at all.

I've tested the key matrix with this sketch, it works perfectly printing to the serial terminal:
 

Attachment not found



I've tested the LED matrix with this sketch, works perfectly:
 

Attachment not found



I've posted this before, this is the matrix circuit and Arduino connection
 

Attachment not found


 

Attachment not found



The Normal IO that I tested so far seems to work OK but I didn't spend a whole lot of time with it as I was working on figuring out if these issues were my problem or Arduino-connector.

Here is the firmware and python component I tried last, could be some issues here I'm not really one for code:
 

Attachment not found


 

Attachment not found






 

Please Log in to join the conversation.

More
2 years 7 months ago #295001 by tommylight
Replied by tommylight on topic Arduino IO Expansion
Is the encoder issue on Arduino Nano?
Nano has only 2 interrupt pins, Mega has 6, no idea how many the ESP8266 or ESP32 have.

Please Log in to join the conversation.

Time to create page: 0.250 seconds
Powered by Kunena Forum