Electronics Forum

Electronics Circuits & Projects discussion forum. Get help with electronics.


Extracting the Signal

New to electronics? Don't know where to start. No problem! Post your questions here.

Moderator: pebe

Extracting the Signal

Postby dw85745 » Sat Apr 02, 2016 11:02 pm

Signal verus Voltage
Options

‎04-02-2016 05:50 PM

I have some basic questions.

Purpose:
Obtain the RPM value off of Chrylers CCD bus using ODB_I

What I've done:

I've written a VB program to interface with the RS232 port using the API.
Researched the CCD bus -- twisted pair with one wire (+), the other wire (-) -- running at 2.5 volts
I know the baud rate of the CCD bus signal.

What I think I Understand:

I believe (??) the signal is part of (i.e. rides on) the voltage. Hence the signal -- RPM of interest -- needs to be extracted from the voltage.
Still doing research on the header and trailer bytes (or bits) and the identifying byte which will indicate that the RPM is the next data in sequence

Questions (What I don't understand):

1) How do I connect the CCD bus to my RS232 port.?
2) How do I go about separating the signal from the voltage so I don't kill my computer?
3) How do I determine whether the CCD bus is putting out an analog or digital signal?
If analog I know I'll need an analog to digital converter.
4) Anything else that I should know but haven't asked.


Thanks
David
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Re: Extracting the Signal

Postby pebe » Sun Apr 03, 2016 2:57 pm

1) How do I connect the CCD bus to my RS232 port.?
2) How do I go about separating the signal from the voltage so I don't kill my computer?
3) How do I determine whether the CCD bus is putting out an analog or digital signal?

1) & 2). I don’t think you can. The CCD uses a bidirectional bus over a balanced 2wire cable, whereas the RS232 uses separate wires for Tx and Rx.

RS232 uses bit rates that are even multiples of 75bps, but CCD uses ≈7.8kbs.

RS232 requires a ±5V min signal, but either wire of the CCD bus only provides ±2.5V with a 2.5VDC offset.

3). CCD is putting out a digital signal (8bits plus a start and a stop bit) – not an analogue signal. You will need to know the protocol used because the controller is able to address many devices. I think the first byte probably contains the address, and subsequent byte(s) carry the data requested.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Extracting the Signal

Postby dw85745 » Sun Apr 03, 2016 5:41 pm

pebe:

Thanks for your time and responding.

In doing some reading last night I read that for instrumentation, the voltage and a voltage divider is actually used to control the instrument. In additon there is NO data per se being sent down the line, ONLY voltages that represent this data.
So the instrument range is scaled to the voltages. THIS WAS A BIG REVELATION FOR ME!
For example if the voltage range is 0 to 5 volts and you want to indicate that the instrument failed (which would be at zero volts) that instrument may be designed so that its center value might rest at 4 volts, with decreasing instument values represented from 3 to 4 volts and increasing instrument values from 4 to 5 volts. I also read theat both a postive and negative voltage could be used to accomplish the same thing.

======================
In regard to:
1) RS232 uses bit rates that are even multiples of 75bps, but CCD uses ≈7.8kbs.

Supposedly the baud rate is NOT and issue with the RS232. My understanding based on comments of "supposedly" someone who did something similiar indicated that when they set the baud rate at a Non-Standard value and tested using an oscillosope, that the baud rate was set to that Non-Standard value.

1 & 2) I don’t think you can. The CCD uses a bidirectional bus over a balanced 2wire cable, whereas the RS232 uses separate wires for Tx and Rx.

How do they then use a digital oscilloscope with an Auto and a PC? Hankook I believe makes one.
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Re: Extracting the Signal

Postby pebe » Mon Apr 04, 2016 5:43 am

David,
Supposedly the baud rate is NOT and issue with the RS232. My understanding based on comments of "supposedly" someone who did something similiar indicated that when they set the baud rate at a Non-Standard value and tested using an oscillosope, that the baud rate was set to that Non-Standard value.

True, RS232 only defines the voltage limitations on data and control wires – it does not define data rates. But my experience of RS232 many years ago when programming in QuickBasic was that the chip inside a PC was programmed only to accept the data rates I mentioned within a 5% limit. I have no experience of VB but if you have got it to accept 7.8kbs, then you are obviously right.

I also have no experience of Chrysler cars. The information I used was after a Google search found this article:

http://www.cnblogs.com/shangdawei/p/3570499.html

That clearly states that Chrysler’s CCD bus is a shared digital data bus using collision detection. It is similar to the Philip’s I²C bus, and there is no provision for analogue signals. Consider that the controller has to monitor a whole range of parameters, ie. engine speed, road speed, fuel and oil levels, engine temperature, seat belt status and dozens more things – sequentially and at high speed. Analogue signals in that environment would get extremely noisy and would require filtering, and that takes time. Each sensor would need addressing and that requires a digital signal – so why go analogue? They may use analogue signals for some applications – but not, I think, over that bus.

How do they then use a digital oscilloscope with an Auto and a PC? Hankook I believe makes one.

