×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Question about Encoder/Counter

Question about Encoder/Counter

Question about Encoder/Counter

(OP)
Hello all  I have a pretty simple question (I think) for guys that are familiar with steppers and encoders.

I am getting a nema 23 stepper from US digital with an E2 encoder, that will go into either a LS7183 or LS7184 "Encoder to a Counter Interface IC",  then output a clock and direction to an up down counter.  The counters they refer to on their site are 4 bit up down counters, so I assume you have to stack them to get the right size count you need, in my case I will need 3200 pulses total (half stepping = 400 per rev,  8 revs need for the application).  Ok if this idea is correct, what is the best method to serially get the count back into a processor?  Again my  assumption is to have a 12 or 16 bit shift register looking at the four   4 bit counters, then at the controllers request, read the count in.  

With very limited knowledge on the subject, here is the plan that hopefully someone can coroborate or destroy:

1. send a pulse and direction to the driver  (code to tell how many pusles to move using for next)
2. output from the encoder a BIT into an sr latch that essentially says "we moved 1 pulse"
3. read the latch into EncoderCheck input, if "1" then start NEXT

most likely use something like:

FOR StepCounter = 1 to 3200
 Pulsout StepPin, 5           'send a pulse, pause for time to allow latch to set
  If EncoderCheck = 0 then Problem    ' missed pulse = exit and solve it
   LatchClear = 1     'Reset latch to 0
   LatchClear = 0
    Next

Problem:      ' deal with what happened with missing pulse
 ReadCounter        'read the counter in serially to see where it is and adjust accordingly, re-home, reset counter to 0  etc

I hope this isn't too vague,  but how do you read a large value in serially from individual 4 bit counters?  Ideally, I'd like to find a 16 bit serial output up down counter, but I haven't seen such a thing.

Thanks for any tips on whether this is close to a good concept

Todd Chapman


    

RE: Question about Encoder/Counter

The simple way is to use a micro with a 2 phase up/down counter periferal, not the most common feature but there are plenty if you look around. Alternatively you could built 1 in a PIC using software and transmit it over a serial link to your main processor.

RE: Question about Encoder/Counter

please read the suggested FAQ.
How many do you need? Did you select processor?
What else has the processor to do ?

Plesae read FAQ240-1032
My WEB: <http://geocities.com/nbucska/>

RE: Question about Encoder/Counter

(OP)
Thanks for the info.  I am currently programming on the Parallax Stamp BS2P40 as it is easy enough to program with no lower level skills.  After I get the project totally coded I am going to have someone transfer that Pbasic to the SX chip for which there will will only be minor syntax changes.  The Stamp is currently recieveing inputs from several Qprox sensors hooked up to touch pads for control.   am either going to use my own Hbridge driver board with a product called an IR2184 mosfet driver, with current limiting PWM on the low side using a chopper circuit.  The Stamp is sending direction and Steps to an EDE1204 bipolar driver.  So in short, the processor is managing all keypad inputs, sending outputs to tell the stepper where to go, counting pulses to maintain absolute control of where it is.

The product is a high end laminated galss door built in  pocket door system, the quantities will be low(10-20 per month) for the first year, and has not been released yet as we are prototyping still.  

The prototypes I have now are using off the shelf servos with 10:1 Gear boxes and their own controller that I simply send Start, Stop, and 4 daddta bits to access 1 positions that are programmed with a PC into their controller.  I want ot reduce the cost of that system which is $800+ down to the 250 range using a stepper and driver running off my own processor.

The processor will either by itself or with an addtional processor connect via ethernet and X10 to a central station that can be remote controlled or monitored.  

I love DIY, and since I have the Stamp running the system flawlessly, I wanted to next tackle running the stepper.

I know there are PICs that would be better suited, but that means a big learngin curve for C, or a vriant, and I don't ave time for that load, so I am sticking with Parallax basic for use with their chips, maybe even use the Propeller chip in the final product which is 8 32bit processors in one package that can program with a basic style language as well.


I think cbarn is right to try to let the processor count and forget shifting it in.

Thanks

RE: Question about Encoder/Counter

(OP)
This is not the best are to have posted the question, I am rephrasing and moving to Electric motors and motor controls, as that seems more appropriate for the content.  

Thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now