Skip to content
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

Question about Hardware? #1

Open
Bastler100 opened this issue Jun 21, 2019 · 36 comments
Open

Question about Hardware? #1

Bastler100 opened this issue Jun 21, 2019 · 36 comments

Comments

@Bastler100
Copy link

Hello,
are there additional infos about the Hardware/Board, that can be used with this
software?
Thanks
Hans

@arttupii
Copy link
Owner

This project has been discontinued (too much other projects)... But I added some files into the repository for you (Readme&schematics).
I have not tested this completely so there might be "some" bugs.

ArchitecturePicture

@Bastler100
Copy link
Author

Hello Arttupii,
many thanks for your answer. Sorry but I am poor software designer. In the new StepMotorLoop.ino are
new kind of inputs: "IN_STEP0 and IN_STEP1"? Do you think its possible to change the software for universal controller. A standartstepper with a encoder heds or similar( inkremental output a + b ), a standart motor driver and a Arduino nano with build in usb-connector. So it will be able to use the controller with all kind of stepper with related driver?
Thanks
Hans

@Bastler100
Copy link
Author

Bastler100 commented Jun 22, 2019 via email

@Bastler100
Copy link
Author

Bastler100 commented Jun 22, 2019 via email

@arttupii
Copy link
Owner

Hi,

In the new StepMotorLoop.ino are new kind of inputs: "IN_STEP0 and IN_STEP1"?

IN_STEP1 define can be removed. It is not used.

Do you think its possible to change the software for universal controller. A standartstepper with a encoder heds or similar( inkremental output a + b ), a standart motor driver and a Arduino nano with build in usb-connector. So it will be able to use the controller with all kind of stepper with related driver?

You can use any Arduino board that has at least two external interrupt pins (nano is ok).
A rotatery encoder could be a problem if your rotatery encoder uses quadrature signal.
The current code doesn't support quadrature signals without modifications (you must rewrite interrupt functions). Only step/direction incremental signal is supported.

@Bastler100
Copy link
Author

Hello Arttuppi,
I will attempt to build your controller with a taller pcb and a stronger stepper driver like a TB6600
to mount it on a NEMA34-Stepper. When I was successful I send here e message.

Thanks
Hans

@arttupii
Copy link
Owner

Check this commit. I added the support of quadrature incremental encoder.
8436964

@Bastler100
Copy link
Author

Hello Arttuppi,
many thanks for your answer. My idea for incremental input was to use a standart incremental encoder
without the AS5040. I will now attempt to create a PCB for the first code and will order some from a china pcb manufactorer. In dimensions for mounting on a NEMA34 stepper.
Thanks
Hans

@Bastler100
Copy link
Author

Hello Arttuppi,
I want to use an encoder, because it is very difficult to solder the small ssop16 package, the Arduino
had only to read the A + B signal and need no power for controlling the AS5040, and I have some open frame encoders in my stock.
Thanks
Hans

@arttupii
Copy link
Owner

arttupii commented Jun 24, 2019

My idea for incremental input was to use a standart incremental encoder
without the AS5040.

That's what I thought. Now you can use standard encoder without code changes (just enable QUADRATURE_MODE flag).
Standard

@Bastler100
Copy link
Author

Hello Arttuppi,
in the code are librarys used. Can you tell me where I can find the micros.h and the millis.h library.
Its possible to use the last code with a standart encoder or with the AS5040 in incremental mode?
In this case it will be required to set the AS5040 in incremental mode about OTP-Mode-Register.

Thanks
Hans

@Bastler100
Copy link
Author

Hello Arttuppi,
I see you create a new code for the mode with standart encoder. I think there is now a code for the encoder and an other code for the AS5040. Do you think its possible to show both codes in the Git?
Is the serial operation for a dro? Can I deactivate the serial operation?
Thanks
Hans

@arttupii
Copy link
Owner

arttupii commented Jun 26, 2019

Hi,

Can you tell me where I can find the micros.h and the millis.h library.

Millis.h is in here: https://github.com/arttupii/ArduinoHelperLibrary

Its possible to use the last code with a standart encoder or with the AS5040 in incremental mode? In this case it will be required to set the AS5040 in incremental mode about OTP-Mode-Register.

