Author Topic: Encoders question  (Read 17395 times)

Dude72

  • Team member
  • *
  • Posts: 12
    • View Profile
Encoders question
« on: August 16, 2012, 09:48:44 AM »
Hi all!
The author uses encoders PEC11-4220F-N0024.
They have the following specification:
Pulses per Revolution    24 PPR
Number of Detents    24
Number of Channels    
Mounting Style    SMD/SMT
Termination Style    
Output    2-bit Gray Code
Shaft Type    Metal Flatted
With Switch    Without

Can I use these encoders: This item 140739970480 on ebay?
http://www.ebay.com/itm/10pcs-12mm-Rotary-Encoder-Switch-Keyswitch-NEW-/140739970480?pt=LH_DefaultDomain_0&hash=item20c4c185b0

They have the following specification:
* Rotary Shaft Length: Approx. 12mm
* Shaft Full Length: Approx. 20mm
* Shaft Diameter: Approx. 6mm
* Size (L x W): Approx. 15 x 11mm
* Output: 2-bit gray code
* Closed Circuit Resistance: 3 ohms maximums
* Max. Rating: 10 mA @ 5 VDC
* Operating Temperature Range: -30 to 70 degrees celsius
* Storage Temperature Range: -40 to 85 degrees celsius
* Rotational Life: 30000 cycles minimum
* Switch Life: 20000 cycles minimum

In the specification there is no information on the number of Detents and pulses. Having made a full turn, I found that the number of Detents is 20.
I understand that the main difference between them is 20 Detents, rather than 24 and the presence of a tact switch.

6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Encoders question
« Reply #1 on: August 16, 2012, 12:13:18 PM »
If they mount the board they should work. You will need to cut off the two pins for the switch though. Editing values may be a little slower due to less pulses per turn.

Dude72

  • Team member
  • *
  • Posts: 12
    • View Profile
Re: Encoders question
« Reply #2 on: August 16, 2012, 01:02:08 PM »
oh, thanks!
I will try them. Now possible to buy those 10 encoders just for few dollars.
Waiting for the buttons, 24LC512 and 6N137 now. I have already 6N138 and 139. I found that 137 is more good for faster applications. Usually in MIDI interface 6N138 or 139 is enough.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Encoders question
« Reply #3 on: August 16, 2012, 10:44:55 PM »

Let us know if you try them.
The PreenFM encoder driver expects the quadrature table of the bourns encoder :
http://www.bourns.com/data/global/pdfs/PEC11.pdf
If your encoders are compatible, they will work.

Xavier

Dude72

  • Team member
  • *
  • Posts: 12
    • View Profile
Re: Encoders question
« Reply #4 on: August 26, 2012, 07:39:50 PM »
I've got other necessary parts. Changed 74HC165N to CD74HCT165. Work well but encoders have other direction "left-right". Probably last firmware of MidiBox FM will explain the problem: other type of encoders, I read about the same on www.megadrum.info This device have one option "Alt Encoders" for work with other type of encoders. It will be nice make this option in future firmware :)

6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Encoders question
« Reply #5 on: August 26, 2012, 08:26:33 PM »
I used some Bourns I have which have a switch and they work fine.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Encoders question
« Reply #6 on: August 27, 2012, 08:38:19 PM »

I'm not sure i get your problem.
It works... but when you turn left it goes right and when you turn right it goes left ?
But does it work acurately ?  which means each step makes the value goes one step ?

It's hard to make encoders work without trying.
Do you have the spec of your encoders with the "quadrature output table" ?

Xavier

6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Encoders question
« Reply #7 on: August 27, 2012, 08:48:52 PM »
If they are reversed you can always patch it on the PCB so as not to need to build your own firmware.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Encoders question
« Reply #8 on: August 27, 2012, 08:53:29 PM »
If they are reversed you can always patch it on the PCB so as not to need to build your own firmware.

If they are only reversed, i can add an option in the setting.
Or build a custom firmware 2.00 in 1 minutes ;-)

Xavier

6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Encoders question
« Reply #9 on: August 27, 2012, 08:55:30 PM »
If it is that simple yes. Perhaps hold a button on start up to "toggle" between the two modes?

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Encoders question
« Reply #10 on: August 27, 2012, 09:09:08 PM »

Yes... Why not ?

6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Encoders question
« Reply #11 on: August 27, 2012, 09:22:43 PM »
I thought of that because navigating with the reversed encoders would be confusing.

Dude72

  • Team member
  • *
  • Posts: 12
    • View Profile
Re: Encoders question
« Reply #12 on: August 28, 2012, 07:46:29 AM »
Hello!
Unfortunately I do not have the data sheet for these encoders also list that I post earlier. I think that the Chinese are not specifically place the full information about the item.
Most likely, this specification is designed for soldering the encoder on the other side of the PCB.  :)
Furthermore encoders slotted on the axis are more popular than a bevel encoders on the axis because most sold metal knobs on ebay made ​​just under the slot.
I think that this is the reason for which these encoders are so cheap:
http://www.ebay.com/itm/10-Pcs-12mm-Shaft-Rotary-Encoder-Switches-Dia-6mm-New-/390452700121?pt=LH_DefaultDomain_0&hash=item5ae8cb63d9
Yes, the presence of a special option in the firmware "reverse encoders" would be great.

6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Encoders question
« Reply #13 on: August 28, 2012, 01:12:29 PM »
If you have a spare one you could open it up?

There's usually some metal tabs that you can bend up to take them apart. They're very simple inside.

For my MB-6582 I did this to remove the clicking detent of the encoders so the knobs behave more like pots.

Step 10 on this page shows opening encoders:

http://midibox.org/forums/topic/14564-building-the-mb-6582-control-surface-photo-tutorial/

Dude72

  • Team member
  • *
  • Posts: 12
    • View Profile
Re: Encoders question
« Reply #14 on: August 28, 2012, 05:59:31 PM »
I opened one of the encoders. It has 4 rotating brush contacts, 2 lacerations and one solid home contacts group in a circle.