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

Tutorial Another simple arduino dashboard with TM1638

Discussion in 'DIY peripherals' started by vthinsel, Sep 22, 2015.

  1. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    436
    Location:
    FRANCE
    Balance:
    5,963Coins
    Ratings:
    +563 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    Hello,

    Here is a short tutorial explaining how to build a simple dashboard using an arduino nano together with a TM1638 module. As I got a couple of issues, I decided to make a simple tutorial out of it.
    The TM1638 module chosen (bought from DX) provides
    - 8x 7 segment digits
    - 8x push buttons
    - 8s bicolor LEDS (nice for RPM !)

    The arduino chosen factor is the nano as it is smaller, so easier to integrate into a nice dashboard. We will see this brings soem more challenges, especially around power supply

    Step 1 : Prepare the TM1638 and arduino nano

    Chances are the TM1638 module and the arduino will arrive with pin headers already soldered. I found some nano without the pins mounted, but couldn't find TM1638 without the headers. For a nice and tight integration, the headers will have to be removed, especially onthe TM1638 as the headers are on the top part. This is quite easy : insert a small screwdriver to start lifting the plastic header, and finish removing it with a plier.
    [​IMG]
    Once the plastic header is removed, you can melt the solder pads with the pin and remove the pin with your plier. Easy, if not done in hurry.
    So now you have your arduino nano and your TM1638 "naked"
    [​IMG]
    At this stage, you can upload the sketch to the arduino nano.

    Step 2 : Powering the TM1638

    When I first received my arduino nano, I juste replaced my uno by the nano including the power leads that were going from the uno to the TM1638. Biiiiiip. The nano started to smeel bad, together with some smoke. The reason is simple : the +5V available from the nano is in fact coming from the USB/serial converter on the nano board , a FT232. Unfortunately, the TM1638 draws more power than the FT232 can provide :(
    So the solution is to power the TM1638 directly from the USB header. You will need to solder one wire from the +5V USB pin directly to the TM1638. This can be done more easily from the nano PCB by taking the +5V from the capacitors or zener as shown below:

    [​IMG]
    Step 3 : wire arduino and TM1638

    Now, wire 4 more cables from the arduino to the TM1638: GND to GND ,Pin 3 to Strobe 0 (STB0,) , Pin 4 to Clock, Pin 5 to Data.
    I used a glue-gun to secure the wires and the arduino nano!
    [​IMG]
    Step 4 : upload sketch to arduino

    If you haven't done so before, you should upload the sketch to the nano. When upload has finished, the TM1638 should display "CarDashX". Good.

    [​IMG]
    Step 5 : casing

    If you have a 3D printer, you can use the attached stl/sketchup files (check the USB port, which may be different depending on where you sticked the nano on the TM1638)


    In the attached zip file, you can find the sketchup model + stl file as well as the arduino sketch. For more details on the arduino sketch you can check the cardashx topic somewhere in the arduino projects.

    Attached Files:

    • Like Like x 8
    • Winner Winner x 5
    • Informative Informative x 1
    • Creative Creative x 1
    Last edited: Dec 15, 2015
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Great project and overview @vthinsel, you make it real easy for others to follow in your footsteps :thumbs
    • Agree Agree x 4
  3. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,233
    Location:
    Marseille - FRANCE
    Balance:
    20,876Coins
    Ratings:
    +2,079 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Great!
    too bad for the smoke... and thanks for sharing with us!

    Maybe you could add some words about GameDash setup?
  4. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    436
    Location:
    FRANCE
    Balance:
    5,963Coins
    Ratings:
    +563 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
  5. dedas

    dedas Active Member

    Joined:
    Feb 5, 2012
    Messages:
    115
    Occupation:
    IT Manager
    Location:
    Netherlands
    Balance:
    - 26Coins
    Ratings:
    +81 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Nice project, i'll try it for sure. Thanks.
  6. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,286
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,110Coins
    Ratings:
    +1,237 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
  7. jaco73

    jaco73

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    thanks for sharing, will be very useful: Cheers
  8. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    436
    Location:
    FRANCE
    Balance:
    5,963Coins
    Ratings:
    +563 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    Argh..... sometimes google sucks. They changed the sharing options. I can't include links anymore to specific pictures of an album :(
    So I changed and updated the pics directly in the post. Less dynamic, but more change proof from Google.
  9. Dmraf

    Dmraf New Member

    Joined:
    Oct 14, 2015
    Messages:
    22
    Location:
    Ufa, Republic Of Bashkortostan, Russia
    Balance:
    174Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thank you!:)
  10. jays

    jays New Member

    Joined:
    Mar 31, 2016
    Messages:
    18
    Location:
    Taiwan
    Balance:
    252Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF
    He is also using simtools get game data? Or there is another easier way ?
  11. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    436
    Location:
    FRANCE
    Balance:
    5,963Coins
    Ratings:
    +563 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    For the moment being, it uses simtools. When I have time someday, I'm thinking of a simple standalone networked box based on UDP (not Wifi). Maybe a raspberry would do the job nicely like this http://www.mjoldfield.com/atelier/2012/08/pi-tm1638.html
    With a nice web GUI to configure it to match games specifications......
  12. maphf60

    maphf60 New Member

    Joined:
    Jul 18, 2012
    Messages:
    10
    Balance:
    - 507Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hello, here is a TM1638 module is by myself
    Dashboard with an Arduino Nano, a 7-segment display for Gear (characters height 57 mm, working 12v), 2 displays 4 digits 0.36 '' (rpm and speed) and ramp LEDs for Rpm.
    Display driver for GEAR directed by optocoupler (tlp 181, € 0.13 / ebay).
    The circuit integrated TM1638 costs 0.327 € / ebay.
    Display 7 digits 57mm red € 5.90 / Gotronic (France)
    equivalent products on ebay
    code used CarGashX
    Assetto Corsa: Gear works (but not in the right Endroid) but not the rest
    Dirt Rally: Rpm works but not the rest
    and PCARS: nothing (installed the plugin "ProjectCar Alt" and to patch the game are asked to select a directory with an empty file called Expired PCARSUDP.txt I not found)
    Can help me find the solution, I installed various plugins
    Thank you to all

    [​IMG] [​IMG]
  13. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    436
    Location:
    FRANCE
    Balance:
    5,963Coins
    Ratings:
    +563 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    First thing to check is on GameDash. Do you have values displayed correctly in GameDash ?
    Your pictures are broken.
    Are you running on PS4 / PC ?
    The file pcarsudp.txt is a file you have to create manually as detailed in the instructions of the plugin.
  14. maphf60

    maphf60 New Member

    Joined:
    Jul 18, 2012
    Messages:
    10
    Balance:
    - 507Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    DSC_1303.JPG DSC_1303.JPG DSC_1297.JPG DSC_1301.JPG
    • Like Like x 1
  15. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    436
    Location:
    FRANCE
    Balance:
    5,963Coins
    Ratings:
    +563 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    Nice PCB/routing.
    I guess your big 7 segment mimics one of the 8 others ?
    I see you have only 3 buttons. Which ones are you using among the 7 that I use (choose left/choose right/save) ? I'm afraid that your design may be different from stock TM1638 yo can find on ebay/ali/.... so I can't really help. As an example you used LEDs of different colors: The TM1638 module I use has dual color LEDS which are driven by the code/TM1638 so clearly the code will have unpredictable on the RPM leds behavior, and probably other
  16. EduardoMoreira

    EduardoMoreira Member

    Joined:
    Jul 5, 2016
    Messages:
    31
    Balance:
    113Coins
    Ratings:
    +20 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino, Motion platform, 4DOF
    Gerar. ..thanks to sharing.
  17. Quertreiber

    Quertreiber New Member

    Joined:
    Apr 24, 2011
    Messages:
    14
    Location:
    Eppingen-Germany
    Balance:
    361Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
  18. maphf60

    maphf60 New Member

    Joined:
    Jul 18, 2012
    Messages:
    10
    Balance:
    - 507Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hello vthinsel and thank you
    PCARSUDP.txt: I do not understand what to do
    test with Arduino Nano and TM 1638 standard module (with bi-color LED)
    Dirt Rally:
    Dash1 - Speed / dash2 - Gear / Dash3 - Rpm
    power - on Gear display and LED digit pad for Rpm
    Assetto Corsa:
    Gear and Rpm display digits but not on LEDs for Rpm
  19. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    436
    Location:
    FRANCE
    Balance:
    5,963Coins
    Ratings:
    +563 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    For the led rpm have you tried the reset button ?
    The problem probably comes from dual color led which are assumed by the code. Try to change the number of red leds using the buttons.
  20. vanty200419

    vanty200419 New Member

    Joined:
    Nov 18, 2016
    Messages:
    5
    Location:
    Việt Nam
    Balance:
    195Coins
    Ratings:
    +0 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino, Joyrider, SimforceGT
    good thank you