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

F1 like dashboard project.

Discussion in 'DIY peripherals' started by ru.null, Mar 1, 2011.

  1. ru.null

    ru.null Member

    Joined:
    Feb 24, 2010
    Messages:
    46
    Occupation:
    Petrol stations tech support
    Location:
    Russia, Rostov-on-Don
    Balance:
    290Coins
    Ratings:
    +0 / 0 / -0
    Hi everyone!
    I started my own project to create F1 dashboard. I use USO to send data to the microcontroller. Now shows the gear, speed, current position and lap, water temperature and fuel. In the future I plan to connect LCD. Here a little video.

    http://www.youtube.com/watch?v=GPZldX_BYUg
    http://www.youtube.com/watch?v=GPZldX_BYUg

    For the transfer of small values such as water temperature in the profiler I set the maximum value of 255 (FFh) and shift the axis offset to a minimum. Then choose the 8-bit resolution binary data in USO. As a result, a value of 1 to 1 in hex. For larger values like speed, RPM, I set 65535 (FFFFh), and 16-bit resolution binary data in USO. But I ran into a problem when I tried to send a value greater than 65535. For example best lap time in milliseconds. I can not set the maximum value of 4294967295 (FFFFFFFFh) in profiler. Profiler automatically changes the value to 2147483647 (7FFFFFFFh). Help me please, who knows how to get the values I need 1 to 1 in USO.

    P.S. I know how to use LCDHype for these purposes, but do not want to run additional software.
  2. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    nice job, where do you get this board?
  3. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Very nice job ru.null!

    What kind of controller / display driver are you using?

    Have you tried offsetting the USO output value instead of offsetting the Math line?
    value = (value / x * y ) + z -> value = signed 32bit number passed by the Math plugin.

    You have to: Zero offset in Math Plugin, value = (value / [1] * [1] ) + [-2147483647]


    On the microcontroller side you are better off with decimal output for a display in the USO. It will send each digit as one character, all you have to do is convert the 8bit digits to the segment pattern (ex:1 = 00000110), without having to convert a 32bit number to 10 separate digits before that.
  4. ru.null

    ru.null Member

    Joined:
    Feb 24, 2010
    Messages:
    46
    Occupation:
    Petrol stations tech support
    Location:
    Russia, Rostov-on-Don
    Balance:
    290Coins
    Ratings:
    +0 / 0 / -0
    Thanks for your answers guys!

    This board i made myself.

    Currently i using Atmega16 MCU and I do not use any display driver. 7segment indicators with common cathode. All anodes connected to one port of MCU. Cathodes I switch to cycle on the timer interrupt.

    Yes, I have tried several ways, but did not achieve the necessary precision.
    I tried your method. At the USO, I get 114880 instead of 114833.

    i'm using array with segment patterns like this:
    Code:
    unsigned char number[] = 
    {
      0x3f, //0
      0x06, //1
      0x5b, //2
      0x4f, //3   
      0x66, //4
      0x6d, //5 
      0x7d, //6
      0x07, //7   
      0x7f, //8
      0x6f  //9    
    };
  5. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    I'm afraid the Math plugin limits the number to -2147483648 and +2147483647, minimum and maximum of a signed 32bit int.
    This will get translated to the USO axis as an unsigned 32bit number: 0 - 4298769224

    Because lap times are always + numbers, the value will always be 0 - 2147483647

    But why would you need any more?

    If the number is accumulative in ms resolution, the maximum lap time is 2147483647ms = 2147483seconds = 35791minutes = 596 hours.
    If the number is what is displayed : 214hr : 74m : 83s : 647ms ( a little more than this because you will not have minutes/seconds greater than 59 )
    In theory you should never reach lap times this high...

    I know you are using segment patterns, but you are also converting a binary number to multiple digits using itoa() or dividing manually.
    You can do this conversion with the profiler by selecting decimal.
  6. ru.null

    ru.null Member

    Joined:
    Feb 24, 2010
    Messages:
    46
    Occupation:
    Petrol stations tech support
    Location:
    Russia, Rostov-on-Don
    Balance:
    290Coins
    Ratings:
    +0 / 0 / -0
    I understand all of this.
    But in practice we find the following. I set in math plugin 0 - 2147483647, zero offset. At USO
    I set for your advice
    value = (value / [1] * [1]) + [-2147483647]

    I use the com port sniffer for get USO output values.
    In the input setup best lap time = 114833. In the USO I get 0001C0C0h (114880).
    Why is that?

    I dividing manually.
  7. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    -In 1:1 G-Force make sure you have maximum value: 2147483647
    -Do NOT split negative and positive!
    -Make sure intensity is set to 100%

    Other than that I don't know what would cause it. You could test it easier with the Test Plugin.
  8. ru.null

    ru.null Member

    Joined:
    Feb 24, 2010
    Messages:
    46
    Occupation:
    Petrol stations tech support
    Location:
    Russia, Rostov-on-Don
    Balance:
    290Coins
    Ratings:
    +0 / 0 / -0
    I'm sure I do everything correctly. You can own all the test using a free program http://www.serial-port-monitor.com/.

    P.S. And also I noticed that the last two bytes are always the same.
    For example 100000 in USO 00018686h

    P.P.S. But in decimal output I get adequate data. I think this error in USO realisation.
  9. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    mind to share ur board..hehe
  10. ru.null

    ru.null Member

    Joined:
    Feb 24, 2010
    Messages:
    46
    Occupation:
    Petrol stations tech support
    Location:
    Russia, Rostov-on-Don
    Balance:
    290Coins
    Ratings:
    +0 / 0 / -0
    Project not finished yet, maybe later