1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Download Package Now!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

Cousin of OSW (Open Sim Wheel)

Discussion in 'DIY Motion Simulator Projects' started by Gadget999, Sep 23, 2017.

  1. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    ok i will run the tests again
  2. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    Hi,
    I would like to ask for some help with setting up the rotary encoder for the wheel.
    I'm using an OMRON E6B2-CWZ6C Rotary Encoder 2000P/R.
    So far I managed to get the A B channels working with the Ai-wave wheelconfig software and Arduino Leonardo, by using 1k pull-up resistors to 5V.
    I can't get the encoder's Z channel to work, with our without pull-up resistor. When it's connected, the rotation of the wheel is not measured anymore.
    If I simply leave out the Z channel, or use a switch instead, I get a calibration error message from wheelconfig. It never shows the Ready message.

    I also tried the MMOS software and the STM32 discovery board, but there I couldn't even get the wheel rotation counter to work at all.

    If anyone is using a similar encoder, I'd greatly appreciate any help as I'm stuck at this point. My friend, Google was no help either. :)
    Thank you.
  3. OZHEAT

    OZHEAT Member

    Joined:
    Oct 26, 2015
    Messages:
    152
    Location:
    Australia
    Balance:
    1,853Coins
    Ratings:
    +80 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    I haven't used an omron type encoder before but it comes to mind that you should be atleast have the Z(index) pulled down to ground instead of tied high. It should only see a high pulse when it passes the index mark not constant +5v with the index pulse of low signal.
    • Agree Agree x 1
  4. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    What type of pullup resistor are you using ? I run a pulldown resistor on the z channel

    Post up your settings for the advanced screen and the main screen

    Are you running the 'dev' mode of the software ?
  5. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    I'm using a 1 kOhm pullup resistor on A and B.
    Sadly, on my encoder, the Z index is always at 5V with a low voltage signal when index is reached. Using a pull-up has no use as it should be working inverted. Is there a trick for it?
    I fiddled some more with the switch type index connected to GND and switched when calibrating. It worked once somehow, but it's dead again.
    Also the wheel center button does not do anything. I don't know if it should center the wheel.
    What is 'dev' mode?
    aiwave.JPG

    aiwave_advanced.JPG
  6. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    Leave the z channel disconnected and fit a resistor to gnd on channel 6

    Turn everything off and on again then connect the channel 6 to ground when you select calibrate.

    Look in your wheelconfig folder you should see a icon called dev - it displays the counts of the encoder
  7. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    I had a resistor between 5v and ch6 and a wire shorted ch6 to gnd. I momentarily removed the wire from ch6 gnd after pressing calibrate. Do you mean the resistor should be between ch6 and gnd, and short to gnd when calibrating?
    I wonder why it worked once randomly.

    I can't find a dev icon in the wheelconfig folder. Can you provide a link to a version that has it?
  8. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    create a new shortcut - it should be "wheelconfig.exe -dev"

    you only need to connect ch6 to ground - if you fit a switch you can break the connection to get the wheel calibrated

    does the wheel icon rotate when you turn the encoder ?
  9. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    are you using a leonaro to control the wheel ? what type of motor driver are you using ?
  10. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    Yes, the triagle icon does rotate.
    The only problem is the calibration error message. It pops up as I open wheelconfig and can't make it go away even with the ch6 gnd switch.
    I use a leonardo.
    Earlier I flashed a pro micro with the EDtracker firmware, since then every leonardo I plug in has the EDtracker name in game controllers.
  11. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    It's early to plug in a motor driver I suppose. I will be using an IBT-2.
  12. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    if the triangle rotates than all is good

    get the dev version working and you can count the pulses

    watch the videos carefully at the start of this thread make sure you have covered each step

    set the advanced settings to pwm +/- if you are using a ibt 2

    you can run a light bulb instead of a motor if you want to check it is working
  13. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    I gave up on the pull-up resistor mess. Strangely when I connected Z index directly to ch6 on Leonardo, wheelconfig reported "Ready" state with no calib error, even the numbers were counting below on the dev panel. Only the triangle is dead, except when I reach index, then it moves a bit then snaps back to zero. That is because index is inverted.
    When I disconnect the index lead, the triangle starts working, but as soon as I hit calibrate it responds with error until I reconnect the index. Grounding ch6 or using switch does not help.
    I wish there was a way to modify the FFBWheel.0.16.leonardo.hex firmware to make the input pins pinMode(6, INPUT_PULLUP); and have an option to invert the index signal in software.

    Therefore I pulled out an Arduino UNO and wrote a simple sketch to pass thru each encoder signal from an input pin to an output pin and invert Z index in the process.
    Now the encoder is only connected to the UNO, receives 5V from it, and the outputs are connected to the Leonardo's 0,1,6 inputs. No pull-up resistors are needed since the pull-up is set inside the UNO.

    As a result, surprisingly it works without any errors and calibrates nicely. :D

    Attached Files:

  14. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    wow thats an innovative approach !

    why not try and track down the software writer and see if there is any software and firmware updates ?

    i have found you need to break and make the connection on pin 6 when calibrating it seems to work ok
  15. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    After some more testing, this Arduino UNO passthru idea has some flaws. At fast rotational speeds, it can't keep up and loses steps.
    Need to look for another approach. :(
  16. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    my guess is your pull up resistors need to be larger in the original board

    perhaps you need to use an interrupt so you don't loose pulses
  17. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    Maybe I will use a hybrid method. I found an Arduino Pro mini (smaller than teh UNO), I will use that on the Z index and connect A,B channels directly to Leonardo as it was working originally.
    Or I make a logic inverter circuit with a transistor for the Z and toss the extra Arduino. :)
  18. Gadget999

    Gadget999 Active Member

    Joined:
    Dec 27, 2015
    Messages:
    684
    Location:
    London
    Balance:
    5,403Coins
    Ratings:
    +142 / 4 / -0
    My Motion Simulator:
    2DOF, Arduino
    if you were to pulse the z channel once every second would it affect the a,b channels ?
  19. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    I guess it won't affect them much, that is, if you give the pulse where it needs to be. Every pulse of the Z channel centers the wheel.
    Anyhow, I made some progress with the logic inverter. At this point, I can say it's all working, including the Z index.

    Transistor-Inverter-NOT-Gate.jpg
    R1=10k
    R2=1k
    Q1: BC546 NPN transistor
    X is the input from encoder Z index, not shown on the picture there is the original 1k pull-up resistor to 5v
    Z is the output to Leo pin6
    • Like Like x 1
  20. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    476Coins
    Ratings:
    +44 / 1 / -0
    Just for the record, this is the final result for OMRON E6B2-CWZ6C rotary encoder.
    Tested and working. Any other simple NPN transistor should work.
    leonardo_wiring_schem.jpg
    • Like Like x 1
    • Optimistic Optimistic x 1