Support for j1850 VPW/PWM?

Looking for library for j1850 protocols. Thought I read there was one started but not complete.

In about a week I will want to start trying to connect to my '03 Pickup which uses j1850 VPW and am willing to help develop the library but need to know if there is indeed one that has been atleast started?

Thanks!

1 Like

Im curious about this too…I think theres an Arduino library somewhere out there that emulates ELM327 functionality…but Ive never used it.

Ive used plenty of actual ELM327 chips interfaced with Arduions via UART/serial, but not any actual libraries to make the Arduino support J1850 “native”.

Ben

https://pcmhacking.net/forums/viewtopic.php?t=3456

1 Like

Looks promising. May have to do some research and see if it can be ported over to M2. I am sure it should be able to once I understand how the hardware is put together.

Rodney

J1850 PWM/VPW library needs a little work still. We’ll collect everything we know and I’ll post up what we know here, along with any work-in-progress code. Rodney - Thank you for the willingness to take this project over!

Im happy to beta test J1850 VPW code too… I have a ton of ELM327 experience, as well as an entire bench harness setup with a lot of GMT-800 (99-06 GM full size truck/SUV) modules all tied together to simulate most of a full size truck…

Ben

I have a large project to customize an '03 Chevy Avalanche that will rely heavily on using the data bus and have been tinkering with a couple STN based ELM compatible devices up to now. While I haven’t bumped up against the “buffer full” issue yet I would much rather go a different route and build out some decent utilities to use with it. I have protocol documents that explain how it works and some command structures so I am on the way. Just need to understand how the hardware works and go from there. I realize that CANBUS seems to be the big thing right now but a large portion of vehicles out there still are GM’s between 1996 and 2005 that use this protocol. I am not interested in the ford version of the protocol and have no resources for that.

Ben, can you let me know what pieces you actually used to obtain your test bed? I may attempt to build something similar instead of using my truck directly. Might be smarter… :wink:

I have a spare dash cluster I can use but thinking more of the bare necessities I would need. I could always buy a junked truck and strip out everything but not the simplest solution.

on GMT-800 vehicles, you shouldnt run into buffer-full errors, especially with the improved STN-xxx chips. Even though GM made very widespread use of J1850 (class 2) on 2003-2006 GMT-800, its still only 10.4k…so ELM/STN chips are usually ok for them.

99-02 only had like 3 or 4 modules on the bus, but in 03 they transitioned to a true fully-multiplexed electrical architecture, with 10-15+ modules all on the bus. Really there wasnt anything (besides the sunroof) on the 03+ trucks/SUV’s that was NOT controlled via data in some way. It was actually very impressive for the time when it was introduced. Ford/Chrysler didnt catch up to GM’s level of databus use/integration on their trucks/SUV’s until at least 4 years later lol.

But anyway…grab yourself a BCM, ECM, instrument cluster…you can also add driver/passenger window switches, radio etc… They’re all really cheap, I wouldnt pay more than $40 for a BCM, $75 for a PCM, and maybe $150 for an instrument cluster. www.mouser.com has all the connectors you’ll need. And then just get yourself a 12volt bench power supply, an OBD port, and get to wiring it all together…

You dont NEED multiple modules in order to get them talking. You could just power up that spare cluster you;ve got there and start messing around…

Id grab a chinese knock-off Tech 2 (the gm dealer scan tool) as well…theyre like $250 bucks. Then you can watch messages that the Tech 2 sends out when you use the Tech 2 to command the truck to do things (fold the mirrors, windows, horn, yaddyayayda)…and just copy those messages and incorporate them into your code.

Class 2 is super easy to reverse engineer because the header tells you everything you need to know. Its 3 bytes.

[message priority] [intended destination ID] [sender ID]

So you basically just watch the sender ID and you can tell which message is coming from which module. Id have to look up all of them, but off the top of my head, $40 is the BCM, $60 is the IPC, $80 is the radio, $A0 is the DDM (driver door module), $A1 is the PDM (passenger door module), $58 is the SDM (airbag module) $97 is the VCIM (onstar).

I think the HVAC module is $86 and ABS is $56, I cant remember.

your Avy is gonna have:

