HOW TO MAKE AN ENCODER WITH ARDUINO!!!

Hello there,

I'd like to know how to make an encoder with the arduino. Being more precise, I wanna work with gray code. So I will have 12 serial inputs and for each input combination I'll have a different output.

That's my problem!! If you can help; me I'be very greatfull.
Summarising

What I need is:

  • 12 serial inputs;
  • for each binary input code and different output;
  • show in a liquid cristal display a number for each output code;

Thanks

Wiki!

Mark

Could you help me with that?

Messi_Silva:

  • 12 serial inputs;
  • for each binary input code and different output;

What, exactly, do you mean by "serial inputs"?
How do they get to the Arduino?

Have you examples of the binary input code and the outputs you want?

What has this got to do with Gray code?

...R

for example: using 12 serial inputs I'd have a code like 010111110001 one pulse for each input. And then, every pulse together will make a code as I showed you. Reading this code made by 12 bits I wanna have a output signal, but for each different combination a new code, just like this:

000000000000001 = 1 (output signal)
000000000000010 = 3 (output signal)

just an example.....

If you try to explain exactly what you're trying to do, without using any technical terms. Maybe we'll be able to understand what you mean.

You still have not told us how the pulses get to the Arduino. That is likely to be where the difficulty lies. Interpreting the bit patterns as numbers is trivial.

...R

Okay, sorry about my poor explanation.
Yeah, it'll be like a decoder.

I'll need to have 12 digital inputs and each one will receive a binary pulse by another electronic circuit. Then it will be formed a number like 100010011101 and I want to make the arduino notice this composed binary number and proporcionate me a different output for each different number and for each different output signal it needs to show a number in a display, such as:

101001111011 = 10
111110000011 = 200
000000000001 = 01
these number are just examples

Messi_Silva:
Okay, sorry about my poor explanation.
Yeah, it'll be like a decoder.

I'll need to have 12 digital inputs and each one will receive a binary pulse by another electronic circuit. Then it will be formed a number like 100010011101 and I want to make the arduino notice this composed binary number and proporcionate me a different output for each different number and for each different output signal it needs to show a number in a display, such as:

101001111011 = 10
111110000011 = 200
000000000001 = 01
these number are just examples

How will all these 12 inputs be synchronised? And how is your arduino to know when they're all setup and ready to read?

The other circuit will send the 12 pulse at the same time to the arduino input, some of them 0 and some 1 and it will be varying constantly.

And also the arduino needs to be checking the 12 inputs everytime

Messi_Silva:
And also the arduino needs to be checking the 12 inputs everytime

Every time What?

START WITH ONE THING!!! BREAK YOUR PROJECT DOWN INTO MANAGEABLE PARTS!!!

GET A READOUT TO WORK!!! THERE ARE LOTS OF HELP SITES TO GET YOU TO DO THAT!!!

ALTHOUGH YOU DO NOT SAY WHAT YOU ARE USING TO INPUT, TRY TO INPUT ONE OF THE 12 TO INPUT AND THEN MAKE THAT READ ON THE DISPLAY!!!

ONCE YOU GET THE DISPLAY TO SHOW ONE INPUT, ADD A SECOND INPUT !!!

ONCE YOU CAN DO TWO, THEN ADD A THIRD!!!

BY THE TIME YOU DID THREE YOU WILL HAVE IT ALL FIGURED OUT!!!

I copied your subject line as I figured you would understand it better that way.

i did some same thing for my cb radio PLL , it uses paralell bits ,, then it wil lock to the pll freq ,,
and display example 00000101 = ch 13 ..on display ,,
do you mean this way ?
:o paralel way to read things and convert it to a digit !