Showing posts with label Ardic. Show all posts
Showing posts with label Ardic. Show all posts

Saturday, January 26, 2013

Ready, set, optimize!

Alright, finally I had time to grab my solder iron and punish the naughty GSM shield for being such a greedy pig when it comes to efficiency in power consumption.

When we look more closely at the shield schematic, we can see that NETLIGHT and STATUS pins of SIM900 control the transistors which turn on and off the leds, powered from Arduinos +5V input via 300 ohm resistors R21 and R20. There's also the "shield powered" led that is always on when, as the name implies, the shield receives input power, regardless whether the GSM module is powered or not. Very wasteful when thinking about power efficiency, so I started with that first:


Actually I haven't ever done any operations on such a small SMD components before, so after unsoldering the R1 the end result was quite far from satisfactory: both copped pads under the resistor were ripped off because of too high temperature, excess force and prolonged heat exposure. Oh well, not that I need the "shield powered" LED anyway..

Before removing the R1 the power consumption of the SeeedStudio GSM shield was 12.2 mA (shield powered, but SIM900 not turned on) and 23.4 mA (SIM900 in sleep mode) when powered with external +5V lab supply (HP 6632B). After removal of R1 and thus disabling the LED, power consumption drops to 9.1 mA and 20.3 mA, respectively. This brings savings of 3.1 mA. Nice.

Wiser from this incident, I practiced desoldering a little bit with old PC motherboard and found a suitable removal procedure consisting of adding liquid flux, new solder and then removing everything with a solder wick. Then add little bit more solder to both ends of the resistor, heat one end with solder iron while lifting it with tweezers. Then repeat this with the other end and finally the resistor can be removed.

 I removed the R20 and R21 resistors and soldered a breadboard jump wire to bypass the LEDs. This time no solder pads were harmed and thus the procedure is reversible. The transistors Q3 and Q4 now connect our NETLIGHT and STATUS wires to ground when signaled by SIM900, making it posssible not only to put the GSM power and/or activity leds on the enclosure if needed, but also it's now easy to check the power status of the GSM module. Before this, the only way to see if the module is powered was to send AT commands and wait for the answer. Actually this was one of the things that annoyed me about this shield from the start. Luckily now only one digitalRead is needed.

It could have been possible to remove the transistor and tap into the NETLIGHT and STATUS pins of the SIM900 directly, but leaving them behind transistors is safer since the module uses lower voltage than rest of the device. It could have been possible to destroy the whole chip or at least the output pins with software by simply switching the pin mode on Atmega side to output and signaling +5V. Puff, there goes the magic smoke.

Since there isn't a nice way to attach strain relief to the jumper wires,  I used hot glue (again) to attach the proximal ends to the PCB to make sure all the vibration and shaking in the car doesn't cause the cables to come loose.

Now, after bypassing also the STATUS led and rewiring the NETLIGHT led (blinks once every 2800 ms, so not a concern in this case), I've managed to reduce the sleep mode consumption from 23.4 to 10.2 mA! Those LEDs really are gluttonious beasts! Then I tried inputting +12V onto the shield directly via its "low ground current, low-dropout voltage regulator", the MIC29302. Low ground current my ass. Increasing the voltage from +5V to +12V increases the quiescent current (=ground current) linearly from 10.2 mA back to 21.8 mA! And that is even without powering the GSM module! So, in this case it is better to use the 7805 to drop the voltage from +12V to +5V and distribute that to the GSM shield. If someone knows better alternatives, I'm all ears.

All in all, the ChiliCAN now consumes 14.3 mA when all the chips are sleeping (i.e., when there's no CAN traffic and no calls are being made). That constitutes maybe 90% of the time. When the heater is on (or otherwise CAN bus is active), the consumption wanders between 30 and 55 mA. During phone calls it lies around 100-200 mA having maximum peaks of 1.5 A, but those are quite short bursts, having almost nil effect on battery life. If we assume average consumption of 17.2 mA, it would take almost 4 months for ChiliCAN to deplete my 95 Ah car battery to 50% charge. I could live with those numbers :)

Tuesday, December 11, 2012

Anatomy of Ardic

Greetings from the non-insulated garage of my parents! I don't have any warm facilities to fix my car, so this will have to do. It was a nice warm day of -5 celsius when I decided that it is now or never (actually now or next summer) when I'm going to tear down the Ardic and see what's the problem.

Here's a nice post about removing and servicing Ardic. (Sorry, instructions only in Finnish).

Here's an explosion diagram of Ardic. Year is 2003, but seems to be identical to mine. Taken from Finnish Volvo forum, topic designated to Ardic problems..


Here's the big guy itself after removing the front bumper. Inferring from the rusted screws I would think this thing hasn't been serviced in years, maybe never during the 10 years this thing existed. There has been quite many previous owners and according to the owner history database, each of them had this car only little bit over 2 years.

After one hour of careful separation process in -6C, we can continue disassembly inside in room temperature! 



Glow plug, water pump and outer shell removed.


Testing the glow plug. Intact, as I suspected.

Inner shell shell removed, revealing chunks of soot attached to the walls 
Here's the combustion fan motor, working normally. Little bit to the left under the cap resides the flame sensor that is directed toward the combustion chamber. I managed not to take any pictures from right angle, but there was little bit of soot there as well, blocking the view of the flame and causing the main problem here. After some cleaning, the flame sensor reads ~8 Mohm when in dark and around 430 Kohm when teased with direct light from a flashlight.

Quite a bit of soot also under (actually over, since the unit seen here is held upside-down normally) the cup and the turbulator. There's a shadow under it too, but most of it is soot actually.

Here's the CPM. It's funny feeling seeing it now here, like meeting somebody in real life after you have spent weeks chatting online :)
We know each other so well already, so there was no need to be embarrassed. Let's take the cover off and look if there are any unhappy burned parts. None found.


