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

DIY Pedals (hall sensor & Load Cell) with rumble

Discussion in 'DIY peripherals' started by micma80, Jan 2, 2019.

  1. micma80

    micma80 Member

    Joined:
    Nov 27, 2010
    Messages:
    63
    Balance:
    548Coins
    Ratings:
    +30 / 0 / -0
    This post is writed in English (sorry ... google translate) and in Italian.

    ENG
    Hi all, as the title and I hoping it can be useful, below I would like to illustrate the design of a DIY pedals board with the following purposes:

    1. three pedals, independent position adjustment, gas and clutch with hall sensor, brake with load cell + gas and brake rumble
    2. 12 bit controller / ADC self-made controller board, buttons for button box and gearbox
    3. solidity, usability and economy (especially !!!)

    ITA
    Salve a tutti, come da titolo e sperando possa essere utile, nel seguito vorrei illustrare il progetto di una pedaliera autocostruita con i seguenti scopi:

    1. tre pedali, regolazione di posizione indipendente, gas e clutch con sensore hall, brake con cella di carico, vibrazione su gas e freno
    2. scheda controllore autocostruita 12 bit ADC, pulsanti per button box e cambio
    3. solidità, usabilità ed economicità (soprattutto!!!)

    [​IMG] [​IMG]
    [​IMG]
    [​IMG] [​IMG]
    • Like Like x 4
    • Creative Creative x 1
    Last edited: Jan 2, 2019
  2. micma80

    micma80 Member

    Joined:
    Nov 27, 2010
    Messages:
    63
    Balance:
    548Coins
    Ratings:
    +30 / 0 / -0
    Part 1

    Pedals and support are made of aluminum; screws M6 and M8, springs and logs in iron. All available in the "do it yourself"shop or hardware well supplied.

    In total I spent about 15 euros for these parts, considering something I had in the garage (aluminum profiles for support).
    For the electronic part and sensors I spent about 20 euros.

    I enclose drawings cad of maximum (the measures are varied in course of work, but not of much) of the type pedal.

    NB Do not pay attention to the lower part of the design, they are notes for the construction of the springs, then redone in the final version.

    Parte 1

    Pedali e supporto sono realizzati in alluminio; viteria M6 ed M8, molle e tronchetti in ferro. Il tutto reperibile nei comuni "fai da te" o ferramenta ben fornite.

    In totale ho speso per queste parti circa 15 euro, considerando qualcosa che avevo in garage (profilati alluminio per supporto).
    Per la parte elettronica e sensori ho speso circa 20 euro.

    Allego disegni cad di massima (le misure sono variate in corso d'opera, ma non di molto) del pedale tipo.

    NB Non fare caso alla parte bassa del disegno, sono appunti per la costruzione delle molle, poi rifatte nella versione finale.

    Pedale GAS [​IMG]
    Pedale Brake [​IMG]
    Pedale Clutch [​IMG]
    • Like Like x 5
    Last edited: Jan 2, 2019
  3. micma80

    micma80 Member

    Joined:
    Nov 27, 2010
    Messages:
    63
    Balance:
    548Coins
    Ratings:
    +30 / 0 / -0
    Part 2

    The gas pedal has a simple excursion of about 5 cm, contrasted by springs at light load (1mm wire, 5mm pitch, 12mm diameter, 8cm length). The signal is detected by a hall sensor Allegro A1302, fixed with a rotating magnet by means of a linkage acting on a pin - on bearings - on which a small magnet is fixed. The rotation between position at rest and bottom stroke is just over 90 ° (the ADC system is 12 bit, about 4095 are used about 2000 steps).
    The brake pedal has a reduced excursion to the GAS pedal, based on two short (3 cm) and hard (2 / diam.8) springs. The stroke ends with a pad (on rubber for compressor tubes) on a hinged L and free to rotate. This transfers the force to a load cell (4-wire, 40kg), free on one side and stuck on the other (eye to the sense of measurement). The signal is carried by 4 wires (Vcc +, GND, V0 +, V0-) and an instrumental amplifier INA122 which operates the differential amplification of the input signal and transduces it between 0 and 5V. the gain is adjustable (depending on the force to be applied to the cell) with a 10k multi-turn pot.
    Calibrating with DWTweak2 I have obtained that the noise remains under 250 steps and the total excursion (now calibrated to about 35 kg) is about 3500 steps (12 bit system). In the following photos there are some external springs that have been replaced by the internal ones.
    The clutch pedal tries to emulate, by construction, the different phases of resistance to pressure, typical of a clutch.
    The system was created based on commercial "pro" solutions available on the web.
    Operation: the first part of the stroke, about 3 cm, is opposed by light load springs, once a full stroke intervenes a rotary kinematic movement - about 4 cm stroke - with medium spring contrast.NB the long springs have been replaced with springs with 1,5 mm thread.
    Signal side see GAS pedal. The hall sensor (Allegro A1302) is installed on the rotation pin, so that it is possible to adjust the signal range only near the bottom of the rotation stroke (it simulates the removal of the clutch), with about 2000 steps (1000 are more than enough).
    Comments and suggestions are welcome, for me the feeling of driving is superb but I've never tried "pro" pedals (until now a G25 and the pedals of a Fanatec entrylevel).
    Next post: electronic.
    Video, tests during assembly ...

    [​IMG] brake system
    [​IMG] hall sensor gas pedal
    [​IMG] hall sensor gas pedal



    Parte 2

    Il pedale gas
    ha una semplice escursione di circa 5 cm, contrastata da molle a carico leggero (filo 1mm, passo 5mm, diametro 12 mm, lunghezza 8 cm). Il segnale viene rilevato con un sensore hall Allegro A1302, fisso con magnete in rotazione tramite leveraggio agente su un perno - su cuscinetti - sul quale è fissato un piccolo magnete. La rotazione tra posizione a riposo e fondo corsa è di poco più di 90° (il sistema ADC è a 12 bit, su 4095 passi ne vengono utilizzati realmente circa 2000).
    Il pedale freno ha una escursione ridotta rispetto al pedale GAS, basata su due molle corte (3 cm) e dure (filo 2/diam.8).La corsa termina a tampone (su gomma per tubi da compressore) su una L incernierata e libera di ruotare. Questa trasferisce la forza ad una cella di carico ( a 4 fili, 40kg), libera da un lato e incastrata sull'altro (occhio al senso di misura). Il segnale è portato tramite 4 fili (Vcc+,GND, V0+, V0-) an un amplificatore strumentale INA122 che opera l'amplificazione differenziale del segnale in ingresso e lo trasduce tra 0 e 5V. il guadagno è regolabile (in funzione della forza che si vuole applicare alla cella) con un pot multigiro 10k.
    Tarando con DWTweak2 ho ottenuto che il rumore rimanga sotto i 250 passi e l'escursione totale (tarata ora a circa 35 kg) è di circa 3500 passi (sistema a 12 bit). Nelle seguenti foto sono presenti delle molle esterne che sono state sostituite dalle interne.
    Il pedale frizione cerca di emulare, per costruzione, le diverse fasi di resistenza alla pressione, proprie di una frizione.
    Il sistema è stato realizzato prendendo spunto da soluzioni commerciali "pro" reperibili sul web.
    Funzionamento: la prima parte della corsa, circa 3 cm, è contrastata da molle carico leggero, una volta a fondo corsa interviene un cinematismo a rotazione - corsa circa 4 cm - con contrasto a molle medie.NB le molle lunghe sono state sostituite con molle con filo 1,5 mm.
    Parte segnale vedi pedale GAS. Il sensore hall (Allegro A1302) è installato sul perno di rotazione, tale da poter regolare l'escursione di segnale solo in prossimità del fondo corsa rotazione (simula lo stacco frizione), con circa 2000 passi (1000 sono più che sufficienti).
    Sono ben accetti commenti e consigli, per me il feeling di guida è superlativo ma non ho mai provato pedaliere "pro" (fin ora un G25 e la pedaliera di un Fanatec entrylevel).
    Prossimo post: elettronica.
    Video, prove in fase di montaggio ...
    • Like Like x 4
    Last edited: Jan 2, 2019
  4. micma80

    micma80 Member

    Joined:
    Nov 27, 2010
    Messages:
    63
    Balance:
    548Coins
    Ratings:
    +30 / 0 / -0
    Part 3

    Electronics

    The system made of a 12-bit USB controller board + load cell amp (pic18F1458 + INA122).

    The original project and the firmware was taken by a Willynovi creation "USB-Joystick with 5 Axis and 24 Buttons employing PIC18F2455" available here https://www.xtremeracers.info/forums/viewtopic.php?f=45&t=5696.

    I made some changes, in particular the original system was 10 bit and I brought it to 12 bit, in addition to the insertion of an instrumental amplifier for load cell INA122, here are some photos:

    [​IMG]

    [​IMG]

    [​IMG]

    For my project I used the X, Y, Ry axes over 6 buttons (2 for sequential gearbox and 4 programmable) on RC2.

    My project was born several years ago.

    Today everything is feasible more simply using an Arduino Leonardo or Pro Micro (ATmega32u chip) that natively can be seen by win as an HID device. Here a link made well to program everything:

    https://www.instructables.com/id/Crea te-a-joystick-Using-the-Arduino-Joystick-Pound /

    looking on the web "HID arduino game controller" you will find sketches already written for different applications.

    Dash and rumble

    The pedal board is integrated with a system that displays on the dashboard some game information and controls 2 vibrating motors (rumble), on the gas pedal and on the brake pedal.
    I used a arduino nano with a tm1638 display. The display shows the engine revolutions, the gear and the signaling (flashing LEDs) of optimal change (up and down).

    I wrote an app in python for assetto corsa; the data are processed and sent to arduino to view and control the engines.

    The optimal change is based on the torque and power curves available for each vehicle (uidatajon).

    The motors are controlled in PWM starting from the comparison between angular speed and global speed, with the sliding conditions (slip) for the vibration on the gas and the locking (lock) for the vibration on the brake. I'm also about to implement the ABS intervention.

    Even in this case the easiest way for those wishing to try is to use software available for dash applications (eg. Simtool, dash software etc.) supported in the forums and with many examples of operation, as well as valid for different game titles .

    Below is a video of the first tests:





    I remain available for every comment, impression, advice ...

    micma

    Parte 3


    Elettronica


    Il sistema è costituito da una scheda controller USB 12 bit + ampli cella di carico (pic18F1458+INA122).

    Il progetto originario e il firmware è stato preso da una creazione Willynovi "USB-Joystick with 5 Axis and 24 Buttons employing PIC18F2455" reperibile qui https://www.xtremeracers.info/forums/viewtopic.php?f=45&t=5696.

    Ho apportato alcune modifiche, in particolare il sistema originario era a 10 bit e l'ho portato a 12 bit, oltre l'inserimento di un amplificatore strumentale per cella di carico INA122, di seguito qualche foto:
    Per il mio progetto ho utilizzato gli assi X,Y,Ry oltre 6 pulsanti (2 per cambio sequenziale e 4 programmabili) su RC2.

    Il mio progetto è nato diversi anni fa.

    Oggi il tutto è fattibile più semplicemente utilizzando un Arduino Leonardo o Pro Micro (chip ATmega32u) che nativamente può essere visto da win come periferica HID. Qui un link fatto bene per programmare il tutto:

    https://www.instructables.com/id/Create-a-Joystick-Using-the-Arduino-Joystick-Libra/

    cercando sul web "game controller HID arduino" si trovano sketch già scritti per diverse applicazioni.

    Dash e rumble

    La pedaliera è integrata con un sistema che provvede a visualizzare su dash board alcune informazioni di gioco e comandare 2 motori a vibrazione (rumble), sul pedale gas e sul pedale freno. Ho utilizzato un arduino nano con display tm1638. A display vengono visualizzati i giri motore, la marcia e la segnalazione (led lampeggianti) di cambiata ottimale (up e down).

    Ho scritto un app in python per assetto corsa; i dati vengono elaborati e inviati ad arduino per visualizzare e comandare i motori.

    La cambiata ottimale è basata sulle curve di coppia e potenza disponibili per ogni vettura (uidatajon).

    I motori vengono comandati in PWM a partire dal confronto tra velocità angolare e velocità globale, con le condizioni di pattinamento (slip) per la vibrazione sul gas e di bloccaggio (lock) per la vibrazione sul freno. Sto per implementare anche l'intervento ABS.

    Anche in questo caso la strada più semplice per chi volesse cimentarsi è quella di ricorrere a software disponibili per applicazioni dash( es. Simtool dash etc.) supportati nei forum e con tanti esempi di funzionamento, oltre che validi per diversi titoli game.

    Di seguito un video delle prime prove:



    Rimango a disposizione per ogni commento, impressione, consiglio...

    micma
    • Like Like x 5
    • Creative Creative x 1
    Last edited: Jan 3, 2019
  5. micma80

    micma80 Member

    Joined:
    Nov 27, 2010
    Messages:
    63
    Balance:
    548Coins
    Ratings:
    +30 / 0 / -0
    I've been using it for about a month, in addition to the feeling of driving (nice breaks off the limit with the load cell or the clutch pedal to tip heels and toe, on historic cars) known that keeps the calibration, I'm satisfied. I advise everyone to build their own pedals, on the forum there are many projects, really beautiful and performing.
    Micma
    • Like Like x 1
  6. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,619
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,395Coins
    Ratings:
    +3,480 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    They're awesome matey well done !! Love the clutch pedal and see you get the engage and disengage bite brilliant stuff.
    • Like Like x 1
    • Agree Agree x 1
  7. micma80

    micma80 Member

    Joined:
    Nov 27, 2010
    Messages:
    63
    Balance:
    548Coins
    Ratings:
    +30 / 0 / -0
    Hi, seq shift pics.

    [​IMG]

    [​IMG]

    New post?
    Micma
    Last edited: Jan 6, 2019
  8. micma80

    micma80 Member

    Joined:
    Nov 27, 2010
    Messages:
    63
    Balance:
    548Coins
    Ratings:
    +30 / 0 / -0
  9. Overclockersmania.it

    Overclockersmania.it Member

    Joined:
    Oct 24, 2014
    Messages:
    99
    Location:
    Cagliari, Sardinia
    Balance:
    20Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Bellissimo Progetto:)! Complimenti!
  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,460
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  11. micma80

    micma80 Member

    Joined:
    Nov 27, 2010
    Messages:
    63
    Balance:
    548Coins
    Ratings:
    +30 / 0 / -0
    Thanks!