![]() You need to look for an Arduino Library called AccelStepper, it also has example code for you to start programming for your stepper. You may need feedback from the stepper shaft to make sure it is moving the correct amount.Ĭan you post the code you have and a circuit diagram for the encoder part. I hope your stepper is strong enough to do the job, because if it skips a step due to too high a physical load then you will be in trouble.Įlectronic gearboxes sound simple, but in real life they can be very hard to implement. Get the stepper code working, and understand how it works before attempting the combination of the two. Now you need to write code that ONLY drives your stepper, no encode code at all in it. You have code that reads the encoder, which is good. ![]() The Encoder is a BOURNS ENA1J-C28-L00128L with 128 pulses per revolution. Please read the first post in any forum entitled how to use this forum.īefore you worry about connecting the two together you need to write your code in stages. There is a driver for the Stepper Motor, which is a CWD556 and it is set to the minimum number of steps per rotation possible which is 400 steps. Thank you very much for anyone who can help Two contact points A and B are also present. I would very much appreciate if someone can play around with some code and explain what I'm after A slotted disk is present inside the rotary encoder which is ground by a pin name C. I want the stepper to rotate 0.8 of a turn constantly but as the encoder speeds Increases the stepper needs to speed be increased as well but I am unsure how to do this I don't know the right way of doing this but what I'm after is for every rotation of the encoder (2400 pulses). I have been able to find code and adapted so I can count the pulses (transitions) coming out of the encoder which gets 2400 per rotation of the encoderīut what I'm struggling with is linking that into the stepper motor the pins I'm using from the stepper driver to the Arduino are Micro stepper driver DQ860MA (So get 1600 steps per rotation on the moter) Nema34 a stepper motor Single Shaft 8.7Nm1232oz Incremental rotary encoder 600 pulses per rotation then have the stepper motor turning at a specific speed in relation to the encoder spinning for example a 12 to 5 ratio The project is, I wanted to is remove change gears from a metal lathe and replace it with a rotary encoder on the spindle, and put a stepper motor on the lead screw. when you start the arduino up, the code starts at zero and makes the number go up and down depending on the turns of the rotary encoder.Īnd yes, so if i turn it, the number goes up and down respectively based on direction.I am very new to the Arduino world having great fun working it all out but struggling with some code issues I am just using a generic rotary controller. how does it grab a number from what is sent across? ![]() ![]() Refer attached for my code - any help would be much appreciated.Īlso, if you could explain in the receiver (numbers only) code, what does this bit actually do - i.e. I'm struggling to convert the series of numbers into 1 step movements for the stepper motor. Transmitter to send a number based on the position of the rotary encoder.After trawling the internet and other people's projects and codes, I have managed to achieve the following: I have some experience with arduino before and have managed to put the hardware together, however, I am struggling with the programming side of things. The intention is to mount this to my super fine focus on my telescope as adjusting the focus while zoomed into Jupiter makes the image shake uncontrollably. 28BYJ-48 stepper motor and U0003 motor controller.I am attempting to create direct wireless stepper motor control via: ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |