CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Getting info from oil level sensor

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Salupa



Joined: 17 Feb 2015
Posts: 2

View user's profile Send private message

Getting info from oil level sensor
PostPosted: Tue Feb 17, 2015 4:34 pm     Reply with quote

Hello

Any ideas what would be the best way to get oil temp info from oil level sensor?

Explanation of the sensor output starts at page13: http://www.hella.com/MicroSite/soe/pl/sites/default/files/downloads/J00137_Oelniveausensoren_GB_TT_korr1.pdf

1ms accuracy would be fine.
temtronic



Joined: 01 Jul 2010
Posts: 9240
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Feb 17, 2015 5:03 pm     Reply with quote

From a quick look at the pdf..

#1.The easy way is to code a PIC to 'emulate' the data stream for test purposes. Dead simple using output_high(),delay_ms() and output_low() as needed to 'build' the data stream. I'd have a 'level value' variable to simulate low, med ,full values to be sure your PIC reads and computes the correct values. Use an oscilloscope to confirm the data stream matches the pdf info !!

#2. You need to 'sync' on the 10ms high followed by the 920ms low, once you've got that wait for 110ms(to get rid of the temp rdg), then get rising edge and trailing edge of the 'level' rdg. Maybe have a 1ms ISR ( say the RTCC ?) and count # of times 'level' was high.Then 'do the math' as in the PDF.

The key to this is to have a KNOWN signal source ( #1 ) that you can control, then breakdown the 'signal decoding' with the 2nd PIC.

Be sure to use a real xtal and not the internal RC osc as timing is critical for this application.

edit ! oops has another look at the pdf... and need to modify my idea...

the data stream really consists of t1..t2..t3..t1..t2..t3..t1.... so you need to 'sync' on the T3 high and low portions of the data stream not the beginning 10ms, 920ms signals.

kinda jumped the gun...

Jay
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 17, 2015 8:55 pm     Reply with quote

Threads on measuring the pulse width:

Using the CCP1 module:
http://www.ccsinfo.com/forum/viewtopic.php?t=31470
http://www.ccsinfo.com/forum/viewtopic.php?t=45616

Using software counting loops:
http://www.ccsinfo.com/forum/viewtopic.php?t=42353
Salupa



Joined: 17 Feb 2015
Posts: 2

View user's profile Send private message

PostPosted: Thu Feb 19, 2015 7:19 am     Reply with quote

Thanks, you gave me ideas. I'm trying to read the info with CCP capture. I'll let you know.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group