PreenFM Forum

PreenFM => PreenFM1 (the blue one) => Topic started by: Dude72 on August 16, 2012, 09:48:44 AM

Title: Encoders question
Post by: Dude72 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.
Title: Re: Encoders question
Post by: 6581punk 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.
Title: Re: Encoders question
Post by: Dude72 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.
Title: Re: Encoders question
Post by: Xavier 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
Title: Re: Encoders question
Post by: Dude72 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 :)
Title: Re: Encoders question
Post by: 6581punk on August 26, 2012, 08:26:33 PM
I used some Bourns I have which have a switch and they work fine.
Title: Re: Encoders question
Post by: Xavier 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
Title: Re: Encoders question
Post by: 6581punk 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.
Title: Re: Encoders question
Post by: Xavier 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
Title: Re: Encoders question
Post by: 6581punk 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?
Title: Re: Encoders question
Post by: Xavier on August 27, 2012, 09:09:08 PM

Yes... Why not ?
Title: Re: Encoders question
Post by: 6581punk on August 27, 2012, 09:22:43 PM
I thought of that because navigating with the reversed encoders would be confusing.
Title: Re: Encoders question
Post by: Dude72 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.
Title: Re: Encoders question
Post by: 6581punk 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/
Title: Re: Encoders question
Post by: Dude72 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.
Title: Re: Encoders question
Post by: Xavier on September 04, 2012, 09:11:26 PM

Sorry for the delay...
I've just compiled a firmware with reversed encoders :
http://xhosxe.free.fr/PreenFM/firmware/special/

Xavier
Title: Re: Encoders question
Post by: Dude72 on September 05, 2012, 09:38:02 PM
Good day! Tried this special firmware. All is well, it should work: left is left and right is right :). Thank you!
Title: Re: Encoders question
Post by: Xavier on September 06, 2012, 08:45:05 AM

I'm glad it works...   :)
These alternative encoders are interesting...
I'll eventually add a menu option at some point...

How is the detent ?
Soft ? Hard ?
And the global feeling ? Accurate ?

Xavier
Title: Re: Encoders question
Post by: Dude72 on September 06, 2012, 10:37:16 AM
These encoders are similar to the feelings that are installed in autoradio or can compare with drum machines Boss DR3, Boss DR880. On a drum machine feel softer because it is used not a knob but the jog-shuttle. On opening one of the encoders I found that they are made with care.
In any case, the main factor is the very low price, which is good for experiments or when there is no certainty that all will turn right. I think the switch is soldered with the left encoder parallel menu button. It will be convenient for navigation: the axis of rotation of the encoder to select the desired menu item, and confirm the selected item by pressing the same knob that is focused on the menu button.
I'm working on the case, I can not finish until I got displays 2004 of normal size - have one of large size with large symbols and make all experiences with it now. Hopefully when finished, then try to upload pictures.
Title: Re: Encoders question
Post by: Xavier on September 07, 2012, 10:13:18 PM

Thanks for the info...
Looking forward to see you pictures.  :)