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

Arduino Data Logger idea for Video Ride Creator

Discussion in 'DIY Motion Simulator Projects' started by yobuddy, Mar 25, 2016.

  1. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,316
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,624Coins
    Ratings:
    +5,113 / 18 / -0
    Any Arduino guys have time for a project?:sos
    We need a simple way to collect DOF data for live videos.
    This way we can use the DOF data files with the up and coming Video Ride Creator / Player.
    And make our own ride videos for our simulators!

    The idea is to attach this device to a video camera and record the DOF data along with the video.
    You then sync the data file up to the video file in the Video Ride Creator, and the next thing you know, you have a video ride to share!

    What we need is a simple data logger that allows us to set the number of “captures per second”.
    So we can sync it up nicely to the captured video.
    (I would need to add a “Data Point Offset” to the app, as to allow the users to sync the video.
    And then a “write final telemetry file” button to process the final telemetry file. Should not be to hard I think)

    I see a device with one button, one led, a piezo buzzer and a 9v battery, along with the stuff listed below.
    (You’ll need a SD card too) - besides the ard listed below, the other 2 parts cost about $10 usd!

    Arduino Uno
    ard.jpg

    Data Recorder Shield (SD Card)
    http://www.amazon.com/SODIAL-Recorder-Shield-Logging-Arduino/dp/B00YM2SGR6/ref=sr_1_1?ie=UTF8&qid=1458373024&sr=8-1&keywords=Hot+Data+Recorder+Shield
    SD.jpg


    3 Axis Gyroscope & Accelerometer
    http://www.amazon.com/WYPH-GY-521-MPU-6050-Gyroscope-Accelerometer/dp/B00R5SYRS6/ref=sr_1_6?ie=UTF8&qid=1458373142&sr=8-6&keywords=MPU-6050
    DOF.jpg

    The way I see it working is like this:
    When you initially turn on the unit with a blank formatted SD card inserted, the unit looks for a file called “cps.cfg” (or something like that) with the number of “captures per second” you would like to use. If it does not find this file it creates it with the default value of 100 written in it, and sets the “captures per second” to 100. The unit then blinks the led 3 times to show that it’s ready for operation. (This value can now be edited on the SD card to any value the user wishes to use)

    The next time the unit is powered on, the unit will find the file “cps.cfg” and simply load the current value from the file. Then blink the led 3 times to show that it’s ready for operation.

    When the button is pressed, the piezo buzzer chirps and the unit starts recoding data to the SD card. The led turns on, but blinks off occasionally.
    (The piezo buzzer chirp is used to help sync the data being recorded to the video)
    When it’s pressed again, the piezo buzzer chirps, it stops recording and the led turns off.

    File Naming
    The file should be named “1(30,Space).cfg”.
    Where ‘1’ is the file count, then next file saved would be “2(30,Space).cfg”.
    And where ‘30’ is the number of “captures per second”.
    And just so you know, the ‘Space’ is the delimiter between the captured data points in the file. (In my Video Ride Creator app you can use Space, Tab or Comma)

    So if there is no data files on the SD card, and they use the default number of “captures per second” and the device uses Space as the delimiter between data points, the file name would be “1(100,Space).cfg”. (of course you can do something different, say like a time stamp for the file name, but the end of the file should look like this “(100,Space).cfg” for the example above.

    How to Save Data in the File
    Save the data in this order with a Space, Tab or Comma between each value.
    “Roll Pitch Heave Yaw Sway Surge”

    (If you use Tab, the file ending would look like this (100,Tab).cfg
    (Maybe make if configurable in the cps.cfg file?)
    (Maybe the file should be called settings.cfg - lol)

    And you will end up with a file that looks like this with Space as the delimiter:
    193.55 0 -1.96 0 0 0
    68.87 0 689.68 0 0 0
    22.85 0 534.64 0 0 0
    7.51 0 -1329.41 0 0 0
    2.61 0 -3613.21 0 0 0
    0.98 0 -1471.07 0 0 0
    0.33 0 676.95 0 0 0
    0 0 927.29 0 0 0
    0 0 41.78 0 0 0
    0 0 -3250.59 0 0 0
    0 0 -2670.91 0 0 0

    So, does anyone have time to help out?:thumbs
    The community will love you for it!
    Have your name stamped on the beginnings of something really cool?

    I could offer access to the SimTools 2.0 beta crew?
    And I will through in a PRO key for SimTools 2.0 if you create a “How to Build” thread on the forums with pictures, so people can easily build your Data Logger?
    yobuddy
    • Like Like x 3
    • Creative Creative x 1
  2. BondeX

    BondeX Active Member

    Joined:
    Feb 11, 2016
    Messages:
    142
    Occupation:
    EE
    Location:
    Michigan, USA
    Balance:
    1,501Coins
    Ratings:
    +76 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, 6DOF
    Very cool idea, I have done something similar for my work using labview but collected voltage and current data.

    With your idea it would be cool to play it back on a 6DOF and compare.
  3. 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,112Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    • Like Like x 3
    Last edited: Mar 26, 2016
  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,441Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    That's the idea mate.
  5. 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,112Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,625Coins
    Ratings:
    +1,835 / 32 / -1
    Nice @bruce stephen! But I think the idea is to make something that's DIY friendly; aka not very expensive.
    • Agree Agree x 3
  7. 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,112Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    Yes I agree something less expensive would be awesome. This maybe gets more ideas flowing. So I started looking at the spark fun sensor, which at $75us is still expensive, people were having problems with yaw drift. So then I ran acros the YEI/3space software that addresses this problem but then it starts adding up. Just food for thought.
    • Like Like x 1
  8. cgodwin

    cgodwin Active Member

    Joined:
    Sep 18, 2015
    Messages:
    225
    Occupation:
    Engineer
    Location:
    Eugene, Oregon
    Balance:
    2,478Coins
    Ratings:
    +278 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    I would be willing to create or help create such a product. I actually began work on something very similar about 20 years ago, but never quite got it done.

    My issue is first I need to complete the final details of my simulator, which should take 3 weeks. Then I don't have a huge amount of time to devote to this project, so it would be at least a few more weeks before I had a working prototype. Then myself and the community could improve upon it over time.

    Of course if someone has a bunch of free time on their hands, that might be a faster option than I would be.
    • Like Like x 3
    • Winner Winner x 1
  9. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,316
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,624Coins
    Ratings:
    +5,113 / 18 / -0
    @bruce stephen, (thx for all your posts on this buddy!)
    May I ask you a question since you have experience with this stuff. :sos
    Since we don't need live feedback, wouldn't the $5 usd one I link do the job just fine?
    And it should be enough to get all the data we need I believe?

    Roll - degree data
    Pitch - degree data
    Yaw - degree data
    Heave - acceleration data
    Sway - acceleration data
    Surge - acceleration data

    -----------------------------

    I think the cheaper they are, and the simpler they are to make, the more ride videos we will have. :thumbs
    A lot of tinkers have an arduino laying around collection dust.
    And if the rest of the parts were under 15 usd, we would be golden!
    Also, it would wright the file in a way the Video Ride Creator knows how to use.
    (loads the files options from the naming scheme)
    (And all the data is in the right order, right outa the box.)
    (it's really had to tell what line of data is roll for instance, if its not properly synced to the video to begin with.)

    Plus, people could add on new features.
    Maybe we could configure which way is Up in software or something.
    (how you mount the recorder to the cam, like if you wanted to set it on it side, but have that be Up)

    And if everyone uses the same recorder, its so much easier to make tools for the output.
    For instance, all I need to know is what is the max value is for the degree data and the acceleration data.
    And in my app I can adjust the saved data to be used with SimTools with a single button click, and the user does need to mess with any settings etc..
    (basically, normalizing and fixing the amplitude of the input data for Video Ride Player.)

    Also if we make it with an arduino, there are a lot of options for the builder. (and they are available around the world)
    I posted links to the parts that I thought would make it the easiest to build.
    And I really like designing things so they are easily accessible by the most people.
    But using a nano, you could build a tiny unit if you wanted to.

    @cgodwin,
    Thx buddy!
    It could always be a team project also, should someone want to take the lead.
    I would be just fine with that! (someone do hardware and the build thread, someone code or something)
    I don't even mind throwing in a few bucks on the project, I just don't have a lot of time right now with the SimTools 2.0 beta going on.

    I think I have a initial plan on paper now, but that does not mean it has to work exactly how I stated above.
    It's just the initial idea that I believe covers what we need. (others may have better ideas)

    Thanks all! :thumbs
    yobuddy
  10. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,316
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,624Coins
    Ratings:
    +5,113 / 18 / -0
  11. Blame73

    Blame73 Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    1,213
    Location:
    Italy
    Balance:
    8,283Coins
    Ratings:
    +1,124 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    • Like Like x 1
  12. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,316
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,624Coins
    Ratings:
    +5,113 / 18 / -0
    @Blame73,
    Its not a bad idea, but it would make the whole thing bigger.
    And sort of tie it to that display, or the one selected.
    And then there is cost and would it may reduce the speed of the recorder etc...

    A little settings app could be made to read, display and edit all the settings easily.
    Possibly built into the Video Ride Creator.

    There are some cheep ways to add some of the info you have posted thou.
    because these are good ideas!
    but maybe not for version 1 is all I'm saying.

    like we could add a led that blinks when space it getting low. (out of storage warning)
    And maybe this level can be set in the settings.cfg file.
    (Anyone know if the arduinos work with xml files? maybe settings.xml is better?)
    So the warning is selectable of when it should trigger. (10% left etc.)

    Honestly, once the basic stuff is done. (call it the cheap as it can be version)
    Anyone could add onto to it and we could have many versions a user can build.
    With the controls they want and as fancy as they can make it.

    Maybe we could try to think of all of the editable settings we would want in the settings.cfg file and make a list.
    Even if we don't use these settings now for version 1, we would not have to update the app later for the new additions.
    And it would be easier for users to modify later I would imagine.

    I can think of these:
    Capture Fames PerSec
    Low Space Alarm Limit (Percent)
    Led Brightness
    LCD Backlight OnOff
    Buzzer Volume

    Maybe some settings for the module: (im guessing on these)
    Sensitivity X
    Sensitivity Y
    Sensitivity Z
    Orientation X
    Orientation Y
    Orientation Z

    And maybe a few optional entries (incase a build needs something we don't have)
    Extra1 Name "Tell the user what they are editing" - reports to pc app / maybe gets shown on a lcd etc..
    Extra1 Value 0
    Extra2 Name "Example - Second Buzzer Volume"
    Extra2 Value 10
    Extra3 Name "Second led brightness"
    Extra3 Value 90

    So what am I missing anything someone may want to use in the future???
    Maybe there is a better way to do this?

    Remember, either a app on a pc could change these settings.
    Or the hardware on the device itself.
    And a updated version of the ardiono file could always display stuff in all sorts of ways.
    (Like the lcd unit you have posted!)

    We should definitely keep it simple to start with.
    a lot of this may be clearer once the project has started.
    yobuddy

    btw, Maybe holding the button down for 5 seconds chirps the buzzer, and if you let go of the button, it erases the last file saved to the sd card?
    Keep holding the button for 12 seconds and it chirps 3 times, let go of the button and it erase all of the files on the sd card?
    • Creative Creative x 1
  13. 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,112Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    • Like Like x 1
  14. 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,112Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    Ok sry to keep blowing this thread up but here is another possibility.
    Considering that these sensors are an adaptation of what's in cell phones why not use that and there would be no hardware to purchase at all. Most modern phones have in excess of 9dof sensors. Here is a link to an android test program that is supposed to log this data.
    http://stackoverflow.com/questions/...a-from-android-motion-sensors-at-a-fixed-rate

    This may also make it compatible with pi3b running android. Pi is $35us.
    • Creative Creative x 1
    Last edited: Mar 26, 2016
  15. cgodwin

    cgodwin Active Member

    Joined:
    Sep 18, 2015
    Messages:
    225
    Occupation:
    Engineer
    Location:
    Eugene, Oregon
    Balance:
    2,478Coins
    Ratings:
    +278 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    I like the idea of doing the entire thing in a phone. You have the camera, accelerometer, and gyro all ready to go. All we need is an app to make it all work and log the result. I'm not much of an app developer, but I think I could pull this off with some help from my app guy at work.
  16. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,316
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,624Coins
    Ratings:
    +5,113 / 18 / -0
    Very Cool! :thumbs
  17. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,316
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,624Coins
    Ratings:
    +5,113 / 18 / -0
    The only problem I see with the phone idea, is that some phones cost a ton! lol
    Mine sux, but a lot of people spend way to much on them.
    Not sure I'd want to strap it to a roller coaster for instance.
    But a cheep GoPro and a 50$ device I would.

    But I'd love the option of having both lol
    Dustin
  18. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,316
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,624Coins
    Ratings:
    +5,113 / 18 / -0
    Then again, if its runs on android, any android device with these 3 sensors would work!
    So I think this could work!
    • Agree Agree x 1
  19. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,316
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,624Coins
    Ratings:
    +5,113 / 18 / -0
    Right on you guys!
    I think your on to something here!
    Dustin
  20. 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,441Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Easter here so waiting for shops to reopen after the holidays, so I can purchase an sd card shield , I have all the other components plus old app using the 6dofmcu but was a live recorder back to pc, basically a hand held HID that enabled a user to record its movements for making a motion cue to match a movie. Don't think it would take much to turn this into a recorder.
    output from live6dof  producing data.png

    Also I made one using a Wii nun chuck.
    • Like Like x 1
    • Funny Funny x 1
    • Creative Creative x 1