3/25/2023 0 Comments Arduino nano pinout for funmoveThe images below show several views how to connect the PUSH BUTTON and the POTENTIOMETER on a breadboard and to the Arduino Mega.Īfter you load Example Sketch STEPPER_MOTOR_DRIVER_ARDUINO_MEGA.ino to the Arduino Mega the Stepper Motor’s Speed can be controlled by moving the Potentiometer that is connected to Pin A0 Arduino Mega. Sketch STEPPER_MOTOR_DRIVER_ARDUINO_MEGA.ino requires a Push Button to Reverse the Stepper Motor’s direction and a Potentiometer for Speed Control. PUSH BUTTON TO REVERSE STEPPER MOTOR ROTATION I set my DM542T Side Switches as shown in image below … If not using a ‘Push Button’ to REVERSE the Stepper Motor’s direction then just connect PUL+ and DIR+ to 5VDC on the Arduino Mega.Įxample Sketch STEPPER_MOTOR_DRIVER_TEST.ino does not need a Push Button. You Stepper Motor’s wires may be different colors and/or you may be using a different Stepper Driver but the important item to remember for my Arduino Example Sketches is to make sure the PUL- goes to Pin 7 on the Arduino Mega and that DIR- goes to Pin 6 on the Arduino Mega. The images below show several views how I connected my Arduino Mega to a NEMA 23 Stepper Motor and a DM542T Digital Stepper Driver. Remember when using this example sketch the Encoder connects to Pins 46,47,48,49,50,51,52,53 and GND on the Arduino Mega 2560 microcontroller.Īfter you know the OLED Display and ACE-128 Encoder are working correctly together, you can next connect a Stepper Motor and Stepper Driver to the Arduino Mega. Turn Clockwise from ZERO for Positive Values and Counter-Clockwise from ZERO for Negative Values. The Arduino Example Sketch OLED_BOURNS_ACE128.ino shows Bourns ACE-128 Encoder Value on the OLED Display. Once your OLED Display is functioning with the BOURNS ACE-128 Rotary Encoder there are many Example Sketches you can try out. Once you have Configured the #define statements then you will be able to run the Example Code I have placed on Github for download: Then … Delete the // marks highlighted pink in the image above …įinal step is to re- Save the ACE128.h file and Close NotePad. Next … Open the ACE128.h file in MS NotePad … Next … Do a search on your hard-drive and find the ACE128.h Library file … Use Arduino IDE Library Manager to install the ACE128 Library file … You just have to delete/uncomment some some Comment slashes // after opening the ACE128.h Library file in Microsoft NotePad. Sounds complicated, but it is very simple to do using MS NotePad. One item that causes confusion when using the ACE128.h Library for the BOURNS ACE-128 Encoder is that you MUST change/configure some #define settings in the Library file. IMPORTANT - ACE128.h Arduino LIBRARY Configuration.If you wish to use an I2C (4-wire) Backpack with the BOURNS ACE-128 Encoder you can order the I2C interface from Red Hunter on Tindie : I used pins 46 through 53 because I am using an Arduino Mega, but you can choose different pins on the Arduino UNO as long as you connect one of the ACE-128 encoder’s C pins to GND.īelow is how I connected the ACE-128 Encoder and an OLED Display to be able to run the example sketches on Github : I connected the ACE-128 C Pin to GND and Arduino Mega Pins 46 through 53 are connected to pins 1 through 8 on the ACE-128 encoder.Īrduino D46 to Encoder-1, Arduino D47 to Encoder-2,Īrduino GND to Encoder C ( Common Pin Each Side )Īrduino D48 to Encoder-3, Arduino D49 to Encoder-4Īrduino D50 to Encoder-5, Arduino D51 to Encoder-6,Īrduino D52 to Encoder-7, Arduino D53 to Encoder-8 It is a very accurate High Resolution Absolute Encoder – 128 positionsĩ wires are required to connect the ACE-128 to the Arduino Mega. I use the term Rotary Encoder however, the BOURNS EAW0J-B24-AE0128L is actually correctly referred to as an ‘Absolute Contacting Encoder’ because it does NOT need to be ‘debounced’ as other Rotary Encoders require. The main purpose of this post is to show How-To use the ACE-128 Encoder. STL Files for 3D-Printed Parts can be downloaded from GrabCAD:īOURNS ~ EAW – Absolute Contacting Encoder (ACE™) The 3DP Base has notches in it to add additional 3D-Printed mounts for items such as an OLED Display and the Bourns ACE-128 Rotary Encoder. I used Solidworks CAD Software to create a 3D-Printed Base for my Arduino Mega 2560 Rev3 and a Half-Breadboard. NEMA 23 Stepper Motor (23HS45-4204S) ( Amazon)ĭigital Stepper Driver (DM542T) ( StepperOnline) How-To connect a Stepper Driver with a NEMA 23 Stepper Motor.Įxample Code to control items with Arduino Mega 2560 :īOURNS ACE-128 Rotary Encoder ( EAW0J-B24-AE0128L) How-To connect Bourns ACE-128 Rotary Encoder to OLED Display. Bourns Absolute Contacting Encoder (ACE-128) provides an absolute digital output that will also retain its last position in the event of a power failure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |