DIY data collection (with link to working code for Arduino and Bluetooth )

Output temperature (or whatever) from Arduino to RaceChrono via Bluetooth
Short and simple code made by DrMotor for NiNo-racing https://www.facebook.com/ninomotorracing/

Free to use, share and improve: https://drive.google.com/file/d/1mLRYEhGO13sL0eFP0sm9QtEvY1IDeYdI/view?usp=sharing
«1345

Comments

  • Thank you for sharing!
  • Update: V0.2 https://drive.google.com/file/d/1Q1PgftHmVJHZ2RS9aPMR6TE159BLNNQM/view?usp=sharing

    Changes:
    * Internal pull-up resistor in stead of external,
    * Added link to instructions for data rate
    * Reduced filter time constant
  • Update: V0.3 https://drive.google.com/file/d/1BrJQQi1hsWn1SMY-dmzat2M6y8sQYSM3/view?usp=sharing

    Changes:
    * Added thermocouple (for exhaust temp) via MAX6675
    * Connected throttle and brake pedal sensors
    * Reduced update rate of temperature reading beacuse MAX6675 appears to be slow
  • I tried AT09 (BT4/BLE) module in stead of HC05 (BT2). When using "Serial Bluetooth Terminal" on my Android phone I can see data is arriving (same with AT09 as with HC05), but with AT09: RaceChrono (on the same phone) always and forever get stuck with message "Connecting to Data logger..." and "Connecting... (waiting)".

    Preliminary conclusion: AT09/BLE works with my phone, but not with RaceChrono. I will continue using the HC05 and save the AT09 for another project. The Arduino/Nano is anyway too slow to take advantage of the higher speed of BT4.
  • @DrMotor
    Did you add rpm sensor?What type of throttle and brake position sensors are used? Can you share sensor installation photos?
  • My pedal sensors: analogue hall IC + wire + permanent magnet + 3d-printed bracket. I removed them from the kart because of FIA/national regulations (it might be OK for practice if no-one complains).

    No RPM sensor yet -- it has low priority as the go kart has a single gear ratio and I can calculate RPM from speed (Bluettooth GPS).
  • @izzl551:
    kart pedal sensor in parts https://drive.google.com/file/d/1W8gwKLMNdZLv570sDJ2aKmE0Q_mF1aB4/view?usp=sharing
    sensor as used (not mounted): https://drive.google.com/file/d/1C5UVPgGk2YYrefDd_QTI3kPoB3RnuImu/view?usp=sharing
    I used same sensor in this e-kart: https://www.facebook.com/ninomotorracing/videos/1857248704301750/

    Assembly to go kart:
    1. clip Hall into the holder
    2. zip-tie holder with Hall to chassis close to pedal hinge point
    3. zip-tie magnet to pedal arm (at hinge) so that a magnet pole points towards Hall when at half throttle (or approx touch point of brake)
  • @DrMotor
    Very great DIY, I think rpm is very important, GPS update rate is 10-20hz, rpm update rate can reach 50-100hz, rpm curve can reflect the driver's throttle control, rpm sensor is more than the throttle position sensor important,
  • @izzl551
    OK, so I move RPM sensor to top of my list -- makes sense as pedal sensors are banned. The argument against additional sensors goes like: "too expensive for karting". I is unbeliavable that a 50 cent pedal sensor should fall for that argument.

    It would be easy to connect the Arduino to the crank angle sensor (the sensor is already present for the ignition system), but modifications to the ignition system are banned. Most RPM probes for karting use only capacitive coupling towards the high voltage spark plug cable -- the sensor cable goes from logger and is tied to (sometimes twisted a couple turns arround) the spark plug cable.

    Do you know what circuit can/should be used for detectig the signal from such capasitive coupling?
  • edited March 2018
    We have a race series here in Finland where data logging (including RaceChrono) is completely banned because it's "too expensive" ...
  • @DrMotor
    Kart sensors are too expensive due to monopoly. There are only three companies in the world that produce kart data recording equipment. AIM, alfano, unipro and AIM are monopolized. So the price is very expensive. My current idea is to replace mychron5 with mobile phones. I want to record GPS, RPM. , water temperature three data. I am looking for an rpm sensor that can be connected to arduio. But did not find a suitable solution, raceDAC too expensive.
    (the sensor is already present for the ignition system)
    I know that the ignition system is forbidden to modify. Is it possible to obtain the rpm signal from the ignition system without modifying the ignition system?
  • @aol
    Yes, the karting sensor is really too expensive. When I know that there is a racechrono app, I think karting data logging equipment can be very cheap. Use a mobile phone with a home-made sensor to replace Amy's mychron5。Racechrono is a great application, and self-made sensors will be perfect if they can support IOS.
  • Yeah... iOS is not yet supported by the RaceChrono's DIY stuff. Only because Bluetooth RFCOMM is not open in iOS. Need to create equivalent API through Bluetooth LE which is open in iOS.
  • @AOL
    Do you have a timetable for BTLE support?
  • edited March 2018
    No, I got A LOT to do before I can start on that. But maybe this thread will help me to build a test device, so I can start experimenting with it :)
  • edited March 2018
    @lzzl55: About RPM AIM, Alfano, etc use only a wire as capacitive pickup.
    I have not tested this, but.... http://www.sportdevices.com/rpm_readings/index.htm

    Another idea: Use a Hall element with a permanent magnet behind towards the starter gear teeth (a new application for my pedal sensor :-) 70 teeth at 12 000 rpm would give 14 kHz signal. Google says Arduino can measure up to 50 kHz -- so this should be possible.
  • Link to sketch of RPM sensor at starter gear: The arrow indicates sensing direction of Hall chip. https://drive.google.com/file/d/1-aPG927oz2Yothz3cHr2BcT3w20tTJCj/view?usp=sharing

    This layout should give nice symmetric magnetic flux variation through the chip. It is of course possible to arrange it other ways.
  • Hi...i am a new user here. As per my knowledge there are only three companies in the world that produce kart data recording equipment. AIM, alfano, unipro and AIM are monopolized. So the price is very expensive. My current idea is to replace mychron5 with mobile phones. I want to record GPS, RPM water temperature three data.
  • Mychron5 is better for serious racers -- much easier than DIY. However: the following combination of parts cost < $30 on Aliexpress and work with RaceChrono and phone:
    -- Control board: Blue Pill (Arduino) STM32F103C8T6
    -- Programmer: ST Link V2 (needed if your Blue Pill does not have Arduino bootloader)
    -- Bluetooth module: HC06
    -- DC/DC 12V to 3.3V (from 12V start/ignition battery)
    -- GPS: EYEWINK-VK2635U7G5LF 10HZ
    -- Volvo 240 water temp sensor (M10x1 2kOhm thermistor, fits Rotax Max)

    My kart has single speed transmission so the Arduino program can calculate RPM from GPS $VTG signal. Drawback: I need to update the program after changing sprockets or wheels.

    BTW: Can RaceChrono calculate and display "shaft RPM" based on rolling distance per rev? Would be easier to change a value in RaceChrono/phone than in Arduino prog.
  • edited May 2018
    @DrMotor Thanks for keeping is updated. You're project inspired me to do the same, my parts are on order. I'm going to install it in a trackday MX5 to capture throttle position and brake pressure.
    I'm only not yet sure what type of sensors I can use.

    What's the reason for changing from Nano to Blue Pill?
  • Blue pill's SMT32 is newer, better, faster and lower priced. It has CAN, several UARTs, better timers, higher resolution ADC, etc. etc. ...and I had some of them from before.
  • RaceTemp V0.7 Arduino code for STM32 Blue Pill: https://drive.google.com/file/d/1ZQeLNe9NGixLzBztFdM78BLBCXg__wpR/view?usp=sharing

    -- New feature: Engine RPM via capacitive coupling to spark plug wire.
    -- New feature: Motion sensor MPU9250, 3x Accel + 3x Gyro (+ 3x Magnetometer).
    -- New feature: Lap- and split-times from magnet strips buried in the racetrack.
    -- New feature: RaceTemp requests the GNS-module to send _only_ UBX-NAV-PVT messages, then translates into $GNGGA and $GNRMC and sends these to RaceChrono via Bluetooth. (Previous RaceTemp versions forwarded everything from GNS to Bluetooth, without parsing.)
    -- New feature: Just connect the wires, upload the program and it _should_ work OK at 10 Hz without prior/manual configuration of GNS or Bluetooth.
    -- New "Config section": Add/remove // in front of line(s) to disable/enable features
    -- New navigation module: Ublox Neo M8N.
    -- New Bluetooth module: JDY-30
    -- $RC3 messages (only $RC2 in earlier versions)
    -- Split the code into several files
    -- Blue Pill for security, happiness and the blissful ignorance of illusion. http://www.wikipedia.org/wiki/Red_pill_and_blue_pill

    PS! Not all the new features are fully tested yet -- expect bugs!
  • @DrMotor Nice project. How did you manage to detect the magnetic strips burried in the track? What sensors did you use for that?

    Thanks.
  • @guzu Thank you! Magnet pickup: Latching omnipolar Hall sensor, e.g. OH4913 or AH1807. Place it so that it measures magnetic field in vertical direction close to ground. If using a bipolar sensor in stead of omnipolar, then it might be better to measure in driving direction.

    It can pick up ignition noise -- works best when the blue pill is powered by separate battery and without the engine sensors.
  • @DrMotor Thanks for the reply. have you tested it? Does it work IRL? I was thinking of using one of these: SI7201-B-00-FV - Hall Effect Switch, Omnipolar Switch. For a project I'm working on.
    Do you think it will work?

    Thank you.
  • I've always wondered how far this magnetic strip can be detected from. I mean can it be detected with a "standard" cheap 3-axis IMU sensor from 50cm away?
  • Measured at the local racetrack: Magnet flux density at surface: approx 4.8 mT (or slightly more -- my MPU9250 saturates at 4.8 mT). This means that OH4913, AH1807 or SI7201-B-00-FV needs to be _very_ close to the surface in order to latch. Better use a sensor with lower trigger level -- 0.5 mT or so would be good. Alternatively; maybe one could use a piece of mumetall (or other high-permeability material) to focus the flux.

    MPU9250 has high sensitivity (and LSB resolution = 0.00015 mT), and I guess it can detect the magnet strip from 50 cm or so, but the update rate is too slow for racing.

    BTW: The magnet strip is installed with north/south poles in the driving direction, so I should have the sensor also measuring in the driving direction.
  • @DrMotor Thank you very much for the information. I wanted to find out the Magnet flux density of the magnetic lines for a long time now.
    I found this sensor that might do the job: SI7202-B-00-FV. it has an operating point of 0.00065T.

    I am working on a project similar to yours. Will post here somewhere after I test it sometime next month.

    Thanks.
  • @DrMotor
    How did you get the rpm? Is it like mychron? Is there a circuit diagram or a picture?
Sign In or Register to comment.