I removed "Step / Dir-Mode" support. You can now only use quad A/B-Mode. Luckily it is a default mode for AS5040, so you don't need to modify OPT-Mode-Registers anymore. Just connect AS5040 and arduino nano to each other. Also standard encoders are using Quad A/B-Mode (e.g. HN3806-AB-400N).
So, the same code supports now AS5040 and standard encoders... But the circuit board must be redesigned because of latest code changes (and quad A/B-mode). :(

Capture
Capture12

Do you think its possible to show both codes in the Git?

The same code supports now AS5040 and a standard encoder. We just now use quad A/B-Mode instead of Step / Dir-Mode in AS5040.

Is the serial operation for a dro? Can I deactivate the serial operation.

Yes it is... You can deactivate it.

@Bastler100
Copy link
Author

Bastler100 commented Jun 26, 2019 via email

@arttupii
Copy link
Owner

QuadAB works now. See demo video https://youtu.be/jLogS5AQ-yQ

@Bastler100
Copy link
Author

Bastler100 commented Jun 27, 2019 via email

@Bastler100
Copy link
Author

Bastler100 commented Jun 30, 2019 via email

@arttupii
Copy link
Owner

It is not necessary that the steps are the same, but you need set them in config.h.

#define ENCODER_PPR 1024 //Pulses per Revolution (AS5040)
#define NEMA_MOTOR_FULL_STEPS 200
#define NEMA_MOTOR_MICROSTEPS 16

@Bastler100
Copy link
Author

Bastler100 commented Jun 30, 2019 via email

@Bastler100
Copy link
Author

Hello Arttuppi,
in the newest shematic I see a connection from the AS5040 index pin to the Arduino. Can you tell me in what kind of way the Arduino analyse the index impuls?
Thanks
Hans

@arttupii
Copy link
Owner

arttupii commented Jul 1, 2019

Hi, It indicates the absolute zero position. It can be used to automatic calibrating in the future.
But I have no plans to use it.

@Bastler100
Copy link
Author

Hello Arttuppi,
I see that you add some additional modes. Are they able to work as standalone version, or are they all parts from the StepMotorLoop.ino?
Thanks
Hans

@arttupii
Copy link
Owner

arttupii commented Jul 6, 2019

Hi, There is only one new mode and it is LOAD_POSITION_CONTROL mode. STEP_LOSS COMPENSATION is the original mode (and it is also the default mode). You can select mode from config.h file.

@Bastler100
Copy link
Author

Hello Arttuppi,
the AS5040 is very difficult to etching / milling and soldering. I found the AS5601. This IC has a pitch 1,27mm and an output A + B, but no Index. Do you think its possible to use the AS5601? There are more position sensors with a pitch 1,27mm, but they have this output: step and direction.
Thanks
Hans

@arttupii
Copy link
Owner

HI, AS5601 should be OK. It is even more accurate than AS5040. index pin is not needed.

@arttupii
Copy link
Owner

We have performance issue with Arduino Nano. I got today a optical encoder HN3806-AB-400N. It sends 1600 state changes per rotation. It is too much for Arduino Nano and A/B phase synchronization is lost. It doesn't matter how fast motor is running. The shaft of the motor moves too fast between the steps and generates too many interrupts for Arduino. Perhaps we should port the code for ESP32 or just use only AS5040...
image

@arttupii
Copy link
Owner

I cannot reproduce this anymore.... It was just bad wiring.

@Bastler100
Copy link
Author

Bastler100 commented Jul 11, 2019 via email

@arttupii
Copy link
Owner

arttupii commented Jul 11, 2019

Hi, Looks like stm32 is very cheap chip, so it would be ok (perfect) for this use. But I think Arduino Nano is enough when we reduce the number of pulses. In the latest code, you can now select resolution of the encoder. You can double or quadruples the resolution of the encoder. Or just use 1x resolution.

@arttupii
Copy link
Owner

arttupii commented Jul 11, 2019

Hi, I also changed pin map. A/B signals are connected now to D2&D3 pins on Arduino Nano. Thanks for the comments.

@Bastler100
Copy link
Author

Bastler100 commented Jul 16, 2019 via email

@arttupii
Copy link
Owner

Hi, No problemo. I can check the connections.

@Bastler100
Copy link
Author

Bastler100 commented Jul 25, 2019 via email

@arttupii
Copy link
Owner

Hi,

My plan is use nema23, TB6600, HN3806-AB-400N rotation encoder and arduino nano (+ extension board https://tinyurl.com/y2pt8n8q) in my cnc router. TB6600 gives max 5A. TB6600 and nema23 because my cnc router uses them currently and I don't see any reason replace them. AS5040&A4988 solution is for my delta 3D printer.
I have no other ideas or plans.

@Bastler100
Copy link
Author

Bastler100 commented Jul 29, 2019 via email

@Bastler100
Copy link
Author

Bastler100 commented Sep 11, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants