Main > Main Forum
Help with 360 wheel encoder to UHID
BadMouth:
--- Quote from: vtivti on April 24, 2013, 01:17:24 pm ---OK now im a bit more confused.
The Ivan encoders have 4 pins, according to the diagram - +5v, ground and 2 others which I assumed are left and right so to speak. - Page 13 here - http://ia600403.us.archive.org/1/items/ArcadeGameManualSuperoffroad/superoffroad.pdf
However when I connect it all together it just does nothing. Using the cabs power (it all still works) also does nothing and the 5v from the uHID is clean.
Could you explain a bit more about having to have both connected to 5v?
Thanks
--- End quote ---
From ultimarc website:
--- Quote ---Windows allows one instance of each axis when defined as Mouse (ie X, Y, Z) but if you are using multiple U-HID boards, Windows can recognise each board as a different mouse, using DirectInput.
--- End quote ---
That makes me pretty sure the U-HID only shows up as one mouse. If you have two pins in the config software labeled as x-axis and you have them going to separate wheels, that would be wrong. Both those pins should go to the same wheel and you'd use the y axis for the next wheel.
Let's see how quickly I can explain how optical encoders work and then you'll have a better understanding of what needs to happen....
There are two sensors on each encoder. 5v goes in and is only allowed to pass when light hits the sensor.
When the slotted disc is turned, it alternates between letting light pass and not, so you get a 5v pulse.
The sensors are spaced so that the direction can be determined by how the pulses are timed.
i.e.
A_B______A_B______A_B______ would be one direction
B_A______B_A______B_A______ would be the opposite direction
EDIT:^ok, example not technically 100% correct, but much easier for the layman to wrap their head around. :P
I guess a more accurate way would be:
A_BOTH_B_NONE_A_BOTH_B_NONE_ for one direction
A_NONE_B_BOTH_A_NONE_B_BOTH_ for the opposite direction
PL1:
4 connections per axis on an optical encoder:
5v
Ground
A
B
**Diagram and tables from Wikipedia link above.**
This diagram shows the output when the wheel turns clockwise.
Coding for clockwise rotation
Phase A B
1 0 0
2 0 1
3 1 1
4 1 0
Coding for counter-clockwise rotation
Phase A B
1 1 0
2 1 1
3 0 1
4 0 0
Scott
MartinJames:
THanks both.
That still doesn't make this make sense though as to why when I connect up all 4 nothing is happening. Ive now taken out the wheel and encoder and playing with it on a table, Im still getting nothing. Below are some screen sots and a photo.
BadMouth:
Do you have a meter?
First thing I would do is make sure both signal pins are pulsing 5v, otherwise the encoder is bad.
Also look at the traces on the back of the encoder PCB and make sure 5v and GND are going to the same pins on both sensors that the wheel passes through.
If not, you've got the pins on the encoder mixed up.
MartinJames:
Encoder is fine as the cabinet still works. I have checked the wiring diagram and the wore colours are correct. Ill trace the board now and see if it is correct.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version