Miac & rotary encoder

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
nc56
Posts: 60
Joined: Thu Nov 15, 2012 1:21 pm
Has thanked: 14 times
Been thanked: 4 times

Miac & rotary encoder

Post by nc56 »

Hi ,
I want to buy a miac and use it with omron rotary encoder ,
if I connect the encoder with the 2 analog input of the miac ,
and I use the quadrature encoder in the flowcode , does it work ?

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: Miac & rotary encoder

Post by LeighM »

Hi,
Yes, that will work.

nc56
Posts: 60
Joined: Thu Nov 15, 2012 1:21 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Miac & rotary encoder

Post by nc56 »

Thank you for your answer , sorry because my question was not clear ,
well, in the Miac document I read that :
" Logic level switching occurs at input voltages between 3 and 8V DC. The logic levels are undefined for input voltages between the two logic levels:
Logic 0: < 3V DC
Logic 1: > 8V DC "
And the output of my encoder is 5V (http://www.ia.omron.com/product/item/e6 ... index.html) , I will use TMR0 interruption to detect change ,
5V is it sufficient to be read as 1 level from the miac ?

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: Miac & rotary encoder

Post by LeighM »

Hi,
Looking at the output circuit in the link you provided, the encoder output is open collector, so you will need a pull-up resistor anyway.
So I suggest you connect the pull-up resistor to the MIAC supply voltage, e.g. 12v, or use the V+ output from the MIAC.
Regards,
Leigh

nc56
Posts: 60
Joined: Thu Nov 15, 2012 1:21 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Miac & rotary encoder

Post by nc56 »

Thank you ,
I think that there is one other problem with the miac ,
it contains one only interrupt which is int2/RB2 with an interrupt frequency of 15 Hz .
For my project I need an interrupt frequency of 300 Hz .
Regards .

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Miac & rotary encoder

Post by medelec35 »

Hi nc56,
int2 is an external interrupt so the 15Hz is not at all relevant
In fact 15Hz should be greyed out
External interrupts are virtually instant so should have no problems with an encoder.

Martin
Martin

nc56
Posts: 60
Joined: Thu Nov 15, 2012 1:21 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Miac & rotary encoder

Post by nc56 »

Hi all ,
thank you modelec , I bought the miac module and the omron encoder and that's working very fine !
I have one only note , there is no luminosity LED for the LCD display .

Post Reply