Curbside
Posts: 1
Joined: Mon Jan 01, 2018 4:13 am

Raspberry Pi on a Harley?

Mon Jan 01, 2018 4:44 am

Hi, all!

I'm attempting to build a real-time display for a hot-rod Harley I'm building, although I'm guessing what I'm doing could be applied to any non-OBD/non-EFI automobile. The bike is a 2001 XL1200 Sportster with a "cafe racer" mini fairing. I'd like to put a 7" touchscreen display behind it to show (in real-time, not "data-logging") everything the factory instrument cluster would show, as well as air/fuel ratio. I'll need to install an O2 sensor for the air/fuel ratio, which can be done easily. In addition to allowing me to see the AFR for better carb tuning, an RP3 and a small monitor will shave a lot of weight from the bike...and it'll look cool as hell!

The unit would need to display the following:
Vehicle Speed
Odometer/Trip Odometer
Engine RPM
Turn Signal
High Beam
Oil Pressure

Can anyone point me in the right direction, as far as how to get the signals from the bike into the RP3?

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Raspberry Pi on a Harley?

Mon Jan 01, 2018 2:09 pm

Is this bike going to be road/street legal or is it going to be a show only bike?

Most countries have strict rules and regulations about vehicle instruments, things like speedometer accuracy, odomter accuracy (and tampering) etc. If you're ever going to want to ride your bike on the street it's best to check into those before you start.

Next is powering the Pi. Not so much providing it with 5v, that's easy, but ensuring a safe shutdown when the ignition is turned off without draining the bike's battery.

As for getting the data from the bike, that very much depends on the bike.

Speed: GPS if legal and reliable, otherwise an RPM sensor on the output shaft of the gearbox and some math. Back in the day every speedo worked like this (cable from gearbox output to dash with inline gearing to convert gearbox rpm to mph and compensate for wheel/tyre diameter).

Odometer/Trip: GPS, but see above. Could be driven by the same sensor/cable as for speed. There's a reason the odometer was mouted inside the speedo.

RPM: Magnet on the flywheel with sensor on the housing. if memory serves this used to be how after market RPM gauges worked.

Turn SIgnal & Highbeam: relay in circuit with the lamp? Use the relay to pull a gpio high/low but make sure you don't put more than 3.3v into the Pi.

Oil Pressue: Drill the block and install a sensor? Tap the output of an existing sensor? Either way you probbaly need voltage level convertion and/or analogue to digital convertion.

Ful disclosure: I am not a biker, or a mechanic so do more research before trying any of the above.
Arguing with strangers on the internet since 1993.

StewBall
Posts: 1
Joined: Wed Apr 04, 2018 12:59 am

progress update please?

Wed Apr 04, 2018 10:10 am

Just started looking into this myself - I work with H-D bikes for a living, raspberry pi beginner.

Heres what I know from preliminary research
- harleys have a data link connector for use with digital tech laptops in the dealership. since introduced communication was first j1850 bus (like obd 2 - codes may be HD specific) with a delphi ignition control module (ICM for Carburated models) then j1850 bus to a delphi electronic control module (ECM for fuel injected models) and current models are can bus system with ECM & body control module (BCM)
- I have been focusing on the j1850 & ICM because thats whats on my 2006 xl1200r sporster roadster (and your 01 I think) The data link connector is a gray 4 pin Deutsch with pin out as follows, 1)unused 2)ground - black wire 3)j1850 data - light green w/violet(pinkish) tracer and 4) 12 volt dc power - gray wire.

Thats where technicians get all of the diagnostic data or dtc's (diagnostic trouble codes)
After reviewing the electronic diag manual there are some major differences in the 2001 model year. only the 1200s featured an icm with a cam position sensor (opposed to a crank position sensor on mine for timing info) all other 2001 sportster models had speedo diag fuction and used a INTEGRAL TIMINGPLATE/IGNITIONMODULE

if i remember right digital tech wasnt introduced until 2005 and prior to that was the scanalyzer diag tool, sensors may be more limited

Most of my inquiries have led me to instructions for a jumper harness to connect a bluetooth obd 2 scanner. https://www.motorcyclescanner.com/colle ... cs-adapter This is the only scan tool I've found bluetooth for H-D, also sell wired options

I hope this helps - woohoo first forum post anywhere

Return to “Automation, sensing and robotics”