Shop OBEX P1 Docs P2 Docs Learn Events
Design Problem - Automotive Digital Dash — Parallax Forums

Design Problem - Automotive Digital Dash

Lee_SpeakmanLee_Speakman Posts: 32
edited 2006-03-30 19:25 in BASIC Stamp
Hi, ive recently embarked on my first BS2 project and its going quite well!
Its a Digital dash system for cars, it displays engine RPM/SPEED/FUEL/WATER TEMP etc...

Part of my design is to have a built in rev limiter that will limit the engine RPMS.
Im measuring RPM's and road Speed together·using the pulsin command and a bit of Math for both

My problem is, when the car is stationary, the engine is only going to be monitoring the engine RPM every 0.65 seconds or so (as the pulsin command waits 0.65 seconds)

I fear that this delay could cause the engine to go bang, as its not quick enough to catch the engine and slow it down.

Is there any fixes to this? Such as using a seperate (And alot less expensive) chip to continously measure wheel speed and report it back to the stamp?

Here is a small snippet of example code to illustrate my problem

start

PULSIN 9, 1, RPM························
RPM=RPM/100
RPM=60000/RPM

IF (RPM=>6000) THEN Limiter··········· 'Goto engine limiter subroutine

DEBUG RPM

PULSIN 8, 1, SPEED
SPEED=SPEED/100
SPEED=60000/SPEED
SPEED=CIRC*SPEED
SPEED=SPEED/1054

DEBUG SPEED

GOTO start

Thanks alot Lee

·