Only after putting the whole thing together again and looking this image more carefully when uploading this picture, I noticed this burned looking solder joint little bit from the center to the direction of upper left corner. Weird, since the heater seems to be working now.  Maybe it was just the angle, light doing its tricks.
So, I cleaned the heater from all the soot and put the thing back together. Fingers crossed, I started the heater and behold, it works now! It seems that soot builds up as a result of imperfect combustion and eventually blocks the light/flame sensor. When this happens CPM thinks there's a problem with fuel delivery or some other functionality, and then stops the heater. Ardic does need service at least every two years, but some people service it annually, especially when there's a lot of short distance driving and the heater runs cold proportionally greater periods.

 I didn't touch the water pump since it seems to be working and I don't have any spare rubber parts should the pump need any of them changed after opening the thing to prevent leaks. Anyways, I'm going to buy a new pump next summer when I'm servicing this thing again, just in case. It's interesting to see how much soot buildup will occur during the winter months with my personal driving style and preferences. From there it will be possible to estimate how long a relatively safe service period would be. It would be possible perhaps to estimate this based on the voltage reading of flame sensor! Of course, this would require reaching a steady state, maybe after running the heater for one hour until all the temperatures reach equilibrium and then check the sensor voltage. The nearer it is to the 2.5 volt threshold (explained in previous post) when the heater is on, the more the there could be soot covering the eye of the flame sensor. I will have to check the reading soon when it is still clean.

UPDATE: The flame sensor voltage will fluctuate between 0.6 and 1.0 volts when the furnace has been cleaned. Boys, when it starts to climb over 2.0 volts near the 2.5V threshold, it's time to grab your wrenches and mops and start cleaning!

Sunday, December 9, 2012

FFffuuuuuuu......

Succession of failures. What an oxymoron.

A week ago I continued testing the ignition of parking heater with diagnostic commands. Last time I checked, it worked without the key in ignition using VIDA, so I took another shot with ELM327. No go. Ok, started injecting the periodic keep-alive message to CAN bus and tried again, but without any success. Then I put the key into position I, and what do you know, the heater started. It DOES need the key in the ignition after all, so there goes my plan to implement the remote control using the diagnostic commands. <insert swear words and cursing here/> My previous success with VIDA must have been because of some kind of inherent timeout in the CEM. Diagnostic codes and commands work for some period of time after the key is removed from the ignition, but after a while (maybe because of security reasons) the CEM stops responding to them.

There is a way to spoof the other modules into thinking that the key is in the ignition by overwriting the continuous status updates made by CEM about the key position, but there's no workaround when it comes to CEM itself. It would be like breaking into you own car. So I folded in front of this another unforeseen obstacle, took the path of less resistance and ordered the AEM module. It's going to cost little bit over 200 euros (including software updates to CEM and AEM itself), sure, but I didn't see any way beyond the key problem and I'd spent enough time tackling this one.

BTW. Guys in King of Thrones are wrong. The winter isn't coming. It's freaking already here! Few days ago the temperature went down to -22 celsius ( -7 fahrenheit)!  And that resulted in the next system failure...

The parking heater stopped working. The day before this total failure it already gave a hint for the upcoming problem. For some reason it hadn't reacted to previously set timer, but did go off when starting it manually.  Next day, I had set the timer again, but when I approached the car, I could see that everything was still frozen. Attempted starting the heater manually, and it did run for a minute or two, but then stopped again. Tried it for the third time, but the same thing happened.

Now after three unsuccessful start attempts the CPM goes into lock-down that can only be reset with VIDA or other expensive diagnostic device. Poor man's choice, Torque + ELM327 won't do, since they won't be able to query CPMs fault codes and reset them. So, my efforts developing the Sardine CAN and playing around with VIDA weren't total waste of time. Lucky me, except that I was visiting my parents' house and I didn't have the device with me, so I had to resort to firing up the engine in -22C since there isn't any additional heater installed in the car.

