Reverse Engineering an Automobile Fuel Gauge using MSP430 Launchpad

I have been keeping my hands off the blog for a while after the previous post.. I had exams at university. But in the meantime i had some time to get my car`s faulty petrol/gasoline Gauge Indicator Changed. I got the old one and as usual i tried to reverse engineer the gauge with all the simple tools i had. Technically, Its a ” Floating type Liquid Level Resistive Transducer’ (You can trust me on that..I am a student of Electrical Engineering 😀 ). So basically its a variable resistor much like the LDR or a Potentiometer. The one that i have is a pricol make for Maruti Suzuki Cars. You can have a look at the pictures below. DSC05612

DSC05610

Using the TI MSP430 Launchpad i decided to sort of simulate how the Indicator would actually work in real situations. So i pulled up the ADC Pin on the MSP430G2231 using a 220 ohm resistor and connected the fuel gauge indicator as in the set-up picture you can see below.You can use any platform you like arduino,stellaris etc. all you need to do is read the ADC value and produce a corresponding brightness for the LED and when at a low level raise a low fuel alarm which in my case is the RED led. I used Launchpad as it has Two on-board LED`s while my arduino has only one ; additionally i was lazy enough not to wire another led to arduino 😛 .

DSC05614

On measuring the resistance across the fuel gauge i found that when at the lowest position it has a resistance of about 112 ohms and at the maximum it was about 7.2 ohms. On the sticker pasted on the top its mentioned-” Do not connect direct 12 volts”.Which is pretty obvious because since the resistance is low, the current will be pretty high.

12/112=0.1amps

but on full scale its about 12/7.2 ohms=1.67amps

This current is pretty high and will surely burn the coil.

So we now know why the sticker is there! 😀

The program simply blinks the red led when there is low fuel. Rest of the time the intensity of the Green LED is proportional to the amount of fuel thereby producing a variable DC voltage which can be sensed using a voltmeter quite similar to the one fitted in the car console.

TL;DR

Watch this video:

Thanks and Regards,

IndianTinker 😀

Advertisements

Deciphering almost any Automotive Combination Switch Assembly

I was recently working on a project that involved using a combination switch assembly used “normally” in the cars for Indicating Directions, Wipers, Headlights and Horns! For those who work on such projects which involves using things which are made for something else to do things that they usually dont do..this might be the post that can get u going and you can Decipher the full console/part in about 10-15 minutes.

Usually the generic way is to check each and every connection using a DMM as a continuity tester and figure out which switch closes which connection..which is very lengthy and often makes one impatient.

Here are a few tips/steps/way outs/notes/whatever:

  1. Open the console(only the outer covering) to see where the wires land up. Never ever open a switch assembly because it might contain some springs or mechanical arrangement that might be difficult to re-assemble.

Rear Assembly “Almost Exploded”

Front Exploded View

2. In many of these Assemblies the switches for a common purpose are base colored the same while to distinguish between them line colors are given. Like in the photo below the green wires are for Indicators wherein the all green wire is Common, the Green-Red               ( Syntax: Base Color-Line Color) is the Left indicator and Green-Yellow is the right indicator. Once you find wires of common base colors ..probe one without any line color to ones with a line color but same base color. and do some mechanical movements..a beep will show the contact made..then carefully document it in a diary/notebook.

Wire Harness Connector

3.When you have still some connections left to decipher ..Follow the following algo:

  • Initiate a mechanical switch and analyse the movement..because it is obvious that somewhere in the world in your hands a contact is being made..it might be that some copper strips be making contact when a plastic bar presses the strip..or a metallic piece moving on a PCB pad.
  • Once you figure where the action takes place..probe the point and There you get the missing links.
  • Now if there are some more wires left..lets follow the principal of exclusion and work backwards..trace the wires back to the point of contact and see what sort of mechanical action produces that kind of a reaction.

PCB Pads and the copper strip for Wiper control and the Green-Red Wire of the Indicator System

Copper Strips and the black contactor that makes and breaks!

Hope you like the post and manage to decipher a few assemblies. Keep me posted on how this helped.

Happy Tinkering!

WSC Story- Chapter 2: Con-course

