Page 1 of 3 123 LastLast
Results 1 to 30 of 84

Thread: DIY Ardunio Project

  1. #1
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110

    DIY Ardunio data-logger Project

    Came across this yesterday:

    https://projectmechatronics.blogspot...on-system.html

    https://github.com/ProjectMechatroni...isition-System

    Guy has obviously implemented in on an FSAE car as per vid below, so there's clearly a relatively simple expansion capability in the code to hook up a tonne of sensors.

    Now I'm admittedly a fucking retard with electronics. Anyone here particularly talented with arduino stuff that could have a peek at this and see how easy/simple it would be to implement? Scope for 3D accelerometer and GPS add-on? The info on the blokes sit is pretty sparse

    I'm dead keen on logging:
    4x wheel speed sensors (inductive pickup ring = low voltage sine-wave signal)
    4x suspension height sensors (rotating pots)
    1x 3D accelerometer
    1x GPS

    Ie, suspension stuff, not engine (which I can log without extra sensors directly through OBD2 port)

    http://youtube.com/watch?v=sbgXx3QVB4c

    http://youtube.com/watch?v=sbgXx3QVB4c

    Ps mods, sorry just realised I put this in engine management, feel free to move it if it's not quite right in here.
    Last edited by doctor ed; 16-10-17 at 06:42 PM.
    Mit freundlichen Gre

    Quote Originally Posted by Keith Duckworth View Post
    "I think that in a racing engine, the closer it is to disintegrating, in general the better its performance will be "

  2. #2
    Purist, whats that? Jason Broadhurst's Avatar
    Join Date
    Nov 2003
    Location
    North Brisbane
    Posts
    6,370
    It looks good! No time to check out the code but it should be pretty straight forward if he gives you inputs and you know how to scale analogue to digital (ADC)'s
    Jason Broadhurst

    Someone once asked me if they could use my mower. I said "sure, so long as it doesn't leave my yard"

  3. #3
    Registered User TRD-MX62's Avatar
    Join Date
    Jun 2014
    Location
    melb
    Posts
    1,742
    just get a Motec CDL3, logging is only a small part of it the i2 software is awesome!
    Quote Originally Posted by ALLMTR View Post
    the theory is the fuel pump is one of the only things that can fuck out on a diesel

  4. #4
    pt78 platinum's Avatar
    Join Date
    Aug 2002
    Location
    Adelaide
    Posts
    1,811
    I've chucked one in my car which is fairly basic but gets data out of a bunch of sensors and displays on screen (and logs if required/plugged in).

    There are easy ways to simply get data straight from the OBD2 into the arduino if you have the luxury of that information being sent, or you tap into the direct feed.
    I've put a few things like VSS which gives a raw voltage which you then perform a bunch of rotation calcs on, same with some other sensors which are resistive.
    Grounding is a key thing (arduino must ground to car to measure voltage) and anything over 5v will require an external voltage sensor.

    If you don't know a huge amount about it, really need to jump in and learn to get it working for a specific task, it's next to impossible to code this stuff remotely.

    (in-dash screen)


    (temp wiring)

  5. #5
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    After small and simple Allen, just a simple logger, not a complex retail solution

    Jason, I've tracked the guy down in Facebook and sent him some questions. Going to try and get a copy of the full code he used for the FSAE car, not just the 'intro' stuff he's posted.

    Seems like it could be a good thing
    Mit freundlichen Gre

    Quote Originally Posted by Keith Duckworth View Post
    "I think that in a racing engine, the closer it is to disintegrating, in general the better its performance will be "

  6. #6
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    I've been wanting to learn arduino for years, but avoiding it. This might be the thing to finally push me into it,
    Mit freundlichen Gre

    Quote Originally Posted by Keith Duckworth View Post
    "I think that in a racing engine, the closer it is to disintegrating, in general the better its performance will be "

  7. #7
    Registered User TRD-MX62's Avatar
    Join Date
    Jun 2014
    Location
    melb
    Posts
    1,742
    Quote Originally Posted by doctor ed View Post
    After small and simple Allen, just a simple logger, not a complex retail solution
    The CDL3 can plug into your stock ECU OBDII port and get what data it offers...

    good data logging is one of those things you do not value enough until you have it, try the Arduino on the go-kart not the road car!
    Quote Originally Posted by ALLMTR View Post
    the theory is the fuel pump is one of the only things that can fuck out on a diesel

  8. #8
    Unregistered User Permit Roadsailing's Avatar
    Join Date
    Aug 2003
    Location
    melbourne
    Posts
    5,864
    buy one now, they are dirt cheap on ebay. Maybe start with a mega as they are cheaper and easier than frigging around with multiplexers to get more I/O.

    No idea on the video side of it.

    I built and used one of these (it's just a shield with an SD card interface and a RTC really) to do datalogging, it logs to .csv and you view the logs with excel, pretty useful but doesn't look like what you are after.

    https://www.adafruit.com/product/1141

    If you don't have an ECU you could consider a megasquirt, the higher spec versions do datalogging (and autotune and all sorts of good shit)

  9. #9
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    Quote Originally Posted by Roadsailing View Post
    buy one now, they are dirt cheap on ebay. Maybe start with a mega as they are cheaper and easier than frigging around with multiplexers to get more I/O.

    No idea on the video side of it.

    I built and used one of these (it's just a shield with an SD card interface and a RTC really) to do datalogging, it logs to .csv and you view the logs with excel, pretty useful but doesn't look like what you are after.
    https://www.adafruit.com/product/1141

    If you don't have an ECU you could consider a megasquirt, the higher spec versions do datalogging (and autotune and all sorts of good shit)
    I dunno, that doesn't look bad. I don't need anything super complicated, I just want to be able to plot and compare suspension movement/height before and after aero changes. Also 4x wheel speed so I can look at slip and lockup. GPS for position and speed a bonus to make interpretation easier.

    Video and OBD stuff I just run through to the phone via HLT and GoPro. Proper OBD logging I can do through dash command. There's enough in there to keep me occupied.

    Allen, dash logger can't do the analogue (pot) inputs x4 for the suspension
    Last edited by doctor ed; 16-10-17 at 09:11 PM.
    Mit freundlichen Gre

    Quote Originally Posted by Keith Duckworth View Post
    "I think that in a racing engine, the closer it is to disintegrating, in general the better its performance will be "

  10. #10
    Unregistered User Permit Roadsailing's Avatar
    Join Date
    Aug 2003
    Location
    melbourne
    Posts
    5,864
    Quote Originally Posted by doctor ed View Post
    I dunno, that doesn't look bad. I don't need anything super complicated, I just want to be able to plot and compare suspension movement/height before and after aero changes. Also 4x wheel speed so I can look at slip and lockup. GPS for position and speed a bonus to make interpretation easier.

    Video and OBD stuff I just run through to the phone via HLT and GoPro. Proper OBD logging I can do through dash command. There's enough in there to keep me occupied.
    you could add GPS and accelerometer to that thing but I have a hunch you would run out of inputs pretty quick, especially if you wanted a display too.

    if you just want to view the logs then that would be a good place to start. the code it comes with isn't very sophisticated, I altered it so it would name the files with the date and time instead of "file 1, file 2, file 3" which made it much nicer to find what I was looking for when viewing logs. probably worth buying even if you end up using something else (like a mega with a seperate RTC and SD card etc hooked up) as you know all the hardware will work and the program will run, then you can work out why it works and go from there.

    You would need to do some signal conditioning on the wheel speed sensors and probably make voltage dividers but that shouldn't be too hard to get working.

    something liek this http://www.ebay.com/itm/For-Land-Rov...-/152447066249 would be good for suspension travel, probably a potentiometer inside but would be fairly water proof and not have to fuck around with linkages, come to think of it I have a long term project which these would work good for but I need 24 of them.

  11. #11
    Registered User TRD-MX62's Avatar
    Join Date
    Jun 2014
    Location
    melb
    Posts
    1,742
    Quote Originally Posted by doctor ed View Post
    Allen, dash logger can't do the analogue (pot) inputs x4 for the suspension
    yeah it can...

    Inputs
    Provision for 4 x analogue voltage high resolution inputs
    Provision for 2 x analogue temperature inputs
    2 x Digital inputs
    3 x Speed inputs with voltage measuring capability
    Compatible with E888 expander (8 Thermocouples only)
    Outputs
    4 x PWM, switched or digital outputs

    Was not included early on but now standard...

    http://www.motec.com.au/latestnews/cdl3pricereduction/
    Last edited by TRD-MX62; 16-10-17 at 09:36 PM.
    Quote Originally Posted by ALLMTR View Post
    the theory is the fuel pump is one of the only things that can fuck out on a diesel

  12. #12
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    Ok, yeah, it does. But I just looked a little further ... +$2k ?!
    LOL, no.

  13. #13
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    With the arduino, if I'm getting optimistic with the number of inputs, I could drop the wheel speed sensors. So 10hz GPS, 3 axis accelerometer, 4x suspension position inputs (could repurpose some simple 3 pin TPS's as rotary pots).

    That would be a ton of data

  14. #14
    Unregistered User Permit Roadsailing's Avatar
    Join Date
    Aug 2003
    Location
    melbourne
    Posts
    5,864
    If you condition the signal right you could use digital inputs to read wheel speed

    an arduino uno(etc) has 6 analog inputs and 14 digital (though I think 2 of these are used to communicate with the logger)

    on the analog side:

    accelerometer X axis
    accelerometer Y axis
    accelerometer Z axis

    suspension sensor lefty
    suspension sensor righty
    suspension sensor backy
    suspension sensor backy junior

    so you're over capacity already.

    I think you will have enough digital inputs for the GPS (2 pins or so) and 4 wheel speed frequency inputs.

    on the suspension position you will want a "zero" in your code so you can hit a tare (for want of a better word) button when you are sitting on flat ground and it will use that value as zero, then log positive and negative values relative to that.

  15. #15
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    To my naive eye, the Leonardo board looks like it could do the necessary?

    Then there's this:
    https://www.adafruit.com/product/1272

    That with a Leonardo board and the hardware is looking sorted?

  16. #16
    Unregistered User Permit Roadsailing's Avatar
    Join Date
    Aug 2003
    Location
    melbourne
    Posts
    5,864
    Quote Originally Posted by doctor ed View Post
    To my naive eye, the Leonardo board looks like it could do the necessary?

    Then there's this:
    https://www.adafruit.com/product/1272

    That with a Leonardo board and the hardware is looking sorted?
    Yeah that should do it, looks like the Leo has 12 analog inputs. I think Uno Shields plug into the mega too as you could get even more capability with a bit of code tweaking if you had to.

  17. #17
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    The gps logger board doesn't seem to be mega compatible, so the Leo would be the best option.

    That said, apparently the inductive speed sensors aren't read very reliably. Hall effect is ok, but he induction types are a bit of a dud.

  18. #18
    Registered User AlexinPerth's Avatar
    Join Date
    Mar 2005
    Location
    Perth
    Posts
    2,786
    Awesome stuff, I've been thinking about looking into these recently. Looking forward to more updates.

  19. #19
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    Last edited by doctor ed; 18-10-17 at 07:28 AM.
    Mit freundlichen Gre

    Quote Originally Posted by Keith Duckworth View Post
    "I think that in a racing engine, the closer it is to disintegrating, in general the better its performance will be "

  20. #20
    Registered User aerobrick's Avatar
    Join Date
    Jun 2016
    Location
    Central VIC
    Posts
    429
    I've done a fair bit of Arduino logging, including that adafruit board since 08. How many times per minute do you plan to write this data? SD card is going to be your bottleneck and also the first thing to fail. Buy a good one.

  21. #21
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    How fast is a reasonable log rate for these things? I would've thought logging at 10Hz for durations of maximum 30mins would get me in the ballpark.

    That's 18,000 log points in 30mins, with say:
    Gps lat/long/speed
    3axis X Y Z
    4x suspension position

    So 180,000 data points in CSV format

  22. #22
    Purist, whats that? Jason Broadhurst's Avatar
    Join Date
    Nov 2003
    Location
    North Brisbane
    Posts
    6,370
    10 hz will be fine, and that is not even kb/s so quite OK for a cheap SD.
    Jason Broadhurst

    Someone once asked me if they could use my mower. I said "sure, so long as it doesn't leave my yard"

  23. #23
    Registered User aerobrick's Avatar
    Join Date
    Jun 2016
    Location
    Central VIC
    Posts
    429
    The latency is in opening the file, writing, saving, releasing file handle. I haven't looked at that shield's library since pre Arduino 1.0 days, but back then you had to do that full sequence for every write. If that's still a limitation you'll need to batch writes.

  24. #24
    Unregistered User Permit Roadsailing's Avatar
    Join Date
    Aug 2003
    Location
    melbourne
    Posts
    5,864
    Quote Originally Posted by aerobrick View Post
    The latency is in opening the file, writing, saving, releasing file handle. I haven't looked at that shield's library since pre Arduino 1.0 days, but back then you had to do that full sequence for every write. If that's still a limitation you'll need to batch writes.
    from memory when I was using it the program logged "10 entries", then opened the file, saved the data and closed the file, maybe it just saved every 10 logs. I think I made it save every time it logged as my sample rate was low (one hert) and I didn't want to lose any data points.

  25. #25
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    Was broadly looking good at software interfaces that could be used to crunch these data dumps, and landed by gems (apparently their software gets a great wrap, along with motecs). In any case, they also have thus...

    http://www.gems.co.uk/docLib.php?doc...cification.pdf

    Still trying to find a price on it, but 'looks' inexpensive. Need to look at viability of plugging in a GPS to the serial port, and then what dactyl would be needed to get CAN data, but it would suddenly become a very viable solution
    Mit freundlichen Gre

    Quote Originally Posted by Keith Duckworth View Post
    "I think that in a racing engine, the closer it is to disintegrating, in general the better its performance will be "

  26. #26
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    Hi Ed,

    Thanks for your email.

    Yes, we can sell you one directly...prices follow.

    DA3 - 860
    Shipping - 35

    Our data analysis software 'lite' version is free of charge and can be
    downloaded from our website here
    http://www.gems.co.uk/?content=pages...ware-downloads We also have a
    'Pro' version which has added features such as maths channels and CSV
    import/export...details of the differences can be found here
    http://www.gems.co.uk/?content=pages...-data-analysis The pro version
    costs 250

    If you wish to go ahead with the purchase, I will require your full contact
    details...address, telephone and VAT number if you have one. I can then set
    you up on our system and send you our pro forma invoice. Goods can be
    shipped upon receipt of payment which can either be made by bank transfer or
    credit card.

    Best regards

    Pat Simpson
    GEMS Ltd
    Mit freundlichen Gre

    Quote Originally Posted by Keith Duckworth View Post
    "I think that in a racing engine, the closer it is to disintegrating, in general the better its performance will be "

  27. #27
    Interested bystander
    Join Date
    Dec 2001
    Location
    Australia
    Posts
    797
    Quote Originally Posted by doctor ed View Post
    How fast is a reasonable log rate for these things? I would've thought logging at 10Hz for durations of maximum 30mins would get me in the ballpark.

    That's 18,000 log points in 30mins, with say:
    Gps lat/long/speed
    3axis X Y Z
    4x suspension position

    So 180,000 data points in CSV format
    10Hz is no good for suspension position. 270 kmh is 75 m/sec so 10Hz at 75 m/sec is a suspension travel reading every 7.5 m of travel. Scale accordingly for slower speeds. Barely useful.

  28. #28
    GTFO of my ED doctor ed's Avatar
    Join Date
    Jun 2002
    Location
    irgendwo
    Posts
    4,110
    So at 280kmh Im only getting a datapoint every 7.5m, which is still every 0.1sec

    If I do 100Hz sampling, what info suddenly becomes apparent? Does meaningful, tunable suspension movement occur under 0.1sec intervals? i can see that more resolution would be good, but wheres the line between enough and too much?
    Last edited by doctor ed; 17-10-17 at 09:35 PM.

  29. #29
    Registered User
    Join Date
    Mar 2005
    Location
    wollongong
    Posts
    969
    Buy an old generation AIM Mychron MXL and AIM do patch harnesses that logs every sensor in the car.

  30. #30
    Unregistered User Permit Roadsailing's Avatar
    Join Date
    Aug 2003
    Location
    melbourne
    Posts
    5,864
    Quote Originally Posted by doctor ed View Post
    So at 280kmh Im only getting a datapoint every 7.5m, which is still every 0.1sec

    If I do 100Hz sampling, what info suddenly becomes apparent? Does meaningful, tunable suspension movement occur under 0.1sec intervals? i can see that more resolution would be good, but wheres the line between enough and too much?
    without thinking about it too much a reading every 7.5 metres (actually 7.778m) would probably be OK if it was an averaged reading, but consider the following:

    going around two corners, identical in every way but one is flat and one is bumpy.

    On the smooth corner you will have readings that correspond to the compression/extension of each corner at X intervals. (if your main logging environment is smoothish racetracks this is probably fine)

    On the bumpy corner you will have readings that correspond to a combination of the compression/extension of each corner plus whatever the bumps and holes are doing to the corners are doing at the same interval.

    It will be pretty trivial to adjust the sample rate and the files will be pretty small so it probably isn't worth worrying about too much. Better to have too much data than not enough, but I think you will be limited by either the program or storage requirements, and you will spot an oversampled graph pretty quickly and be able to adjust accordingly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •