Volvo Community Forum. The Forums of the Volvo Owners Club

Forum Rules Volvo Owners Club About VOC Volvo Gallery Links Volvo History Volvo Press
Go Back   Volvo Owners Club Forum > "Technical Topics" > 200 Series General
Register Members Cars Help Calendar Extra Stuff

Notices

200 Series General Forum for the Volvo 240 and 260 cars

Information
  • VOC Members: There is no login facility using your VOC membership number or the details from page 3 of the club magazine. You need to register in the normal way
  • AOL Customers: Make sure you check the 'Remember me' check box otherwise the AOL system may log you out during the session. This is a known issue with AOL.
  • AOL, Yahoo and Plus.net users. Forum owners such as us are finding that AOL, Yahoo and Plus.net are blocking a lot of email generated from forums. This may mean your registration activation and other emails will not get to you, or they may appear in your spam mailbox

Thread Informations

Volvo 240 - Electronic Mileage Correction

Views : 2077

Replies : 7

Users Viewing This Thread :  

Reply
 
Thread Tools Display Modes
Old Oct 30th, 2022, 17:20   #1
TheHungriestBadger
Junior Member
 

Last Online: Feb 18th, 2024 23:05
Join Date: Jun 2022
Location: Ardleigh, Colchester
Post Volvo 240 - Electronic Mileage Correction

Hi all,

More of a novelty thing than being crucial to running, but I did find a method of correcting the odometer mileage electronically. This might be useful if your odometer gear has been broken for a while (like mine was for ~2k miles over summer).

I followed the instructions on Dave's Volvo Page for the odometer gear repair in my 1990 240 GL B200F Auto. I opted to (and recommend to) follow the "procedure with speedo needle in place" section - there is more than enough room to access everything.

Anyways, onto the mileage correction: some people suggest clicking the cogs forward by hand using a small screwdriver or similar instrument; however, I was afraid of snapping/stripping other cog teeth in the process of doing this. Instead, I opted to tap into the speed sensor signals (the one that resides on the rear axle) in order to clock the odometer forward electronically, thus removing any risk of damaging any of the other cogs.

To do this I tapped onto the speedo board in the places shown in the attached photo (I even used the correct wire colours as well - go me 😁). I opted to solder some wires onto the board and desolder them before refitting the speedo unit (less chance of slipping and shorting something) - although one could feasibly use some crocodile clips to achieve the same purpose. I then 'spoofed' the speed sensor signal using a square wave alternating between 0V and 5V. To create the square wave I used an Arduino, although other circuits are available for creating this using a 555 timer, an op-amp relaxation oscillator, or even a two-transistor astable multivibrator circuit. I can post schematics of all the above if people would like.

With regards to the frequency of the square wave, the maths appears to be as follows:

frequency = (K-number * speed(mph)) / 3600

The K-number is the one that's printed in the bottom centre of the speedometer - in my case on a non-ABS 1990 estate/wagon, it's K9800. I believe K10042 is for the saloon/sedan with slightly smaller tyres, and the ABS equivalents had K39200 and K40168 for the estate and saloon respectively).

The 3600 is derived from the number of seconds in one hour.

As a worked example (and with video evidence to prove it, if requested):

100Hz = (9800 * 36.7mph) / 3600s

Thus I'd recommend a frequency of approximately 300Hz - 350Hz to make decent progress clocking up mileage.

I will share the Arduino code in a zip file, along with schematics for all 4 aforementioned approaches in a separate post coming over the next day or two. For now, I will just attach the images showing the speedo connections.

Also note, two pins on one of the speedometer connectors need to be shorted in order for the speedometer + odometer to work at all. In my photo, the inner-most and centre positions need to be shorted. DO NOT touch the outer-most position - I think this may be to do with cruise control or something and will probably fry the unit if you connect it to anything.

Alternative Link:
https://drive.google.com/file/d/1sNk...ew?usp=sharing
Attached Images
File Type: jpg Speedo Connections.jpg (323.3 KB, 19 views)
__________________
1990 Volvo 240 GL Auto "Catalyser" (oOOoh, fancy). B200F, about as original as they come, and all in BLOO. ~140k

My electronics website/blog thing: https://unintegratedcircuit.wixsite....egratedcircuit

