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

Can i use a encoder with step only instead of a quadrature encoder #52

Open
Animalrsa1 opened this issue Aug 6, 2018 · 23 comments
Open

Comments

@Animalrsa1
Copy link

Good day, many thanks for making your work public, i was wondering if it would be possible to use a step only encoder (no direction) with your project to control the position of large dc motor, ramps will still send its normal step and dir but the closed loop will only be on steps, is this possible?

many thanks
Tony

@misan
Copy link
Owner

misan commented Aug 6, 2018

Hi @Animalrsa1,

It is not possible.

A tachometer gives you information about motor speed but not direction.

A position control needs to know the direction of each motion to be able to accurately track motor shaft position. Without that, it won't work.

You could use that for a speed control though.

@Animalrsa1
Copy link
Author

Hi

many thanks for the swift response, if possible could you assist with a cost effective solution to a quadrature encoder. i want to use wiper motors to move my mill.

thanks again

tony

@misan
Copy link
Owner

misan commented Aug 6, 2018

@PaulRobert1
Copy link

Hello, lemme say, i tried that, bo matter what you do the motors are slow and will overheat fast, if ur pid is too low they wont move properly, if u go higher so ur motor spins up right, it will overheat . U coud drill holes in the motor and cool it by forcing air trough, but u coud try either try servo motor from say a opel corsa steering or bmw x5 compressor motor, etc. I just got some oldschool dc motors wich have 4 huge brushes and rotor, they have about 500 watt, got them at the junkyard. And i used ibt_2 h bridges. Hope this helps.

@PaulRobert1
Copy link

Cheap encoder link, u have to make the disc, i made it with a 3d printer

@PaulRobert1
Copy link

And mirror on the other side, and disc must b thin

@Kadah
Copy link

Kadah commented Oct 19, 2018

If I'm reading the datasheet right on the AEDR-8300, the code wheel will need to be 8.35 lines/mm (212 LPI), which seems like it would be somewhat difficult to print.

@PaulRobert1
Copy link

You could go with as many lines as u can, like i did to test and get used to the whole thing until u scavange the real deal :) here s another link to a encoder

@PaulRobert1
Copy link

U got to open it, inside u will find 2 empty pads ready 2 solder components, solder 2 4k7 resistors on the pads before giving it a go.

@PaulRobert1
Copy link

With 3d printed encoder disk i managed to get a precision of 0.1, wich isnt that bad taking into account the disk precision

@PaulRobert1
Copy link

Or go to the scrap yard and get encoder strips from old plotters

@patracy
Copy link

patracy commented Jun 30, 2022

I believe I have the same issue. I stumbled upon this project in the hopes that the controller could be used to build a controller system for a Pegasus robotic arm. The vendor that made the arm (it's a "educational robot") isn't much help as they won't share any specifics about the computer control setup (which I'm lacking here). I picked up a nvcmv2.1 and was able to drive the motor on the x axis forward and backwards. The problem is the encoders on these motors are a very fine incremental/step encoder rather than a absolute. The motors themselves have easy access to the encoders. It's just a set screw that holds the disc on. And two screws that hold down the encoder. Is there a encoder I could retrofit onto the backend of the motor to convert it over to a quadrature encoder? I saw a link above for one, but that's really a sealed unit that couples to the shaft. I was hoping for a simple disc and new sensor to convert it. I can get more measurements of the disc diameter and the mounting holes of the sensor. The shaft is only about a 1/8" diameter or a little more.

Edit: would one of these work?
https://www.ebay.com/itm/223514147915

I think I could likely drill out the disc to fit the shaft. And 3d print a holder for the sensor setup.

@misan
Copy link
Owner

misan commented Jul 1, 2022

@patracy: an incremental encoder usually provides a quadrature output, that can be used to obtain an absolute position if you pair that with a way to detect a reference [home] position when booting up. The encoder you linked is a low-resolution unit (only 12 pulses per revolution), it is an incremental encoder, and it provides a quadrature output too.

Alternatively you can use Magnetic encoders to obtain an absolute position (angle), like the AMS5600: https://ams.com/as5600

@patracy
Copy link

patracy commented Jul 1, 2022

I have tried the dcservouno sketch. But it acts very strangely. The motors I have have a HEDS-9000 encoder on them. They have a 500cpr on them. When I power up the arduino I get nothing out of the serial port. But when I disconnect the encoder A/B leads, it will then provide the menu. I can then reattach the AB leads and I am able to home it. Set to T mode and it will randomly move as expected. I was having jitter at home when I first started it but I put P down to 1 and it seems to be behaving now. Is this encoder setup going to be too much for the mini as far as counting goes? I know it's going to be excessive since it's a gearmotor setup on the number of counts.

https://docs.broadcom.com/doc/AV02-1867EN

@patracy
Copy link

patracy commented Jul 5, 2022

I think maybe the encoder setup is just simply too much for this. It's 500cpr on the motor shaft side of things, feeding a gearbox. I bought this cheapo DC motor/encoder just to try it out and it behaves just fine it would seem. I'm going to try a hall effect encoder like it has on the style motor I have and see if that would help.

https://www.amazon.com/dp/B0833X3KY3?psc=1&ref=ppx_yo2ov_dt_b_product_details

@misan
Copy link
Owner

misan commented Jul 5, 2022 via email

@patracy
Copy link

patracy commented Jul 7, 2022

The time to get encoders vs the cost I picked up some AS5600 encoders. I'm using a nano. I tried flashing the magnetic encoder firmware, but I get a bad checksum error when I connect to it over the serial port. (I think it was the mega version, I do recall it warning about stability when I flashed it due to low space) I tried to compile the pro micro mag encoder under the nano, but it gives me PINF related errors. So I simply set it to micro. I've ordered some pro micros that should be in tomorrow. ( https://www.amazon.com/dp/B08THVMQ46 ) I'm going to give that a try with the magnetic encoder setup. Otherwise I'll order some more hall effect encoders and wait for those. Since I know that works.

@misan
Copy link
Owner

misan commented Jul 8, 2022

The checksum error is about the EEPROM storage not being initialized. Once you use "W" command this should go away.

@patracy
Copy link

patracy commented Jul 8, 2022

It's unresponsive when I try to type anything. The L led goes solid.

@misan
Copy link
Owner

misan commented Jul 8, 2022 via email

@misan
Copy link
Owner

misan commented Oct 11, 2022 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

5 participants