Connecting DC motor Encoder (IG42E-24K) to Arduino Due

LINIX Brushless, VEXTA Brushless, RC Servo, DC Geared, Linear, Stepper, Tamiya.....

Connecting DC motor Encoder (IG42E-24K) to Arduino Due

Postby engzr » Tue Aug 27, 2013 11:16 am

Hi there,

I am tryting to connect the IG42E-24K's hall effect encoder to Arduino Due but I have no idea how to do it. Please advice. Thank you.

Cheers!
engzr
Greenhorn
 
Posts: 3
Joined: Tue Aug 27, 2013 10:50 am

Re: Connecting DC motor Encoder (IG42E-24K) to Arduino Due

Postby robosang » Tue Aug 27, 2013 6:27 pm

Is there any manual or guide for that encoder?
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Connecting DC motor Encoder (IG42E-24K) to Arduino Due

Postby engzr » Tue Sep 03, 2013 12:18 pm

robosang WROTE:Is there any manual or guide for that encoder?


The technical info can be found in this page:
http://www.cytron.com.my/viewProduct.ph ... %2842mm%29


Thanks!
engzr
Greenhorn
 
Posts: 3
Joined: Tue Aug 27, 2013 10:50 am

Re: Connecting DC motor Encoder (IG42E-24K) to Arduino Due

Postby robosang » Tue Sep 03, 2013 4:16 pm

The Encoder specification, it shows the encoder is NPN output, a pull up resistor is needed, recommended 1K. Pull up to 5V since you are using Arduino.

So basically you need a resistor for each encoder output. Try to use oscilloscope to look at the signal first.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Connecting DC motor Encoder (IG42E-24K) to Arduino Due

Postby ober » Sat Sep 07, 2013 8:51 pm

Yes, robosang is correct.

We do not have example/tutorial for the encoder to be interfaced with Arduino DUE. But since the output of encoder is open drain/NPN, it can be interface with any TTL/CMOS logic. Of course a pull up resistor to the respective voltage is necessary.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Connecting DC motor Encoder (IG42E-24K) to Arduino Due

Postby engzr » Tue Sep 17, 2013 4:15 pm

Thanks!

It's working right now. However when the motor reached a certain speed the counter starts to become unstable instead of keep on increasing it actually fluctuated within a range. This time I'm using attachInterrupt function in the Arduino.

Is this going to do with my program or the physical limitation of the encoder?
engzr
Greenhorn
 
Posts: 3
Joined: Tue Aug 27, 2013 10:50 am

Re: Connecting DC motor Encoder (IG42E-24K) to Arduino Due

Postby sich » Tue Sep 17, 2013 6:24 pm

Since you are using Arduino Due, the pins should be pulled up to 3.3v.
How's your connection? And what's the function you call with attachInterrupt()? Attach your schematic and related segment of code might be helpful.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: Connecting DC motor Encoder (IG42E-24K) to Arduino Due

Postby robosang » Wed Sep 18, 2013 10:10 am

Should be your sketch :) What is the number when it start to get crazy?
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm


Return to DC Motor

Who is online

Users browsing this forum: No registered users and 20 guests