Last edited by TheHungriestBadger; Oct 30th, 2022 at 20:19. Reason: Added Google Drive permalink to attached image
TheHungriestBadger is offline   Reply With Quote
The Following 4 Users Say Thank You to TheHungriestBadger For This Useful Post:
Old Nov 11th, 2022, 02:47   #2
TheHungriestBadger
Junior Member
 

Last Online: Feb 18th, 2024 23:05
Join Date: Jun 2022
Location: Ardleigh, Colchester
Post Wiring Colour Update:

Slight update to the wiring colours:

For my vehicle - a 1990 Volvo 240, with electronic speedometer, without ABS, and with the large tachometer instead of the clock - there is a 3-pin white L-shaped connector (see attached image) that plugs into the back of the instrument cluster, near the middle IIRC. The connector is keyed, so no possibility of getting it the wrong way around. The pinout is as follows:

BLUE: Switched 12V from ignition
BLACK: Speed sensor signal -ve (connected to ground/battery negative I do believe)
GREEN/WHITE: Speed sensor signal +ve - this is the 5V square wave we are recreating in this thread

In my photos, you will see I've matched BLUE with blue, GREEN/WHITE with solid green, and BLACK with brown, as these were the best matches I had to hand. Obviously wire colour makes no difference electrically, but I felt it was worth clarifying.

From here on out, I will be referring to wire colours as per MY wiring colours, rather than the colours on the connector.

Alternative Link:
https://drive.google.com/file/d/1bQW...usp=share_link
Attached Images
File Type: jpg Speed Sender Connector.jpg (296.9 KB, 8 views)
__________________
1990 Volvo 240 GL Auto "Catalyser" (oOOoh, fancy). B200F, about as original as they come, and all in BLOO. ~140k

My electronics website/blog thing: https://unintegratedcircuit.wixsite....egratedcircuit
TheHungriestBadger is offline   Reply With Quote
Old Nov 11th, 2022, 15:38   #3
TheHungriestBadger
Junior Member
 

Last Online: Feb 18th, 2024 23:05
Join Date: Jun 2022
Location: Ardleigh, Colchester
Post Two-Transitor Multivibrator Schematic

Possibly the simplest circuit in terms of components required, this uses only two transistors in an astable multivibrator configuration. This circuit will not be terribly accurate with the frequency it produces due to component tolerances (1% - 5% on resistors, 20% or more on the capacitors, plus potential mismatch on transistor current gain). Fortunately, accuracy is not critical here.

Values were determined using a simulation program called LTSPICE - which is usually pretty accurate - and the values used here generated a 5V square wave with a frequency of 310Hz. Rearranging the formula derived in post #1, this should correlate to a speed of approximately 114mph.

The transistor choice is not critical, any generic NPN transistor will do, although the BC547 is the defacto standard in my region. American viewers will likely have the 2N2222 or the 2N3904, both of which are suitable replacements. Resistors can be either metal-film (1% tolerance) or carbon-film (5% tolerance) and can be of any power rating. Capacitors should be non-polarised, the most common type fitting the requirement are ceramic capacitors; any dielectric and voltage rating is suitable here. Finally, the regulator choice is also not critical, either a 7805 or 78L05 (L standing for Low power applications, compared to the standard part) will work just fine. You may be able to get away without using the capacitors C3 and C4; however, if the 5V output is not stable for whatever reason, the capacitors C3 and C4 should fix this issue.

Alternative Link:
https://drive.google.com/file/d/1GZ2...usp=share_link
Attached Images
File Type: jpg Multivibrator Schematic.JPG (307.3 KB, 11 views)
__________________
1990 Volvo 240 GL Auto "Catalyser" (oOOoh, fancy). B200F, about as original as they come, and all in BLOO. ~140k

My electronics website/blog thing: https://unintegratedcircuit.wixsite....egratedcircuit
TheHungriestBadger is offline   Reply With Quote
The Following User Says Thank You to TheHungriestBadger For This Useful Post:
Old Dec 30th, 2022, 04:54   #4
TheHungriestBadger
Junior Member
 

Last Online: Feb 18th, 2024 23:05
Join Date: Jun 2022
Location: Ardleigh, Colchester
Post 555 Timer-Based Schematic

Another possible implementation is to make a circuit based on the ubiquitous 555 timer chip. This is an adaptation of the standard 'astable' circuit, which produces an output wave that is more or less 50% 'high' and 50% 'low' - this is known as having a 50% duty cycle.

Again, the circuit was simulated in LTSPICE, and the circuit generated a ~5V square wave with a frequency of 295Hz. Again, expect this to change slightly due to the usual component tolerances. This equates to a speed of approximately 108mph for my K9800 speedo.

Some important notes on the schematic: first off, yes the diode is the 'correct' way round. It's a special type of diode called a Zener diode, which is designed to conduct in a controlled manner when placed in reverse. I'll spare you the electronics lecture for now (this information can always be Googled), but suffice to say, in this circuit, it acts to cap the voltage of the produced square wave. This can be substituted for any other Zener diode part number as long as it is a "5.1V" or "5V1" part - that's the important factor.

Secondly, yes the resistor values do need to be followed, unfortunately, as annoying as it is. Thirdly, you can probably get away with connecting pin 4 of the NE555 directly to pin 8 (positive supply), omitting resistor R3, but if things start to go wrong, this could be a cause. Finally, capacitors C2 and C3 can also probably be left out without consequence, but again, I try and do these circuits as properly as possible to prevent people having issues if they decide to reproduce it exactly.

Alternative Link:
https://drive.google.com/file/d/1Lla...usp=share_link
Attached Images
File Type: jpg 555 Schematic.JPG (337.3 KB, 6 views)
__________________
1990 Volvo 240 GL Auto "Catalyser" (oOOoh, fancy). B200F, about as original as they come, and all in BLOO. ~140k

My electronics website/blog thing: https://unintegratedcircuit.wixsite....egratedcircuit
TheHungriestBadger is offline   Reply With Quote
Old Dec 30th, 2022, 06:05   #5
TheHungriestBadger
Junior Member
 

Last Online: Feb 18th, 2024 23:05
Join Date: Jun 2022
Location: Ardleigh, Colchester
Post Using An Arduino

If you wish to take the exact same approach I did, then you will need the following:

- A computer of some description, if it's running Windows 10, fantastic. If it's running something else, this will probably still work, but I'm not going to give instructions for every single possible system (sorry).
- An Arduino Uno, it doesn't have to be an official one, a cheap knockoff from your online marketplace of choice will be fine.
- A suitable USB cable for the Arduino - some will come with a cable, some won't... It's pretty easy to figure out, basically just a case of do they look like they'll fit together.
- Some single-core hookup wire (approx 24AWG), similar to that shown in post #1. Single-core is important though, it'll be incredibly annoying trying to use stranded stuff.
- Basic soldering stuff - an iron and solder at minimum, flux is recommended.
- A 12V power supply (1A current capability is enough) with a 5.5mm outer and 2.1mm inner barrel jack.

And the methodology:

1) Go download and install the Arduino software.
2) Plug the Arduino into your computer using the USB cable.
3) Open the newly-installed Arduino software.
4) In the top left of the screen click: File > Examples > 01.Basics > Blink
5) Take a look down the left-hand side of the screen. Is there a column of sequential numbers in pale grey? If not then click File > Preferences and make sure that the Display line numbers box is ticked and click OK.
6) At the top of the screen click Tools > Port and then click the option that says "Arduino Uno" next to it - it'll probably look something like "COM4 (Arduino Uno)" IIRC.
7) On lines 34 and 36 you will see the text
Code:
delay(1000);
. This needs to be deleted and replaced with
Code:
delayMicroseconds(1500);
. Feel free to copy and paste that exact code from here, or type it out manually. Whichever you prefer.
8) In the top left of the screen, just underneath where you clicked File and Tools you should see a round blue button with an arrow pointing right (and if you hover over it, it should say "Upload" to the right of it. Click this.
9) The software will now 'build' your code, and program the Arduino, this will take a minute or so, but you should eventually see the text "Done Uploading" somewhere near the bottom of the screen once it's completed successfully. If you get any error messages, PM me and I can try and help (if and when I have time).
10) Unplug the USB cable from the Arduino, and the hard part is done now (relax). Cut and strip some wire as shown in the picture in post #1. They don't have to be huge, but don't be tight either, 6-12" is fine. Then solder these to the points on the speedo board as shown also in the picture in post #1.
11) Plug those wires into your Arduino: GREEN to pin 13, BROWN to any pin labelled "GND" and blue to the pin labelled "VIN". Refer to the picture attached if needed.
12) Double check everything... Seriously.
13) Plug in the 12V power supply to the power jack and be ready to unplug swiftly if the worst comes to.
14) If nothing happens, and nothing caught fire or went pop... Did you remember to short the two contacts on the side of the speedo board? Remove power before adjusting, adding, or removing any wires or picking up and moving the setup.