BCM
PCM
radio
IPC
DDM
PDM
RSA (rear seat audio)
HVAC
XM module
RSE (rear seat entertainment, if you have the DVD player)
TCSM (transfer case shift module)
EBCM (electronic brake control module, the ABS)
SDM (sensing diagnostic module, the airbags)
MSM (memory seat module)
VCIM (onstar module)

I think thats it…Escalade/Denali will also have CD changer and Bose amplifier on there. (I know your Avy probably has Bose, but the Escalade/Denali gets a nicer bose amp that is “smart” and communciates on the bus)…and Duramax diesel trucks have a separate TCM (transmission control module).

European export tahoes have a TDM (theft deterrent module) as well…european export 02-06 SUV’s got a true immobilizer with a transponder in the key because ECE regulations stipulated that all vehicles needed to have an encrypted transponder/immobilizer in the key. USA trucks just had the crappy Passlock ignition cylinder, which was controlled by the BCM, no separate TDM.

The USA trucks/SUV’s didnt get a transponder key until 2007, when the new body style came out (GMT-900, they also ditched Class 2 and switched over to CAN)

Ben

1 Like

Also, I should mention…for a fun first project for ya.

Watch messages from the onstar module ($97)…and then use onstar to make a phone call. I know your onstar doesnt work anymore, but just try to make a call anyways…because then you’ll see exactly how the onstar module sends text (the phone number you’re calling) to the driver info center display. Once you figure that out…you can write a little Arduino program to send whatever text messages you want to the instrument cluster. :wink:

I think you can send anything up to 20 characters, thats the limit of the DIC display itself I thinjk. Its been a while since Ive messed with DIC text messages on GMT-800.

My truck is an Z71 off road truck. Does NOT have sunroof, turnsignal mirrors, TPMS, rear backup radar or onstar. Has pretty much everything else other than the rear entertainment module.

The cluster I have is complete other than the fact it has no actual motors or gauges on it. I stripped it to fix my cluster before giving up and sending to someone. I can probably make it operational again for under $50. Just need motors and needles for it.

I have some j1850 documentation and part of it gives the GM module ranges. I was shocked to find out the PDM contains the receivers for TPMS and Key Dongle.

Since I will be replacing my radio and using a computer I hope to find out how to do the steering wheel controls (Although I have to add them) and things like rear seat audio and XM radio. Those all use data bus commands to communicate with the radio.

steering wheel commands are going to be broadcast from the BCM.

I think the destination node is $EA, functional user controls.

So you’d be looking for a message with the header $10 $EA $40.

Rear seat audio uses the rear-speaker outputs from the radio which double as secondary audio source. So when you hit RSA on, the RSA module sends a data message to the radio, and the radio switches the rear speaker outputs from being rear speaker audio, to be the secondary audio source.

The rear speaker outputs from the radio to the Bose amp are looped through the RSA module, so the RSA module can cut off the output to the amp. SO when in RSA mode, the rear speakers actually cut out.

1 Like

Yup, this is the way I understand the RSE also. There IS a data bus connection however. I understand this to be a communications interface between the radio and the RSE so that the data on the display can be sent from the radio and the RSE can tell the radio what it wants. I rewired my console when the BOSE amplifier died but I hope to look into how it works so I can incorporate the RSE into my computer.

My understanding of the steering wheel controls is that the actual mechanism its self is resistor based and the BCM gets the signal directly, decodes it and sends on its way.

My stock radio acts much like a standard radio with the BOSE amplifier with amp turn on and an amplified output that the BOSE amplifier amplifies further. The upscaled version in the Escalade and others sends out a low level audio from the radio and uses a databus connection to tell the amplifier what volume etc to use.

careful… RSA and RSE are two completely different things. :wink:

RSA = rear seat audio…the secondary audio source controls on the back of the center console that let rear passengers plug in headphones and privately listen to a different audio source.

RSE = rear seat entertainment…the ceiling mounted DVD player

Both modules communicate on the bus.

correct…the luxury Bose system uses fixed low level outputs and gets volume/amp info over the bus. THe premium bose system uses variable low-level outputs, and does not communicate ont he bus.

Yes, the steering wheel controls are a resistor ladder that the BCM reads…and then the BCM broadcasts the appropriate message onto the bus.

Meant RSA. RSE was typo.