Comments

  • Lee_SpeakmanLee_Speakman Posts: 32
    edited 2006-02-20 17:24
    Actually Have I just got something wrong and the BS2 only waits for a max of 131mS? If so thats alot better! But is there still anything else I can do
  • BeanBean Posts: 8,129
    edited 2006-02-20 17:24
    Lee,
    What you do mean "pulsin wait 0.65 seconds" ? Pulsin will measure the pulse and that's it. This should work in your favor because at higher RPMs the pulses should be shorter and get measured quicker.

    Now pulsin WOULD have to timeout on the speed measurement, but as your code is written, if the code jumps to the limiter BEFORE measuring speed.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • Lee_SpeakmanLee_Speakman Posts: 32
    edited 2006-02-20 17:48
    Thanks for your reply Bean.

    I am under the impression that if there is no pulse on the input pin the BS1 will wait 0.65 seconds until it returns the value zero??

    Im scared that if the user is in neutral and starts to rev the engine and just before he comes to hit the limiter, it jumps to the speed measurment which if stationary it will wait an additional 0.65secs before it returns the value zero and continues to go back to the start of the loop and measure the RPM's, by this time I fear the pistons may of gone into orbit.

    As ive just noticed the BS2 only waits 131ms before returning a zero (I think) this makes the problem smaller, but its still not good practise if you get my drift.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-20 18:37
    Lee,

    ·· This is a bit of a nostalgia trip for me as some years ago I took a 1980 Pontiac Grand Prix and gutted it completely and rebuilt it.· The entire dash assembly looked like something off the show Knight Rider.· I attempted to integrate as much real functionality into the gauges and controls as possible and I had quite the masterpiece.

    ·· I'm not sure what you're doing on your Tach and Speedo but mine had a 3 digit speedo and 4 digit tach.· The least significant digit on the tach always read 0 and both gauges had an analog display using 2 LM3914s and frequency to voltage converters.· If I had to do it over I may have done things a bit differently on those gauges.· Most of the others also included bar graph with the digital readout.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Lee_SpeakmanLee_Speakman Posts: 32
    edited 2006-02-20 19:10
    Chris Funny you should mention that, Ive completely restored a 1974 Ford Escort Mk1 - I dont think you got them over the water.

    The digital dash is part uni project, but mainly its for me, as its going in my car when its done! So far ive got it doing RPM and SPEED, and a bargraph showing RPM (Thanks to your help earlier on.) Without too much trouble ill get it doing temperature and fuel as soon as my sensors arrive. My Dash layout can be found in the pictures attached (including a few pics of my car if your intrested too) cool.gif
    600 x 450 - 40K
    637 x 401 - 19K
    600 x 450 - 37K
    2048 x 1536 - 303K
    640 x 480 - 30K
  • TiboTibo Posts: 81
    edited 2006-02-20 19:15
    Hello,
    Nice work ! How to you measure the fuel quantity ? do you read the car's sensor ?
    ++
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-20 19:27
    Lee,

    ·· What displays are you using?· There should be a degree symbol in there that you can print after the water and oil temps.· That will make it a little easier to digest that information as it is condensed with other information, which, by the way was a clever scheme on your part.· It will be interesting to see how this progresses.

    ·· My digital dash was pre-Stamp days for me and not everything was wired into the Z80 that ran the show.· The only two LCD Displays in my dashboard were a 2X16 for the Odometer/Trip and a 4X20 for the status display/login console.· The login console was a neat idea that I came up with because I was engaged to a woman at the time who not only cound not understand what half the gauges in the car were for, but she was distracted by all the LEDs and things.

    ·· Two things helped me solve this issue.· First of all each gauge system could be blanked/dimmed.· This was important in the initial design.· The second thing is that to start the car you had to login with a password.· The password used would dictate how much access you had to certain things.· So what I did was when she logged into it only lit up the speedometer and the odometer and a few small idiot lights (And Fuel Gauge).· The rest of the dash wasn't seen by her.· When I logged in it lit up like a christmas tree!· =)·

    ·· The thing was I had gauges like Inside Temp, Outside Temp, Water Temp, Oil Temp, Trans Fluid Temp (Automatic), Manifold Pressure, Fuel Gauge, Ammeter, Volts, etc.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2006-02-20 20:18
    HI ·Lee_Speakman

    This is a very nice project that you have here

    ·Hi Chris

    The second thing is that to start the car you had to login with a password.· The password used would dictate how much access you had to certain things.· So what I did was when she logged into it only lit up the speedometer and the odometer and a few small idiot lights (And Fuel Gauge).· The rest of the dash wasn't seen by her.· When I logged in it lit up like a christmas tree!· =)·


    Now that is a nice touch
    ·
    Sam········································································································································································ jumpin.gif

    Post Edited (sam_sam_sam) : 2/20/2006 8:23:19 PM GMT
  • Lee_SpeakmanLee_Speakman Posts: 32
    edited 2006-02-20 20:22
    Tibot,

    I plan to use the cars sensor, Its Basically a Potentiometer with a arm and a float. I want to use a big smoothing capacitor to stop the output changing as the fuel sloshes about in the tank, I dont know if the BS2 has the POT command but im thinking of using that, or maybe even a small capacitor and resistor, and use a pulsin command, however i might have linearity troubles, due to parasitic resistances etc. I havent really thought about it to be honest, but I dont think it will be a big issue to resolve.

    Prior to this I have only used a BS1 once about 2 years ago in labs, so Im only just started and everything is a learning curve.

    Chris Im using a BPP-420L with BPK+ backpack from Seetron, its working great after I sent it back to my supplier and got an upgrade. Ive just flicked through the manual and found the degree sign, just tried it and it looks better now with a C on the end of it too [noparse]:D[/noparse]

    I did some Z80 DATS at college, programming and looking at the architecture, the programming is all a bit too low level for me. I like PBASIC as I think C++ is too complecated!

    The great thing about my project is you can change it between cars and different tyre combos, as you just enter your tyre info and the stamp does the rest, same for number of cylinders. It will also limit engine RPM's and Control a fan etc, im having a bit of trouble with the 16 bit math and decimal points, again something I will need to look into as the project progresses shouldnt be a problem [noparse]:D[/noparse]
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-20 20:44
    Lee,

    ·· As a note the BS2 does not have the POT command but it does have the RCTIME command instead.· Note there are some differences but both commands can be interchanged in many circuits to some degree.· Please see the help file for the specifics.

    Sam,

    ·· You should've seen valet mode.· Nothing lit up on the dash except the speedometer.· The LCD said something like, "Valet Mode Enabled, System Shutdown Pending..."· And as soon as the car was put into park it would shut down the engine, make sure the windows were up and as soon as the last door was closed it would arm the alarm system.· Most of this had verbal cues from an ISD chip.

    ·· When a door was first opened or the remote was used to unlock the car the dome light would come on and the LCD would light up waiting for user input.· The system was designed so that it wouldn't even accept input from the keypad until the driver seat-belt was connected.· That is how I detected a driver.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • NateNate Posts: 154
    edited 2006-02-20 23:54
    Chris, (or should I call you Knightrider? Kip? Was Kip the guy or the car?)

    Anyhow, I just wanted to know how you explained to the woman to whom you were engaged to at the time, why you got the full light show and she just got the speedometer?



    Nate
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-20 23:57
    It's Chris, and you're thinking of K.I.T.T. (Knight Industries Two Thousand).· Michael was the guy driving it and I didn't need to explain anything.· She couldn't handle all the lights and so I told her she wouldn't have to worry about them anymore.· =)· Problem solved.· Besides, that car was in a bad accident only a month and a half later, so it really wasn't an issue.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2006-02-21 01:31
    HI Chris

    ·Now the·Knight Rider.·was a COOL CAR i even want·to a car like that

    · It sounds like you had··a CAR like that with the·Dash and Safty items in it

    Was the·CAR FAST

    I Like This Part

    · You should've seen valet mode.· Nothing lit up on the dash except the speedometer.· The LCD said something like, "Valet Mode Enabled, System Shutdown Pending..."· And as soon as the car was put into park it would shut down the engine, make sure the windows were up and as soon as the last door was closed it would arm the alarm system.· Most of this had verbal cues from an ISD chip.

    ·· When a door was first opened or the remote was used to unlock the car the dome light would come on and the LCD would light up waiting for user input.· The system was designed so that it wouldn't even accept input from the keypad until the driver seat-belt was connected.· That is how I detected a driver.

    · .I am sorry to hear that it was in a bad accident

    ·Besides, that car was in a bad accident only a month and a half later, so it really wasn't an issue.

    Do you have any photo of it

    Sam

    ··························································· jumpin.gif
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-21 01:41
    I'm sure I do somewhere, but no pictures of the dashboard after it was finished.· That was back before I really remembered to take pictures of my projects and besides a buddy took a picture of it once and it didn't come out well at all.· Without the flash it was all screwed up and blotchy and with the flash it washed out the dash lights.· Plus in the back seat it was hard to get a wide view of the whole dash but any closer wasn't a wide enough angle.· Some day I am going to have another Project Car and I will one-up the last one.· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • HIBITDACHIBITDAC Posts: 40
    edited 2006-03-30 19:25
    If your car has a computer it might be easier (and faster refresh rate) to read the data stream that it is constantly putting out. GM uses 160 bytes/sec. And it sends the channel number then the value for that channel. I started to make my own also, but but got bored with it and other projects got in the way.
Sign In or Register to comment.