If everything worked as I think it should've done, you should have your speedo sitting well above 100mph. Congrats, now just leave it be and check back every now and then. Bear in mind that you can't roll it backwards you'll have to wait for it to go right around again.

Should you wish to run it at a slower speed, just increase the number inside the
Code:
delayMicroseconds()
brackets. A higher number = a lower speed. If you wish to decrease the speed halfway through, you can do, just remove the power, unplug the wires, plug in the USB (in that order) and go again from step 7.

I think it's also worth noting that the code itself can't really harm your speedo, but the physical connections can. As with all these solutions: just double-check your wiring first with a multimeter. Is there a short between positive and ground? Is there a short between positive and signal? Is there a short between signal and ground? Give the speedo board a quick once over, are there any splashes of solder? Are the wires soldered properly (give it a 'gentle but firm' tug test)? If you've opted for crocodile clips, are they secure, or are they likely to slip and short? Is there anyone else around who could move the setup (maybe add a "do not touch" notice). Patience and caution go a long way with this kind of electronics, these are (relatively) quick and dirty setups, and do not have the usual rigorous protection of typical automotive electronics.

Alternative Link:
https://drive.google.com/file/d/1iUx...usp=share_link
Attached Images
File Type: jpg Arduino Connections.jpg (369.3 KB, 7 views)
__________________
1990 Volvo 240 GL Auto "Catalyser" (oOOoh, fancy). B200F, about as original as they come, and all in BLOO. ~140k

My electronics website/blog thing: https://unintegratedcircuit.wixsite....egratedcircuit
TheHungriestBadger is offline   Reply With Quote
The Following User Says Thank You to TheHungriestBadger For This Useful Post:
Old Feb 6th, 2023, 10:09   #6
TheHungriestBadger
Junior Member
 

Last Online: Feb 18th, 2024 23:05
Join Date: Jun 2022
Location: Ardleigh, Colchester
Post Tutorial Video

Well guys (and gals), today is your lucky day: my junkyard odometer gear sheared its teeth early January and I've just got around to replacing it.

Between my all my rambling, it managed to stretch the video to 30 minutes so get a cup of your favourite beverage in advance; however, if you only wish to know about the electronic rolling forward of the mileage, I'm pretty sure it's only the second half of the video.

But yeah, it (should be) live now at the following link, so enjoy.

https://youtu.be/sBc2NeJ9_BQ
__________________
1990 Volvo 240 GL Auto "Catalyser" (oOOoh, fancy). B200F, about as original as they come, and all in BLOO. ~140k

My electronics website/blog thing: https://unintegratedcircuit.wixsite....egratedcircuit
TheHungriestBadger is offline   Reply With Quote
The Following 2 Users Say Thank You to TheHungriestBadger For This Useful Post:
Old Jan 7th, 2024, 23:29   #7
Bloodman12382
New Member
 

Last Online: Jan 7th, 2024 23:29
Join Date: Jan 2024
Location: Camino
Default Electric mileage Correction Different Speedo

Thank you for your generous content on YouTube and here on this Forum. I’ve studied the videos and your posts. I was given an extra speedo from a friend’s collection to fix and use. Unfortunately, the circuit board is different from the one referenced in your posts. I’ve searched for the schematic online with no success. The speedo model is VDO 992 645 (145) beneath. I’m unable. To attach a photo or I would do so. Perhaps I can attach it to your YouTube video in comments. I am uncertain about where to attach the wires. Any assistance you can provide will be appreciated. Thank you!
Bloodman12382 is offline   Reply With Quote
Old Jan 7th, 2024, 23:49   #8
TheHungriestBadger
Junior Member
 

Last Online: Feb 18th, 2024 23:05
Join Date: Jun 2022
Location: Ardleigh, Colchester
Default

Glad to hear I'm useful to someone :) if you want, I can PM you my email address and you can send me the photo that way? You won't be able to attach it in YouTube comments, unfortunately.

I'm not familiar with individual speedo models, but if you can give me any other information on your car that might help myself (and others) point you in the right direction. For example, I know certain years/specs/transmissions, etc. had cable-driven speedos which obviously won't be electronically controllable but may still have had a PCB attached?
TheHungriestBadger is offline   Reply With Quote
Reply

Tags
240, mileage, mileage correction, speedo, speedometer


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:51.


Powered by vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.