Digital signals can be read by any ‘scope – digital or analogue.
The advantage of using a digital storage scope like the Hantek one I use, is that any data waveform can be stored and viewed with no constraints on time.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Extracting the Signal

Postby dw85745 » Mon Apr 04, 2016 1:05 pm

The article you linked is also the one I am primarily relying on.
My apologizes, I should have linked with my original post.
Unfortuantely, I can't have a discussion over your last post as getting a bit over my head at this point.
If you have a moment here is a link to a Visual Basic PC Storage Oscilloscope.
(The "DataLogger 2" file is unfortuantely missing after the site went down.)

http://www.planet-source-code.com/vb/sc ... 6&lngWId=1

Based on your comments, since it is using the RS232 port, its a no-go.
Out of curosity, how does the Hantek deal with different vehicles since I'm "assuming" Most vehicle are based of a
different oscillator (use different baud rates) , so it would need to compensate or Not work like the RS232 limitations.

Just noticed your in Scotland. Enjoyed my visit there years ago.
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Re: Extracting the Signal

Postby pebe » Mon Apr 04, 2016 6:37 pm

Reading the data with that Data Logger could be done.

People refer to the serial port on a PC as RS232, which needs the data line to go +5V above and –5V below ground in order to function. But I’ve seen many circuits (including my own) where the input to the port is 0V to +5V and they work OK. So I think the port is an RS423 – not RS232. You also won’t need the Txdata line to read a signal. But the CCD gives only a 20mV min differential on balanced lines between a ‘1’ and a ‘0’ so an amplifier would be needed to get that to 5V.

I think the problem is what to do with the data when you have captured it. Data is going both ways along the bus – from controller to each sensor and back again. To make sense, everything connected to the bus must have an address so it knows when the controller is talking to it, and to identify itself when it replies.
As an analogy, imagine being at the side of the highway looking at all the vehicles going by at high speed. They all look much the same, but it’s easy to pick out Bob’s van when it is painted white with ‘Bob’s Bread’ in bold red letters on the side.

To interpret the data, you would need to find out the protocol used by Chrysler. Certainly, the recipient’s address must be in the message. If the sensor is only measuring fuel level, then the address is all that is needed. But before it can supply the information some other device may have used the bus, so when replying the sensor may have to identify itself to the controller. So a single address byte from the controller may receive three bytes in reply, ie. controller’s address, sensor’s address, and a byte of data giving one of 256 levels.

If you can identify the protocol and know the various addresses, then a microcontroller programmed to read the address of every message would be the way to go. Once it intercepted a message with the right address, it could then read the rest of the message.

Regarding the ‘scope. Every ‘scope has an adjustable horizontal timebase, ie. the time it takes the spot (the trace) to traverse the screen from left to right. All of them also have the ability to set the timebase to free-run, or to be initiated by the appearance of data at the ‘scope’s input.

So in practice you would set up the timebase for a period of, say, 4bytes and set time base to ‘trigger’. That would show you the waveform of ‘1’s and ‘0’s, but it won’t read the address for you.

I hope that may have helped.

BTW, I'm pleased you liked Scotland. Where are you from?
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Extracting the Signal

Postby dw85745 » Mon Apr 04, 2016 6:55 pm

pebe: Thanks again for your input on my behalf.
Will take me a bit to digest your comments, but will post back as I climb the learning curve.
In my case have enough knowledge to be dangerous. :D

Posting from Tucson, Arizona, USA.
However mothers parents (deceased) from Scotland (Lindsay).
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Re: Extracting the Signal

Postby dw85745 » Tue Apr 05, 2016 12:03 pm

Just wanted to post this link (for OBD-II) which may give some insight to "OBD_I" since it preceeded OBD_II.

https://en.wikipedia.org/wiki/OBD-II_PIDs
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Re: Extracting the Signal

Postby pebe » Tue Apr 05, 2016 2:23 pm

That’s very interesting. They refer to peripheral sensors’ addresses as ‘PID’s, and the one for the fuel gauge is included.

More interesting was the ‘see also’ note at the bottom of the page pointing to the ELM327 diagnostic units available

https://en.wikipedia.org/wiki/ELM327

That led me the site describing Elm’s diagnostic offerings

http://www.elmelectronics.com/obdic.html#ELM327

and finally to Ebay. This may be the very unit you are looking for – with an output to Bluetooth.

http://www.ebay.co.uk/itm/ELM327-OBD2-I ... Swv9hW43h~

or, even better, this one:

http://www.ebay.co.uk/itm/ELM327-OBD2-C ... Swxp9W-5Px

If not, there are plenty of similar units on ebay if you just search for ELM327

I hope that helps.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Extracting the Signal

Postby dw85745 » Wed Apr 06, 2016 9:05 pm

pebe:

Thanks for your efforts on my behalf.
Had already talked with ELM prior to posting in the forum on this subject.
Per ELM their chips support ODB-II only.
Posted ODB-II link to get an idea of what Chrylser might have done in implementing ODB-I.

