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

Tacho Controller Arduino e46 CanBus

Discussion in 'DIY peripherals' started by dahfl, May 2, 2014.

  1. dahfl

    dahfl New Member

    Joined:
    Feb 21, 2014
    Messages:
    29
    Occupation:
    Administrator
    Location:
    Mülheim Ruhr
    Balance:
    485Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 6DOF
    Hi,
    there was even a tachocontroller from "Electronics Jack".
    unfortunately he is no longer to be found in this forum.
    (http://www.x-simulator.de/wiki/Tacho_Controller_by_Elektronikjack)

    has anyone the schematic?
    worked this with the BMW e46? (300kmh / 9.000rpm)

    Any other ideas / links to direct-controll (CanBus Shield) this instruments ?


    i read some incomplete (or not natural for me) aricles.

    regards Andreas
  2. ferslash

    ferslash Active Member

    Joined:
    Feb 8, 2011
    Messages:
    495
    Balance:
    4,798Coins
    Ratings:
    +181 / 2 / -0
    ask aerobbie i think he is one of the tacho guys arround here...
  3. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
  4. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Buy it direct from sparkfun a lot cheaper. Ocean Controls is only a reseller and adds his bit on.
    Can buy direct from sparkfuns site.
    Then the only issue is to work out what commands do what for a particular dash, this is the info that's the hardest to find, not many documents around the world that has this. Im afraid you have to experiment which is why I never when down this road, easier to hack the board instead of using a can bus.
  5. dahfl

    dahfl New Member

    Joined:
    Feb 21, 2014
    Messages:
    29
    Occupation:
    Administrator
    Location:
    Mülheim Ruhr
    Balance:
    485Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 6DOF
    i found this codes for e46 here: http://www.diyelectriccar.com/forums/showthread.php/my-can-bus-gauge-solution-bmw-84882.html
    and much more infos her . http://forums.bimmerforums.com/forum/showthread.php?1887229-E46-Can-bus-project

    I do not know how to buildt but I'll try it and i think i will order a CanBus Shield....

    The can bus is 500kb/s
    In the data for each ID there are 8 bytes. Labeled Byte 0,1,2,3,4,5,6,7

    ARBID: 0x153 (ASC1)
    ARBID: 0x316 (DME1) byte 02 and 03 contain the RPM (LSB is B2, MSB B3) [RPM=(hex2dec("byte3"&"byte2"))/6.4]
    ARBID: 0x329 (DME2)
    __B1 is Temp [Temp in C = .75 * hex2dec(byte01) - 48.373]
    __B5 Throttle position (00-FE).
    __B6 kickdown switch depressed is value (4) Brake pedal depressed is value (1).
    ARBID: 0x615 sent from the instrument cluster. B3 Looks like it is a status message
    ARBID: 0x613 also sent from the instrumnet cluster if 0x615 is acknowleged.
    __B0,B1 are the Odometer reading. (LSB B0, MSB B3) Convert from Hex to Decimal. Multiply by 10 and that is Odometer in Km
    __B2 is fuel level. Full being hex 39 Fuel light comes on at hex 8. Then values jump to hex 87 (or so) and then go down to hex 80 being empty.
    __B3,B4 (B4 the MSB) is a running clock in minutes since last time battery power was lost.
    ARBID: 0x545 (DME4)
    __B0 Check engine light (binary 10), Cruise light (binary 1000), EML (binary 10000). combinations work to get multiple lights
    __B1,B2 Fuel consumption (B1 LSB, MSB B2). Values is the rate of change. Values just cycle from 0 to FFFF the jump to zero and start over.
    __B3 Overheat light (binary 1000, Hex 08)
    ARBID: 0x1F8
    __B2, Brake Pressure.

  6. dahfl

    dahfl New Member

    Joined:
    Feb 21, 2014
    Messages:
    29
    Occupation:
    Administrator
    Location:
    Mülheim Ruhr
    Balance:
    485Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 6DOF
  7. dahfl

    dahfl New Member

    Joined:
    Feb 21, 2014
    Messages:
    29
    Occupation:
    Administrator
    Location:
    Mülheim Ruhr
    Balance:
    485Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 6DOF
  8. mikeeugine

    mikeeugine

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  9. tombo

    tombo Active Member

    Joined:
    Oct 5, 2013
    Messages:
    269
    Location:
    Germany
    Balance:
    2,436Coins
    Ratings:
    +246 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino
    Hi,
    i'm trying something simmilar. I bought a Hyundai Tacho cheap and stripped it appart. I lo0oked at this Page http://www.technikprojekte.de/Projekte.php?src=Tacho

    The Code there is made for an Arduino Mega. Since i own only Nano and Unos i try to convert the Script. I'm not very fammilar with programming, I'm at the beginning and have made some simple Projects yet. I understand very much of this code but one thing is just not shure.
    Where will be the output Pins for Rpm and Kmh be defined. Is this done in the Tone library or did i miss something.

    I made 2 pictures of the motors. For me they look like steppers, but on the back foil of the dashboard there are only 3 contacts Gnd, Ig+ (i think Ignition+) and fuelunit.
    IMG_3417.jpg IMG_3418.jpg
    Sorry for that noobish question.

    Edit: ok i ind out that these are no steppers, these are aircores and will be driven by l293d. But i don't find out very much.
    Last edited: Jan 2, 2015
  10. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    thats a nice find, I will keep an eye on this
  11. tombo

    tombo Active Member

    Joined:
    Oct 5, 2013
    Messages:
    269
    Location:
    Germany
    Balance:
    2,436Coins
    Ratings:
    +246 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino
    So i made some further steps. Today i bought some l293D. Currently im trying to get a good movement. I use code supplyed in the link http://forum.arduino.cc/index.php/topic,22480.0.html
    But i can't get smooth motion yet. Also chip gots very warm. I think there's something wrong with the timing. Or maybe i didn't ind the right connection, because i can not define which is sine and which is cosine coil.
  12. dahfl

    dahfl New Member

    Joined:
    Feb 21, 2014
    Messages:
    29
    Occupation:
    Administrator
    Location:
    Mülheim Ruhr
    Balance:
    485Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 6DOF
  13. tombo

    tombo Active Member

    Joined:
    Oct 5, 2013
    Messages:
    269
    Location:
    Germany
    Balance:
    2,436Coins
    Ratings:
    +246 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino
    Thanks for link. Yes i've seen this but didn't have tried it until now. I think i'll something other first. Becuase the aircore has a little pcb with controllerchips etc behind. There are 3 connections. Ig+, GND and Signal. I'll try to put a pwm signal on signl pin maybe it works.
    But something is strange i think IG+ will be Ignition + so the power avalible after turning the key. If i aplly 12v to ig+ ang gnd revcounter will go to 5000 rpm o_O

    I have to make some pictures of the whole dashboard.

    Edit: I have found this, http://www.xsimulator.net/community/threads/aircores-ardurino-controller.2502/

    I did same as wimpo did. I have solderd 4 Wires to the back of the aircore and loaderd up the sketch on my Arduino. After some switching around the wires i got it right. Now i know which pin connects to which coil and what is the right order. At the moment I am able to get some basic lagging 360° output.
    But i've got some timing problems. I have to make more tests. Hopefully my skills are goud enough.

    Edit: Seems like I am on the right way, but maybe this dashboard from a hyundai wasn't such a good choice. The Problem is that the aircore have 2 coils. I'm able to control the range from 1000-4500 fine, but for range from 4500-8000 the polarity of the 2 coils needs to be inverted.
    At the moment i try around with the l293d as descriped often by articles found on google.
    But since i'm very new to microcontroller programing it's very difficult. Maybe someone with more coding knowledge an help me?
    Last edited: Jan 4, 2015
  14. Zoszko

    Zoszko New Member

    Joined:
    Aug 3, 2009
    Messages:
    1
    Location:
    Hungary
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    It's nice to see my video here :)
  15. jjanu

    jjanu LiveForSim Gold Contributor

    Joined:
    Apr 13, 2013
    Messages:
    72
    Occupation:
    Multimedia
    Location:
    Québec
    Balance:
    643Coins
    Ratings:
    +62 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 4DOF
    Zoszko, what are the commands that you are writing in Gamedash Command Editor to get such a smooth RPM input? I have a Mazda3 dashboard hooked to an Arduino/CANBUS and I'm sending the telemetry from Assetto Corsa. For a long time I was using X-Sim and I had perfect inputs with that dashboard but with Simtools I'm going blind since I have absolutely no clue what command should I use. X-Sim and Simtools interfaces are very different. The motion I get now with Simtools Game Dash are not smooth and there's a huge lag although I'm using the same output rate. See the commands I'm using in the attached pic. Tks

    Attached Files: