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

Making a bus sim dash, arduino, air-cores, servo's, led's.

Discussion in 'SimTools compatible interfaces' started by gazz, Feb 16, 2012.

  1. gazz

    gazz Member

    Joined:
    Feb 16, 2012
    Messages:
    35
    Location:
    Scarborough
    Balance:
    105Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    Arduino
    I'm making a dashboard and controls for a bus simulator,

    The sim is 'Omsi' it's sort of semi open source, as in a fair few things are able to be modified in it, and it is possible to get almost all data out of it apparantly, and put external data in and so on,
    It's all written in Delphi, but to make is more challenging it's a german product, so a good mix of german and english in all the scripts.

    Anyway,
    i have recently got an arduino mega, and am working through the beginners stuff to try and learn how to program it, Done the servo sweep and move from pot input scripts, and played with 'processing', uploaded firmata to the arduino and ran a script from processing to control the arduino, and got the servo moving in response to the mouse curson on the screen.

    Now i need to figure out how i'm going to put this all together,

    The gauges on the bus dashboard will be a mix of air-cores and servo's and probably pulse input driven gauges.... i.e. the tachograph, i presume that works like a standard speedometer, a variable frequency moves the needle accordingly, not bothered about getting the recording styluses working in it.

    fuel, oil pressure and water temp gauge will be standard air-core gauges, resistance to earth controlling the needle position,

    Then there's the 2 twin needle air gauges, those will have to be servo driven (i dont think the arduino can provide the 0-15 bar of air pressure to work them)

    The rest is led's for the idiot lights and bus stop request light etc,

    How do i go about figuring out how to tie all that lot together? omsi comes with a test plugin .dll that presents the speed in a window as a numerical value and a semi circular analogue percentage gauge, so i guess if i can divert where it outputs the speed values to the arduino, and can then have the arduino produce the frequency pulses to drive the tachograph, i'd get the first stepping stone?

    Unfortunately, mechanical stuff i have no problems with, but programming is all new to me.
  2. gazz

    gazz Member

    Joined:
    Feb 16, 2012
    Messages:
    35
    Location:
    Scarborough
    Balance:
    105Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    Arduino
    both....

    i guess the hardest bit for me is getting the commands from the sim to talk to the arduino,

    i.e. the speedo, getting the speed signal from the computer into the arduino, then having the arduino drive a tachograph/speedo.

    here's the page about the plugin for omsi:
    http://www.omnibussimulator.de/omsiwiki/index.php?title=Plug-In_Interface

    unfortunately most of it is double dutch to me, i am just working through the book 'beginning arduino programming' by Brian Evans.
  3. gazz

    gazz Member

    Joined:
    Feb 16, 2012
    Messages:
    35
    Location:
    Scarborough
    Balance:
    105Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    Arduino
    Is there a simple sketch out there for the arduino that can test a rev counter or speedo/tachograph,

    i assume the usually need a 1 to 300Hz signal at 50% duty cycle, so i need to make the arduino produce a variable frequency signal that can be adusted easily.

    I have a rev counter from a vehicle, it's an air core gauge but it only uses 3 pins, most sketches for driving air cores use 4 pins, but as the rev counter i have is complete, i can just feed it 12 volts, earth and a varying frequency and it'll work.

    i have tested it very basically, just using the blink sketch, 1 millisecond on and off gets me about 1000 rpm indicated.

    But i'm feeding 12 volts to the gauge's power pins, and the arduino pulsed signal is 5 volts, so that could explain why 100Hz is not giving me 1/3 scale deflection of the needle as i expected.

    Anyway, can anyone point me to a way to easily make the arduino move the rev counters needle, if possible from mouse movement or a slider on the screen (i think i am looking at processing and the firmata thing again for that tho)