Hello,
i need a component like a ** Rotary encoder for Input Device? Will you provide something like this?
Thanks Andy
components: Rotary Encoder with push button
-
- Posts: 209
- Joined: Thu Oct 19, 2006 11:46 am
- Location: Bakewell, UK
- Has thanked: 20 times
- Been thanked: 16 times
Guys,
I have been interested in using a rotary encoder, however, there does not seem to be a standard device format? nor a commercial device that rotates freely with little force? Hope I am wrong?
I therefore made my own Grey code disc from etched PCB, (which is of course easy to interface) though it is a bit of a toy as it is not robust enough for prolonged use.
Mark
I have been interested in using a rotary encoder, however, there does not seem to be a standard device format? nor a commercial device that rotates freely with little force? Hope I am wrong?
I therefore made my own Grey code disc from etched PCB, (which is of course easy to interface) though it is a bit of a toy as it is not robust enough for prolonged use.
Mark
Go with the Flow.
Rotary encoder
My question regrading to the support in Flowcode3. I need a device wich i can direct implement in my code. or is there a trick
There are much Rotary encoder knobs on the market and you can reduce input device with a menΓΌ option in your program.
There are much Rotary encoder knobs on the market and you can reduce input device with a menΓΌ option in your program.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Hello
When using rotary encoders you have two options.
Sequential Coding - Binary position
Grey Coding - Binary position only 1 bit changes at a time
To implement one of these options requires different code.
Sequential Coding:
Read the binary position and use that to calculate position and direction.
Grey Coding:
Monitor the binary bits and monitor which bits are changing to calculate position and direction.
Then it is simply a case of resolution. Eg a rotary encoder with two bits will give a resolution of 360 / 4 states = 90 degrees.
When using rotary encoders you have two options.
Sequential Coding - Binary position
Grey Coding - Binary position only 1 bit changes at a time
To implement one of these options requires different code.
Sequential Coding:
Read the binary position and use that to calculate position and direction.
Grey Coding:
Monitor the binary bits and monitor which bits are changing to calculate position and direction.
Then it is simply a case of resolution. Eg a rotary encoder with two bits will give a resolution of 360 / 4 states = 90 degrees.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
the trick with a men
I want to have a menΓΌ on my 12x2 LCD display and i will do this with a rotary encoder. Yes , it is a 20ppm Grey Code encoder with push button. The problem is not to check the status of the rotary direction or calculate the posission.
I wan't to know how the best programming in flowcode is. Should i use always an interrupt for every changes on Rotary knob and push button or is there a easy way to do this parallel with LCD -Display output.
It would be enought to check it every 1ms-10ms !?
How can /should this Routine can be parallelized with the display ,USB- Routine.
I wan't to know how the best programming in flowcode is. Should i use always an interrupt for every changes on Rotary knob and push button or is there a easy way to do this parallel with LCD -Display output.
It would be enought to check it every 1ms-10ms !?
How can /should this Routine can be parallelized with the display ,USB- Routine.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Can you use a routine like this
Infinite Loop
{
Read Encoder
Calculate position
Read push button
Update LCD
Delay 10ms
}
Infinite Loop
{
Read Encoder
Calculate position
Read push button
Update LCD
Delay 10ms
}
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Rotary Encoder
I have been using a 10K continuous mechanical rotation potentiometer (Radiospares Number 460-2048) as a rotary encoder with some success for a long time. If fed 5 volts across the winding, the wiper can be read by a PIC ADC giving a voltage proportional to angle. The drawbacks are that there is a small dead spot of about 5 degrees (which can probably be solved by software), limited life (about 10,000,000cycles), mediocre weatherproofing and a bit of torque needed to move it. Cost in UK about Β£10.