Shop OBEX P1 Docs P2 Docs Learn Events
Newbie: Good old Car Computer/Data Logger — Parallax Forums

Newbie: Good old Car Computer/Data Logger

ArchiverArchiver Posts: 46,084
edited 2003-05-10 04:12 in General Discussion
Hi all,

Having been in and out of electronics all my life I find myself drawn back into
the fold thanks to these great little Basic Stamp things!

I'm trying to build a car computer/data logger type project using mainly ECU
inputs. Output will be a few leds as shift lights, some 7seg for large bright
rev display and a 2x20 serial LCD for the other display.

I have found on my travels of the world wide web many sites on the robots side
but very few, infact none, that discuss in any detail a car computer/data logger
project.

I've worked out all the output side of things and got what I consider some
nicely formatted leds and lcd for the display, it's just the inputs...

The first issue is revs... the PULSIN command and the 16 bit math causes the
issue that to get the right numbers you end up with 160 rpm resolution... I was
hopiong for 100 rpm resolution. Using COUNT and a 150ms time setting, I get the
100 rpm resolution but only 8Hz sampling rate!!! Surely there is a way of
getting a 50 Hz sampling rate with 100 rpm accuracy on a 4MHz Basic Stamp???

If anyone has any info on building a car computer, specfically working out the
gear based on the ratio of revs to road speed, please drop me a line... I plan
to do a very detailed website (my car website has over 1300+ build photos) so I
can share the knowledge back to the Internet.

As I say I am looking to do a data logger of the back of this using the
readings, hopefuly at 50Hz sampling rate for about 8 inputs...


Cheers for your help all,

Kev/.

P.S. If you're interested here's the car: www.kevp.com/rush



