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
Comments
Changes:
* Internal pull-up resistor in stead of external,
* Added link to instructions for data rate
* Reduced filter time constant
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
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.
Did you add rpm sensor?What type of throttle and brake position sensors are used? Can you share sensor installation photos?
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).
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)
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,
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?
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?
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.
Do you have a timetable for BTLE support?
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.
This layout should give nice symmetric magnetic flux variation through the chip. It is of course possible to arrange it other ways.
-- 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.
Pictures: https://drive.google.com/file/d/1RXwl85YNJ7-2EU-Yy0jCZucYQJlrgTA-/view?usp=sharing
Arduino code: https://drive.google.com/file/d/18Se6H6yTlmhHBzM31PpJqSBFfgXnMZ40/view?usp=sharing
I'm only not yet sure what type of sensors I can use.
What's the reason for changing from Nano to Blue Pill?
-- 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!
Thanks.
It can pick up ignition noise -- works best when the blue pill is powered by separate battery and without the engine sensors.
Do you think it will work?
Thank you.
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.
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.
How did you get the rpm? Is it like mychron? Is there a circuit diagram or a picture?