Didn’t realize the $250 tech 2’s were knock offs. Look the same?? Wondered what the difference between the $3000 units and the $300 units were other than the $3000 units come with a bunch more hook up harnesses.

Are there any updates on the hardware specifications of these? It is not obvious from the limited writeups how to make what is there work. I am done with classes this week and would like to get started on building the library for this as soon as possible. The guide states it has been started but would like to see whatever code is started and such so I can get going on this.

Thanks!

Rodney

Posting what we’ve got so far for J1850 PWM and VPW development. Here is a Gist showing how to initialize J1850 pins for Macchina M2:

Starting with the pin mapping table here and the SAM3X datasheet here. (page 43, specifically)

J1850+_TX is connected to pin 45 or PC18. This corresponds to the PWMH6 on peripheral B.
J1850-_TX is connected to pin 7 or PC23. This corresponds to the PWML6 on peripheral B.

PWMH6 and PWML6 functionality is described in section 38: Pulse Width Modulation (PWM)

J1850_VPW_RX is connected to pin 4 or PC26. This corresponds to the TIOB6 on peripheral B.
J1850_PWM_RX is connected to pin 3 or PC28. This corresponds to the TIOA7 on peripheral B.

TIOB6 and TIOA7 functionality is described in section 36: Timer Counter (TC).

Next step will be to write or find drivers to read and write waveforms. There are a couple existing projects that can hopefully be re-used or at least refered to. We’ve got a couple here, and will add as we find more resources.

[details=J1850 VPW reader via UNO]He has a write up (In Finnish) here: http://urn.fi/URN:NBN:fi-fe201505068045.

We spoke with the creator and he had a few notes/suggestions:

  1. Code/functionality is not ready as it was done under time limits given from school project. So there is basic communication in place and the built equipment does communicate with vehicle comm bus, but there are unsolved problems and hiccups in the comm link.
  1. Faster processor would probably be needed for better featured reader, f ex whats in the DUE, but that will need some work to port the code to 32bit Arm based processor.[/details]
Open source ELM327 emulation on LPC processor

https://github.com/ObdDiag-Net/allpro/tree/master/src/adapter/obd

This would need to be ported to ARM, but very well written code anyway.

Feel free to reply with more information, or questions, but hopefully this will be a good start as a J1850 library is created.

1 Like

Ok thanks. I will be jumping on this shortly. I have finals the next two days and I just got an offer for a donar vehicle. I will be stripping the needed components out of a ~2003 Chevy S10 Blazer. Have to verify the year so I can go through my factory docs and insure I pull as much as I can that resides on the Databus. I will be using this to do initial development and likely test in my truck.

I will likely have more questions once I have a chance to go through this stuff.

So I am looking through the stuff mentioned here and trying to sort out what I am seeing…

If I am understanding the information provided these two are pretty simple. (As labeled on the Macchina pinout chart)

J1850_PWM_nVPW = selector of which protocol using.
J1850 9141 ON = turn power on and off to the circuitry.

The other 4 pins I am unsure what their intended purpose is.

Arduinos are new to me so I may have a little bit of a learning curve here.

Looking through the documentation let me share what assumptions I am making so you can correct me if I am wrong.

The RX lines are receive only lines.
In the case of both of the RX lines from the schematics it appears the input is somewhat processed. I am assuming part of this is to prevent input float…

So in the case of the VPW we only look at the J1850+ line and it will be seen as either a 3.3 volt high or a 0.

In the case of the PWM the J1850+ and J1850- lines are compared and then the output will be either 3.3 for high or 0.

For the send lines I am assuming the J1850- is always held at 0 for VPW and we only worry about the J1850+ tx line.

For PWM then would we set both pins the same or opposite? Since they are a differential signal I am assuming that when the pins are low they are at ground. And when set high the actual output would be voltage above ground for the J1850+ and below ground for the J1850- output?

So basically to create a data high I would set the J1850+ pin high in both cases. But with PWM you set both 1850 pins high to achieve the same data high output. (Hopefully makes sense?)

If I am understanding this then I think this will be easy to do. Especially with examples already in existence. My biggest challenge will be to learn how to write a sketch which looks to be simple.

Found out my donar vehicle is actually a 2000 S10 Blazer.