So now we have a car, we are “officially” registered for WSC 2011 some of us have their Visa`s and Tickets but i didn’t took us long to acknowledge that the car we built ,its too late to ship to Australia.

Box 1

So the whole team sat to work upon the options available ..The only one that was-Getting the Car Airlifted to Australia. It was too costly ..I mean it was almost like taking an Indian Apple to the Australia in an air plane “taxes included”. But we had to..Thankfully our University helped us a lot in this regard and we were able to get a local agent who “happens to be the expert in CARNET” up and running to get our car Airlifted. He sent his men to take the dimensions of the car and said that he would call to spill the details…

Packed In The box

I has been a day we were waiting in our workshop ..i and Jaspreet were drinking..COKE and Bharat was having Jalebies ( a sweet Indian Delicacy thats served Hot with icy cool custard) and our Team Manager Bilal Sir Called up..”Come on Boys ! lets get started we need to cut the car into 3 pieces as its too big for the container” and we were all like Holy Crap! ( Ironically Cut the Crap) So we spent the next 2 days cutting the car into components so that we can stick em up in Darwin in a weeks time..The third day we packed the car into boxes and said good bye and i even left a small sticker on it saying “See u in Australia!”

So the car was gone..But the batteries were getting annoyingly difficult to ship them out of India. No one was ready to ship them even the parent carrier who brought it to India from China said a Big NO! Meanwhile the team packed the bags and left for Australia and as usual I was late even this time as my Visa didn’t came and i had to get me Ticket rescheduled on the next probable date..Even probability fails here..huh..

Those Jalebies we were talking about earlier..They gave Bharat –Jaundice so i will take him a week to get alright and hence we both booked our tickets together..His with a Visa mine without it. So it was me , Bharat and Anshul Sir left in India to sent the batteries to the pals in Australia…

The day they left the visa office called up and said my visa was ready..So now i can go, Bharat can go, Anshul sir can go..But Batteries?? The couriers agencies doubt it..

Here are some comic responses from couriers Agencies about their views about cylindrical LifePO4 batteries:

Batteries!

X: “ Of my god..they look like bombs to me..”

Y: “Are they soda Cans??Well then what are the wires for?”

Z:” You must be jocking..They areee baaateries??”

This clearly suggests  how unfamiliar the LifePO4 batteries are In India.(Companies you need to work on that). So in the time of distress we got a number from JustDial.com of a courier agency who was willing to do it . We were not sure..so we asked him the entire details and all other stuff ..he seemed pretty confident and all the team members who had reached Australia were pressing me on this saying- ASAP..ASAP..ASAP….

So we gave him the batteries on the day we were all leaving for Australia and prayed to god for their safe delivery.

It was 4 am in the chilly morning .. I was going to go to Australia..I didn’t have a single flight rather a connected ones ..From Delhi to Singapore and Singapore to Perth and Perth to Adelaide ..That a long journey..especially for me as- i have never been on an airplane before, i was travelling Virtually alone ( Bharat is a good pal..No offence), i had to change flights twice and i was flying abroad so no familiar faces..Similar was the case with Bharat.

So at 8:30am, we boarded the Jet Airways flight from Delhi to Singapore..I really liked the ambience the plane had..especially the feeling when it took off it was like the feeling we used to get at the circular endpoints on the Columbus rides in childhood except for the fact that the ticket was 1000 times costlier…

Delhi Airport

We sat on the plane i saw how small the Delhi Airport looked from the sky and it all went smaller and smaller..i the next moment i was seeing just clouds..i clicked 74 pics only of cloud formations that amused me and it was great..As my side(of the plane)  faced the sun i had to close the coverings of the window to avoid the glare..

One of the good Shots

I read the Evac Guide and things to do etc.etc and watched a 40 min documentary of Da Vinci..Backed up my camera in my Laptop..and got a nap..

And it was the time we had to land in Singapore`s Changi International Airport..The feeling that comes when a plane lands is almost the same as landing on foot from a jump..I mean the impact is pretty same..

We landed ..we were escorted to the Airport..Our next flight was 2 hrs later so we thought we could stroll and explore the airport and quantitatively analyze why this airport is said to be the best..We analyzed and were pretty convinced..We updated our location to Singapore on our Facebook page so that family and friends could know of our whereabouts …2hrs for Changi? That was injustice ..its huge..So we did what we could and 2 hrs passed we were ready to board our next Quantas flight to Perth..Perth is a city we all imagined to be a cricketing hub..because the only time we heard of it was during Test Matches in our Cricket Loving Country…

We boarded the flight and i was time for dinner! And mine one came with a label- “ Special Meal For Mr.Rohit Gupta ( Pure Vegetarian)”..That special feeling was good thanks Quantas.

Changi

It was dark outside and we were flying over the sea..nothing i could see except the GPS on the In-Flight Entertainment System. Watched Green Lantern and Transformers 3 and slept.

When i  was woken i was about 10 mins from landing in Perth International Airport. We landed got our passport stamped again and were in the long Quarantine Queue to get our baggage checked..I took us 1 hr to get out of the  system and were finally out of the Perth International Airport.I called Team Manager to know “ What next?”. He asked me to wait for the next 5 hrs on the airport and then take a morning bus to the Domestic Airport. That was classified As “Risky” in my fuzzy logic.

So Bharat did what he is famous at… “Asking” ..he asked the cop nearby for the free transfer service from the airport ..and she called the driver who was here in no time..She later clarified that at this time in the night 1am EST the service of the bus is every hour..Anyways, we boarded the bus and the bus waited for like 40 mins and meanwhile the driver was checking his Facebook updates. In about 10 Mins we were at The Perth Domestic Airport for transit to Darwin. We had a nap there and in the morning we boarded the flight to Darwin and the news came that the car has reached Darwin. I said to myself..”so you are already winning races with us..”

The next moment we were in Darwin..Against the expectations and promises no one came to pick us up..We took the cab to our Bag-packer YouthShack-The most happening Bagpacker in Darwin…

The next few days that were gonna come..will decide the fate of our car..It was not what we expected… … …..