Except now the car would start. Motor would cough for a second or two, but then the start motor just continued to spin. Now I was starting to get pissed off.  This sounded more like a battery problem or frozen fuel lines, since a problem in either one of those could affect both the motor and the heater. There was no low voltage light on the DIM lit,  but I didn't have my multimeter to check the battery voltage. The artic diesel variety that is offered here in Northern Finland is supposed to handle at least -29C temperatures without gelling/waxing and clogging the fuel filter and the fuel lines. Anyway, I didn't have any way to pinpoint the problem at this stage. Luckily I managed to start the engine after covering it with blankets and letting two powerful heat blowers warm it up from below a bit. Even that took over 2 hours.

So I got home, connected my dear Sardine CAN, fired up VIDA and started snooping around. First, the fault codes:


Now this is interesting. There's no way simple fuel clogging problem would result fault codes piling up as they do in this list. Especially CEM-6C48 is meaningful in this context. It would indicate there was a communication problem between CEM and the transponder implanted in the ignition key. It could be caused by many different reasons (two different keys next to each other in the keychain, electrical interference, wrong key etc), but end result would be the same: Fuel delivery is inhibited to fuel injectors and motor wouldn't start. However this wouldn't have any effect on the heater, since its fuel input is controlled by heaters own fuel pump which is independent from any security measures related to engine. Anyways, fault codes this many in so many different modules would be unlikely to occur for reasons indicated in each fault code. There must have been some kind of electrical connectivity problem because of the weather, most likely in the CEM or one of its harnesses. If this ever happens again, I will have to dig into this, but for now, I reset the fault codes and wait if any of them should pop up again.

Now that the fault code for heater (CEM-5F4F : Too many unsuccessful start attempts) was also been cleared, I was free to try starting up the heater, but with this time I had VIDA to guide me with troubleshooting.



Glow plug, combustion fan as well as water and fuel pumps were working normally, but the flame sensor read constant voltage. According to VIDA, voltages from 2.5 to 5.0 are interpreted as "no flame" and voltages below 2.5 volts mean there is a flame in the heater. The CPM waits for a while for the diesel to ignite, but after 1-2 mins it gives up, stops the heater and increments the error counter. So, either the flame sensor has broken down or is covered up, or the diesel fuel doesn't reach the heater. Anyway, the problem most likely isn't going to go away magically and repair shops usually ask between 400-600 euros + parts for the repair, so I think you're going guess where I'm going with this..

Next: Ardic tear-down!

Friday, November 2, 2012

What's going on here?

Combine the following attributes:
  • Newly acquired Volvo S80 2002 with a diesel heater (Ardic)
  • Cold and hostile environment.
  • Moderate amount of free time (but never enough!)
  • Reasonable coding skills and electronics know-how
  • Hatred of cold and snow
Mix them in a blender (figuratively) and what you get? Desire to construct a remote control for the diesel heater! Laziness is indeed a major motivator for comfort zone aficionados.

My Volvo does have a timer for starting the heater, but I my schedules are almost never fixed, and what I would rather do in my mornings is to press a button, sip coffee and watch behind a window how my Volvo gets warmer, instead of going there to set it on manually. Hence the project in question.

Now, the quest started with basic Googling: what is already available, have other people done something like this before and how much do they cost? Volvo does offer OEM remote heaters, but they cost shitload of money. Not going pay a hefty amount of 600-1000+ euros for a simple remote control and a box that hits a switch. My hacker soul laughs - challenge accepted.

I've decided to document this project, not only gather my thoughts, but also to share any bits of information that I might find. I hate re-inventing the wheel as much as any other coder, so if this ends up helping even one person trying to figure out their Volvo innards and hack their Swedish tanks, writing this might not been in vain.

My plan was to build a prototype using Arduino (open-source microcontroller) and XBee (low-cost radio module). I've been messing around with Arduino for quite a while, but wireless experience I do not have. However XBee is supposedly quite easy to program and is well documented, so I won't anticipate huge problems in that area. Besides, it's fun to expand your field of expertise. In this case to two new fields: car automation and wireless communication.

Other DIY guys have been thinking alike: 
However to control the actual heater, all of the above mentioned devices rely on AEM (Accessory Electronical Module) to do the dirty work. AEM is a 150-200+ euro Volvo accessory that  offers simple voltage-based on/off interface for non-official, non-Volvo external accessories, such as alarm systems, parking assistance, handsfree systems etc, and of course remote heater starters. AEM then connects to the car's internal electronic system (CAN bus) and controls other devices in the car by sending them CAN bus messages. Thus, external devices don't have to know how to talk to the aforementioned devices directly but can use the simple interface offered by AEM.

Again, I was definitely not going to go out and spend money on a device that just turns the heater on when being told so. I'm both cheapskate and stubborn. So, my only choice was to find out how CAN bus works by a humongous task of googling, researching and reverse engineering the message traffic, and ultimately perhaps finding out how to control the heater. Then design and construct a prototype for sending the ignition command. Then add wireless modules and build a remote. Then press button, sip coffee and watch my Volvo get warm.

Sounds like a lot of work? Sure. But even risking having frostbites after hours of hacking outside in cold temperatures, I'd rather do that than empty my bank account and pay a horseload of money to a guy behind the counter in order to fast-forward to the coffee sipping. Did I mention stubborn?