1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. 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 Now a Download Plan!
  3. 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
  4. 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. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Question Incremental encoders to gather position. Anyone has experience with it?

Discussion in 'DIY peripherals' started by Alexandre Piccini, Dec 24, 2018.

  1. Alexandre Piccini

    Alexandre Piccini New Member

    Joined:
    Aug 3, 2018
    Messages:
    11
    Balance:
    190Coins
    Ratings:
    +0 / 1 / -0
    My Motion Simulator:
    DC motor, AC motor, Arduino
    Hello guys

    I'm planning my DIY Wheel construction. Since incremental encoders are much cheaper than absolute ones, it came to me the idea to use the incremental encoder signal to make an integration scheme, so I can turn the speed-related signal into a position information (I plan using arduino or Pi). Plus, the Z signal incremental encoders have helps me to keep my reference angle calibrated in absolute terms. I have some other ideas in order to keep the signal running great.

    Anyways, I'm a bit insecure as to whether this sort of processing may not accumulate to much error with it. Has some one ever tried doing that?

    As a side question, considering I'm going to keep my wheel restricted to a 180º span, isn't it possible to use simple potentiometers? When you think about it, it makes a lot of sense. You just have to make a good mechanical coupling between the pot and the rest of the mechanical system.

    Has anyone tried any of these two ideas? Could you guys weigh in?

    Thanks
  2. Alexandre Piccini

    Alexandre Piccini New Member

    Joined:
    Aug 3, 2018
    Messages:
    11
    Balance:
    190Coins
    Ratings:
    +0 / 1 / -0
    My Motion Simulator:
    DC motor, AC motor, Arduino
  3. Alexandre Piccini

    Alexandre Piccini New Member

    Joined:
    Aug 3, 2018
    Messages:
    11
    Balance:
    190Coins
    Ratings:
    +0 / 1 / -0
    My Motion Simulator:
    DC motor, AC motor, Arduino
    Well, I disliked your comment since you really didn't contribute in anyway to my problem. In fact, you tried to discourage me. I don't think you expected me to love you for that.

    "u'd better get to know" - yes. This is exactly what I'm trying to do, but information is a bit scarce to be found. This is the exact reason why I'm asking here if "anyone has [had] experience with [incremental encoders]?" I suppose you red the title, so you can see that.

    Fact is: absolute encoders are much more expensive than incremental ones. I have some experience with C and could use that to turn an incremental encoder signal into an absolute encoder and even share the code when I have it done for everybody. Thank you.
  4. Alexandre Piccini

    Alexandre Piccini New Member

    Joined:
    Aug 3, 2018
    Messages:
    11
    Balance:
    190Coins
    Ratings:
    +0 / 1 / -0
    My Motion Simulator:
    DC motor, AC motor, Arduino
    @Sieben

    I just saw you did some cool projects with a Leonardo. Looking good. :thumbs Why not share what you know?

    P,
  5. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Use a multi turn hall effect potentiometer

    They are not expensive
  6. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    There is already plenty of solutions out there like MMos or an arduino FFB. Do you just want to attempt something yourself as a challenge? Also you may find that 180 degrees is quite restrictive, 220 would be ideal if you are going for a short lock to lock.
  7. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Do a search for 'cousin of osw' everything you need to know is there
  8. Alexandre Piccini

    Alexandre Piccini New Member

    Joined:
    Aug 3, 2018
    Messages:
    11
    Balance:
    190Coins
    Ratings:
    +0 / 1 / -0
    My Motion Simulator:
    DC motor, AC motor, Arduino
    Guys, thanks a lot for all your inputs. I'll go through each of them individually.

    So I made a quick search on Google about them. Aren't they absolute encoders? That's what I'm trying to get away from. However, I guess I'm more or less decided to go with incremental encoders anyway.

    Thank you! I found your post in my search. The videos you posted in your early stages were already something I had seen before, but didn't pay much attention. I guess I might end up going about that same route. At least there's a lot of explanation and "walk-through" there so I can do things the way I'm willing to do.

    Hello Alexey,

    I do know these solutions, but I want to have more control over the signals being exchanged between the wheel and the game. For this reason I'm willing to dive in a bit deeper into the "low-level" implementation side of things. Also, not using an absolute encoder helps in terms of costs too, but it takes some coding to have angular displacement as an output. With that being said, I'm planning on implementing things such as non-linear sensitivities (like non-linear throttle, non-linear breaking, non-linear steering) following curves I can specify with functions. And yes, I'm also looking for a bit of fun/hassle coding some stuff :)

    Currently I'm thinking my project might be headed into this: Use a Leonardo to make the interface, being: send and receive signals from/to the game. A raspberry pi would manage all signals related to sensors and actuators. Thus, it would "harvest" the FFB signals coming from the game and process it to send it to the motor. This is a nice idea since I can implement smoothing functions, damper and spring according to my own models to work in real-time. I've seen that OSW can do that for instance, but I want to center everything in the steering interface (which will have a LED screen at some point, and that will be used to manage literally almost everything, if not everything). This future LED screen will also be able to display the current gear, rpm and be shift light all together at some point.

    From there, all buttons and axes signals are processed and their "non-linear sensitivities" are taken into account to provide as output a voltage to be sent to Leonardo, which will be sending these signals back to the game. Why raspberry in the processing end? To ensure I can attach complex peripherals (like the LED screen) while still having all processing, sensors and actuator signals centered in one place, all working with the least possible latency (made possible by the processing power of R-Pi).

    Anyway, it's all still a big sketch and lots of planning being done. Feel free to weigh in :)
  9. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    imo there is no benefit using a rasberry pi in a project unless you need a linux interface for the user

    use a avr/arm/pic processor

    you can put another arduino between the sensors and the wheel processor if you wanted to map the pedal so they are non linear

    I suggest you build a DC DD wheel and then modify it to suit your needs
    • Like Like x 1
  10. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    391
    Balance:
    2,216Coins
    Ratings:
    +115 / 2 / -0
    All off this has already being made and implemented. o_O