Using OBD-II RPM as an example -- and my understanding / logic (???) of what' may be going on --:
It appears two bytes (A and B) on the bus represent the RPM value.
The values of those two bytes then appear to be used in a formula to arrive at the actual RPM value.
So making the "assumption" the ODB-II has a CCD bus, and that CCD bus is sending down two bytes to the correct module (here the instrument cluster), the chip of the instrument cluster appears to be the chip extracting those two bytes (RPM) and then doing something with those two bytes. My guess is the chip on the instrument cluster also has the RPM formula embedded within the chip and then uses that formula to output some voltage in order to control the instrument (RPM gauge value in this case).

If my interpretation is correct, then this might be simplier than I initially thought,
since all I'm after at this point is the RPM value.
So in my vehicle situation I have:
1) An ODB-I bus
2) A chip on the instrument cluster (since I have a speedometer)
3) No tach, but shop manual shows a place for a tach even though visually looking at the cluster there is no place for a tach.
(most likely covered over)
4) So the question arises as to whether any tach is scaled to the same voltages Chryler is using for their tach or whether each tach is different. One might argue get a Chryler tach or instrument cluster and extract the tach. So far haven't found one.
5) Going this way would eliminate a tremendous amount of effort trying to decipher the bus, addresses, etc.
Based on the OBD-II specs it looks like a monumental task for one person.

-=======================
One other thought I had previously but was unsure of:
I have an old Penske tach designed for a signal coil used with a distributor.
Since this is a distributorless (waste spark) system there is nothing to connect to.
I thought of making an inductor by wrapping some wire around one of the spark plug wires (say four to six wraps).
However, I am hesitant (don't want to ruin my old tach), as the voltage on these waste spark system are somewhere between
40,000 and 60,000 volts (current unknown).

Any idea whether a wire wrap will work as a inductor and -- if -- it will pick up the field through spark plug insulation?
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Re: Extracting the Signal

Postby pebe » Fri Apr 08, 2016 4:56 am

I know this is for a Nissan, but is the change between OBD_1 and 2 merely a change of socket?

http://www.ebay.co.uk/itm/14-Pin-OBD1-t ... SweW5VYaur

Re. the spark plug lead pickup. A couple turns of wire round the lead will give you a capacitive pickup suitable for your purpose.

Connect the wire to your tach input via a 470k resistor. Connect two Schottky diodes to the input: one to the tach's +ve supply rail and one to its -ve rail with polarities so they are normally reverse biased. This will limit the swing at the input so that it does not go outside the rails by more than 0.6V. The tach should be able to easily handle that without damage.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Extracting the Signal

Postby dw85745 » Sun Apr 10, 2016 1:21 am

From what I'm able to determine, each manufacturer had their own connector for ODB-I.
With Chryler I believe it was even vehicle line dependent. Mine is "L" shaped.
Chryler provided a KEY-ON/OFF sequence which will flash dash lights and give you "some" codes.
Here we have a company called Oreilly Auto Parts that does free scans. They had a Bosch scanner
(not interactive just reader which would do ODB-I, but NOT my vehicle. Cable was special order from Bosch.

======================
Thanks for the info on the spark plug lead pickup. Will give it a shot.

Have a nice weekend.
David
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Re: Extracting the Signal

Postby dw85745 » Sun Apr 10, 2016 3:30 pm

Just wanted to confirm I understand your proposed circuit;
So doing a drawing here in text.

wire wrap (single lead) -- 470K -- Schottky (--->|) -- (+) METER (-) -- Schottky (|<---) -- Battery Negative
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Re: Extracting the Signal

Postby pebe » Mon Apr 11, 2016 2:57 pm

Here is the circuit. It assumes the tach input has a high impedance to ground. If not, add a 1M resistor between LH side of R1 and 0V. You may also need to reduce R1 depending on the capacitive pickup, Try the 470k first. If necessary reduce R1 gradually down to 10k min.
Attachments
HT Takeoff.GIF
HT Takeoff.GIF (2.31 KiB) Viewed 35648 times
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Extracting the Signal

Postby dw85745 » Mon Apr 11, 2016 5:28 pm

The old Penske meter (dwell / tach) I'm planning on using has just two leads.
One (+) goes to the old style distributor coil and the other (-) to vehicle chassis ground.
Just like DVM leads you only have two.
dw85745
 
Posts: 28
Joined: Sat Apr 02, 2016 10:57 pm

Next

Return to Electronics newbies



Who is online

Users browsing this forum: No registered users and 4 guests

Siemens Amiga 172 Pocket Hearing Aid for Both Ear (White and Blue)
$64.99
Siemens Amiga 172 Pocket Hearing Aid for Both Ear (White and Blue) pictureSiemens Amiga 172 Pocket Hearing Aid for Both Ear (White and Blue)
$64.99
Siemens Amiga 172 Pocket Hearing Aid for Both Ear (White and Blue) pictureSiemens Amiga 172 Pocket Hearing Aid for Both Ear (White and Blue)
$121.99
Siemens Amiga 172 Pocket Hearing Aid for Both Ear (White and Blue) pictureSiemens Amiga Attractive Looks 178 Ao Pp Pocket Model Hearing Aids 1piece.
$157.0
Siemens Amiga Attractive Looks 178 Ao Pp Pocket Model Hearing Aids 1piece. picture


cron