[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-05-08 03:51
    Kev:

    I wouldn't know where to start to answer your questions, yet, though I have
    some ideas. I am going to be in England (Exhall, Coventry) from 21 May to 2
    June, on holiday. Is there a way we could get together to talk about what
    you are trying to do? Maybe I could help you from there, since I understand
    electronics well, also, having spend 30 years of my life in it
    professionally. Also, there is a "Forrest Mims Engineer's Notebook" that
    Radio Shack sells here in the US. If you can get your hands on it, it may be
    a help. I have an old one (pre-Basic Stamp) that deals with what you are
    trying to accomplish, but it uses almost entirely discrete components, since
    it was published over 20 years ago. I believe I saw mention of an updated
    version that would almost certainly deal with the Stamp. If you can get
    ahold of their catalog, or even go to a local store (do they have Rat
    Shack's in the UK?) I think you might find a wealth of help in it.

    If you want to e-mail me offline in order to provide a means of getting
    together, assuming you are close enough to the location to make it work,
    maybe we can sit down over a cup (of coffee, on me, since I STILL haven't
    gotten used to tea the way Brits drink it <g>) and discuss it.

    Mike
    Original Message
    From: Kev Pearce (kevp.com) <email.me@k...>
    To: <basicstamps@yahoogroups.com>
    Sent: Wednesday, May 07, 2003 10:00 AM
    Subject: [noparse][[/noparse]basicstamps] Newbie: Good old Car Computer/Data Logger


    > Hi all,
    >
    > Having been in and out of electronics all my life I find myself drawn back
    into the fold thanks to these great little Basic Stamp things!
    >
    > I'm trying to build a car computer/data logger type project using mainly
    ECU inputs. Output will be a few leds as shift lights, some 7seg for large
    bright rev display and a 2x20 serial LCD for the other display.
    >
    > I have found on my travels of the world wide web many sites on the robots
    side but very few, infact none, that discuss in any detail a car
    computer/data logger project.
    >
    > I've worked out all the output side of things and got what I consider some
    nicely formatted leds and lcd for the display, it's just the inputs...
    >
    > The first issue is revs... the PULSIN command and the 16 bit math causes
    the issue that to get the right numbers you end up with 160 rpm
    resolution... I was hopiong for 100 rpm resolution. Using COUNT and a 150ms
    time setting, I get the 100 rpm resolution but only 8Hz sampling rate!!!
    Surely there is a way of getting a 50 Hz sampling rate with 100 rpm accuracy
    on a 4MHz Basic Stamp???
    >
    > If anyone has any info on building a car computer, specfically working out
    the gear based on the ratio of revs to road speed, please drop me a line...
    I plan to do a very detailed website (my car website has over 1300+ build
    photos) so I can share the knowledge back to the Internet.
    >
    > As I say I am looking to do a data logger of the back of this using the
    readings, hopefuly at 50Hz sampling rate for about 8 inputs...
    >
    >
    > Cheers for your help all,
    >
    > Kev/.
    >
    > P.S. If you're interested here's the car: www.kevp.com/rush
    >
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-08 03:52
    BTW Kev.

    I don't know if I said it, but I am certainly impressed with your car. How
    long have you been at it?

    Mike
    Original Message
    From: Kev Pearce (kevp.com) <email.me@k...>
    To: <basicstamps@yahoogroups.com>
    Sent: Wednesday, May 07, 2003 10:00 AM
    Subject: [noparse][[/noparse]basicstamps] Newbie: Good old Car Computer/Data Logger


    > Hi all,
    >
    > Having been in and out of electronics all my life I find myself drawn back
    into the fold thanks to these great little Basic Stamp things!
    >
    > I'm trying to build a car computer/data logger type project using mainly
    ECU inputs. Output will be a few leds as shift lights, some 7seg for large
    bright rev display and a 2x20 serial LCD for the other display.
    >
    > I have found on my travels of the world wide web many sites on the robots
    side but very few, infact none, that discuss in any detail a car
    computer/data logger project.
    >
    > I've worked out all the output side of things and got what I consider some
    nicely formatted leds and lcd for the display, it's just the inputs...
    >
    > The first issue is revs... the PULSIN command and the 16 bit math causes
    the issue that to get the right numbers you end up with 160 rpm
    resolution... I was hopiong for 100 rpm resolution. Using COUNT and a 150ms
    time setting, I get the 100 rpm resolution but only 8Hz sampling rate!!!
    Surely there is a way of getting a 50 Hz sampling rate with 100 rpm accuracy
    on a 4MHz Basic Stamp???
    >
    > If anyone has any info on building a car computer, specfically working out
    the gear based on the ratio of revs to road speed, please drop me a line...
    I plan to do a very detailed website (my car website has over 1300+ build
    photos) so I can share the knowledge back to the Internet.
    >
    > As I say I am looking to do a data logger of the back of this using the
    readings, hopefuly at 50Hz sampling rate for about 8 inputs...
    >
    >
    > Cheers for your help all,
    >
    > Kev/.
    >
    > P.S. If you're interested here's the car: www.kevp.com/rush
    >
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-08 16:23
    Hi Mike,

    Thanks for the offer, its a bit far north for me but as I travel a lot with
    work I'll see if I can find any jobs up that way!

    I've not heard of the Forrest Mims books but Amazon.co.uk do sell them. I
    get a copy and see.

    I've done a bit more research and discovered the PAK-7 on the
    www.al-williams.com website.
    I've ordered a couple and I'm hoping these will solve my rev and speed input
    issues.

    I've also found the MAX186, an 8 channel A2D... does anyone use this or have
    a BS2 code snippet?

    I'm probably getting carried away for my first stamp project but I've also
    seen some neat other addons like the ultrasonic measuring SRF04 and the
    compass module!

    I thought that a SRF04 on each corner of the car could measure the ride
    height when the car is stationary... I'm guessing it can't range fast enough
    to measure changes if the car was moving?


    Cheers for your help all

    Kev/.
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-09 02:27
    Kev:

    I'm pretty sure it wouldn't be able to follow the body as it jounces over
    bumps, potholes, what have you. But it might be interesting to look at what
    kind of squat, lean, dive, etc., you get in various hard lateral
    acceleration/deceleration modes. And that knowledge might even help you to
    tune the suspension for a better ride (whatever specification you might
    apply as "better").

    Mike

    Original Message
    From: Kev Pearce (kevp.com) <email.me@k...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, May 08, 2003 11:23 AM
    Subject: Re: [noparse][[/noparse]basicstamps] Newbie: Good old Car Computer/Data Logger


    > Hi Mike,
    >
    > Thanks for the offer, its a bit far north for me but as I travel a lot
    with
    > work I'll see if I can find any jobs up that way!
    >
    > I've not heard of the Forrest Mims books but Amazon.co.uk do sell them. I
    > get a copy and see.
    >
    > I've done a bit more research and discovered the PAK-7 on the
    > www.al-williams.com website.
    > I've ordered a couple and I'm hoping these will solve my rev and speed
    input
    > issues.
    >
    > I've also found the MAX186, an 8 channel A2D... does anyone use this or
    have
    > a BS2 code snippet?
    >
    > I'm probably getting carried away for my first stamp project but I've also
    > seen some neat other addons like the ultrasonic measuring SRF04 and the
    > compass module!
    >
    > I thought that a SRF04 on each corner of the car could measure the ride
    > height when the car is stationary... I'm guessing it can't range fast
    enough
    > to measure changes if the car was moving?
    >
    >
    > Cheers for your help all
    >
    > Kev/.
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-09 10:49
    > I'm pretty sure it wouldn't be able to follow the body as it jounces over
    > bumps, potholes, what have you. But it might be interesting to look at
    what
    > kind of squat, lean, dive, etc., you get in various hard lateral
    > acceleration/deceleration modes.

    I was hoping to get info on dive during braking, as such a light car can
    suffer from too little rear braking.
    Cornering lean would also be good, but I'm worried that the SRF04 won't
    range quick enough or the general bumpyness of the road will put too much
    noise on the readings...

    > bumps, potholes, what have you.
    Are you saying are roads are bad!!! I agree, I was even thinking of a SRF04
    to warn me if the oncoming speed bump is going to rip the sump off!!!

    I've got a few new bits on order so I'll have a play and see what I come up
    with.


    Cheers

    Kev/.
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-09 13:30
    In a message dated 5/9/2003 2:58:34 AM Pacific Daylight Time,
    email.me@k... writes:

    > I was hoping to get info on dive during braking, as such a light car can
    > suffer from too little rear braking.
    > Cornering lean would also be good, but I'm worried that the SRF04 won't
    > range quick enough or the general bumpyness of the road will put too much
    > noise on the readings...
    >
    > >bumps, potholes, what have you.
    > Are you saying are roads are bad!!! I agree, I was even thinking of a SRF04
    > to warn me if the oncoming speed bump is going to rip the sump off!!!
    >
    > I've got a few new bits on order so I'll have a play and see what I come up
    > with.
    >

    A three axis accelerometer and a faster chip like the BS2SX might do the
    trick. The SX (not BS2SX) is lightning fast compared to the Stamp, much
    cheaper and much more difficult to program than the BS2.....


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-10 04:12
    Kev:

    If you are interested in things like dive during braking, or squat during
    acceleration, lean during cornering, etc., it probably isn't necessary to
    see a data curve showing momentary readings as much as to see what kind of
    peaks you may have had at extreme moments. After all, if the worst reading
    doesn't exceed maximum allowable values, no lesser reading will be a danger,
    either. And we ALL have bad roads. I mean, if you believe the press (oh,
    PLEASE!!), Northern Virginia, in the US, where I live, has one of the
    wealthiest roads programs in America. And I dodge one particular, and
    growing, pothole daily as I drive down that particular main road. Anyway, I
    digress. If, as I say, you only need peaks, even if you need several of
    them, a Sample and Hold circuit, with a periodic read routine, would work,
    because then the data that is logged would only be the peaks, which are all
    you need. And if you wanted those even as fast as one every second, I don't
    think that would be beyond the bs2's capabilities. Of course, putting the
    Sample and Hold in circuitry is not as much fun, nor maybe as elegant, as
    putting it in software, but on the other hand, an peak that passed quickly,
    and many, undoubtedly, would happen so quick it would be sheer coincidence
    if you even read them, would NEVER show up in your data if the S&H was in
    software. After all, if the peak doesn't happen IN your sample window, you
    don't have a peak. Sort of like the tree in the forest. You might even feel
    the thump at home when it falls, but you still can't prove it made a sound
    if you didn't sample for the sound as it occurred.

    Mike

    Original Message
    From: Kev Pearce (kevp.com) <email.me@k...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, May 09, 2003 5:49 AM
    Subject: Re: [noparse][[/noparse]basicstamps] Newbie: Good old Car Computer/Data Logger


    > > I'm pretty sure it wouldn't be able to follow the body as it jounces
    over
    > > bumps, potholes, what have you. But it might be interesting to look at
    > what
    > > kind of squat, lean, dive, etc., you get in various hard lateral
    > > acceleration/deceleration modes.
    >
    > I was hoping to get info on dive during braking, as such a light car can
    > suffer from too little rear braking.
    > Cornering lean would also be good, but I'm worried that the SRF04 won't
    > range quick enough or the general bumpyness of the road will put too much
    > noise on the readings...
    >
    > > bumps, potholes, what have you.
    > Are you saying are roads are bad!!! I agree, I was even thinking of a
    SRF04
    > to warn me if the oncoming speed bump is going to rip the sump off!!!
    >
    > I've got a few new bits on order so I'll have a play and see what I come
    up
    > with.
    >
    >
    > Cheers
    >
    > Kev/.
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
Sign In or Register to comment.