Nerd project: upgrade 505 clock
  • Register
  • Help
Results 1 to 9 of 9
Like Tree5Likes
  • 4 Post By robs
  • 1 Post By robs

Thread: Nerd project: upgrade 505 clock

  1. #1
    Fellow Frogger!
    Join Date
    Nov 2010
    Location
    Blue Mountains, NSW
    Posts
    419

    Default Nerd project: upgrade 505 clock

    The LCD clock in my S1 505 GTI had suffered a few insults over the years and the top half of the display no longer worked. This made for fun games of guess the time, but I never really got the knack. Looking at the phone while driving is a no-no, so a replacement clock was in order.

    Simplest would have been to get one from a wreck, but who wants to be simple? Next easiest would have been to adapt a cheap digital clock off eBay. There were lots of these, but none grabbed me. Since I have taken up electronics as a hobby in recent years, it didn't seem too much of a stretch to build a custom clock to fit in the same plastic housing.

    From China:
    A tiny 32x128 pixel OLED display
    A cheap real time clock module

    Advertisement


    Combined with one of my usual TI MSP430 microcontrollers to conduct the show.

    Using the modules made the hardware side trivial -- hardest part was mounting it inside the clock's plastic housing.

    On the other hand, the software side was much harder than I had expected. This was partly down to this being my first project with I2C protocol, but it was mostly because of the dreaded scope creep.

    To begin with, I wanted a clock that would display when the accessories were powered (since the accessories wire already came to the original clock). Then I thought it'd be nice to have the clock display the elapsed time for a couple of minutes after you switch off. Then the fact that the RTC module includes a 4k EEPROM seemed to be begging to have drive date/time/duration written to it for each drive. That way I could keep track of engine-running time and move to oil changes every 100 hours.

    Well, it's all working and I'm quite pleased with it. Not sure I'll really move to oil changes by engine hours, but I do like the elapsed time display when I switch off. Incidentally, it resumes counting elapsed time if it has been off for less than 15 minutes, so a stop for petrol doesn't mess up the duration calculation too much.

    The clock runs off the car battery, but I have a lithium cell in there which keeps the time if I disconnect the car battery.

    Here's a picture of the clock showing the time:

    clock.jpg

    The horizontal line is probably something to do with screen refresh picked up by the camera. It all looks fine to the human eye. You can see the "audio" socket in the photo above. It lets me plug in the laptop to adjust the time, download and/or clear the driving history (there is room in the EEPROM for ~600 drives). And I should have mentioned that I brought one more wire to the new clock -- dashlight. This tells it to go into dim mode for night driving.

    My image of the clock showing elapsed time is too big for the forum apparently -- your imagination's probably up to the task.

    I post this partly to be smug, and partly to prove that not only do geeks walk amongst us, some of them drive.

    All the same, if anyone wants to have a go at this, I'm happy to share schematics, source code (MSP430 assembly language) and war stories. Not limited to 505s either.

    Have fun,

    Rob.
    Last edited by robs; 16th April 2019 at 05:49 PM.
    FIVEDOOR, dimistyle, con and 1 others like this.

  2. #2
    1000+ Posts Peter Chisholm's Avatar
    Join Date
    Aug 2004
    Location
    SWOTR
    Posts
    3,430

    Default

    That's a very good result. Congrats!

  3. #3
    Member sheusz2000's Avatar
    Join Date
    Mar 2011
    Location
    Newcastle
    Posts
    119

    Default

    Nice work. Very much enjoyed the "since I'm here" outlook driving the project.
    ---------------------------------
    307 - 2003 XSE 2L Petrol Manual
    3008 - 2018 Allure 1.6L Petrol Automatic

  4. #4
    1000+ Posts
    Join Date
    Mar 2004
    Location
    Brisbane
    Posts
    1,641

    Default

    Excellent stuff, now multiplex it to show oil temp and pressure please?

    Buttons are there and have a read of finite state machines.

    Going to do this in my 205gti.
    87 S1 205 GTI / GTI6 powered a project underway
    306 convertible (gti6 candidate)
    307 HDi wagon
    407 HDi wagon

  5. #5
    Fellow Frogger!
    Join Date
    Nov 2010
    Location
    Blue Mountains, NSW
    Posts
    419

    Default

    Thanks Peter, glad you like the look of it.

    Sheusz2000, "since I'm here" is a pretty good way to describe my general attitude. Have to head this way, might as well choose an interesting path.

    Matthew, you probably haven't seen that I built a mini dashboard hooked to my Megasquirt ECU. Admittedly, I don't have oil pressure/temp, but it would be possible to hook sensors up to two of the Megasquirt's free A2D ports and have these values monitored and alarmed on the live display.

    Some time after posting here about the mini-dash, I built a few with proper circuit boards and sold them to other Megasquirt users. Very much a niche market, but nice to know that my software is running in a handful of cars around the world.

    On the state machine thing, the clock's software is entirely interrupt driven, and the MCU already has several state machines so it knows what to do when it wakes up.

    I should have mentioned one other thing in my original article: current draw. My old clock was drawing a steady 7mA; seemed a lot. Perhaps this was because of the broken segments, but maybe that was just the state of the art in the early '80s. The new clock typcially draws 8mA when the clock is active (more or less depending on the number of pixels lit and whether the intensity is bright or dim), but only draws 0.2mA when the display is off (about 0.1mA each for the voltage regulator and keeping the RTC module ticking over).

    Have fun,

    Rob.
    Kenfuego likes this.

  6. #6
    Member sheusz2000's Avatar
    Join Date
    Mar 2011
    Location
    Newcastle
    Posts
    119

    Default

    Any chance you could do something about the dodgy software in the 3008 infotainment system?
    ---------------------------------
    307 - 2003 XSE 2L Petrol Manual
    3008 - 2018 Allure 1.6L Petrol Automatic

  7. #7
    1000+ Posts
    Join Date
    Mar 2004
    Location
    Brisbane
    Posts
    1,641

    Default

    Excellent and very cool indeed, just as it should be, in regards the stereo read here for starters and ideas

    https://www.instructables.com/id/How...Using-CAN-Bus/
    87 S1 205 GTI / GTI6 powered a project underway
    306 convertible (gti6 candidate)
    307 HDi wagon
    407 HDi wagon

  8. #8
    Fellow Frogger!
    Join Date
    Nov 2010
    Location
    Blue Mountains, NSW
    Posts
    419

    Default

    Quote Originally Posted by sheusz2000 View Post
    Any chance you could do something about the dodgy software in the 3008 infotainment system?
    I could try out my rarely used Yoda persona and suggest "For you, not for me, interesting path that might be to follow". but I doubt you'd find that very helpful, so I'd better not.

    Have fun,

    Rob.

  9. #9
    1000+ Posts
    Join Date
    Mar 2004
    Location
    Brisbane
    Posts
    1,641

    Default

    I think their software has gone down the tube in recent models, the 307 which is VAN is solid, screen etc works correctly. The 407 which is CAN bus is giving all sorts of funny things after enableing the bluetooth function with no module connected. The error management is next to nothing and other software articfacts cause one half of cruise to not work, stereo to start with RDS enabled all the time etc etc. You will need the patience of a saint and all of the Force Yoda can summon.
    87 S1 205 GTI / GTI6 powered a project underway
    306 convertible (gti6 candidate)
    307 HDi wagon
    407 HDi wagon

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •