Sunday, August 3, 2014

How to replace Audi A5 2.0T air filters

My car is coming up on 75K miles and I decided to tackle some of the service items myself. I ordered replacement air filters for the engine and cabin of Amazon.com. One was the OEM Mann filter, the other made by TYC. I'll talk about the engine air filter first. As you can see in the pictures, the airbox has some Torx screws (6 in all), a connector and a hose. The air hose is pretty simple to remove with a large flat blade screwdriver. The thoughtful folks at Audi molded a little tab into the hose so that when you loosen and tighten the hose clamp, it doesn't try to spin away from the screwdriver! The MAF connector is pretty trivial to remove as well. Removing this connector is optional I think, but I liked being able to fully remove the top of the air box.



The Torx screws are captive and so once they are loose, don't try removing them. After they are all loose, you can simply lift off the cover. Below, you'll see how the filter fits. The bottom was a lot dirtier! The new filter fits the same way. Be sure that the rubber edge of the filter fits within the lip of the airbox before reassembly. As they say, it's the reverse of disassembly.


Next, I wanted to tackle the cabin air filter. On a previous car, it was accessed via the air plenum. I removed the cover on mine by removing the two fasteners shown with the arrows in the 2 pictures below. They just screw off and can be set aside.



The cover lifts off starting at the front edge and pulls forward. Once I got mine off, I found the air intake. Hmm, no filter!? I noticed something else, leaves! I would never have found those without looking under the plenum cover. I recommend everyone that lives where leaves fall from the trees (isn't that most places?) should clean out the air plenum yearly! The leaves will rot and also trap moisture which is a bad thing for the painted metal!


After vacuuming that out and replacing the cover, I decided the cabin air filter must be inside the car. The filter I bought came with instructions on how to replace it, so that helped! The filter is accessed by removing a foam panel behind the glovebox. You'll need to get down into the passenger footwell to get at this. Notice the 3 screws that can be easily removed with your fingers. Once those are off, carefully pry the front edge of the foam panel down. You might be able to push the whole panel back a little to clear the plastic on the front edge. Try not to rip it since I think that could happen pretty easily.


With that panel off, you can see where the filter is held. The plastic retainer is removed by pushing the little handle to the right an inch or less. Then, it can be pulled off and out of the way. The old filter has to be pulled down and out. I had to bend my filter a little to clear the carpet.



Here is my new filter above the old one. Definitely a lot cleaner! Also, see the little tab on the new filter (shown by the arrow). This isn't a big deal and probably helps pull it out later, but it gets in the way of the retainer, so I folded it flat against the filter first.


I hope this helps! The other major item on my 75K service is spark plugs and I won't write that up since I found a very good how-to already posted.

Friday, May 16, 2014

How to replace an Audi A5 backup light

I had a warning pop up on my A5 and thought I could fix it myself. I've replaced bulbs on all of my other cars. When I looked for information in the owner's manual, I was annoyed to see "take it to the dealer". That'll never do! I tried looking on-line, but nothing very helpful was available. I decided to dive in and here are the details. First, I bought the replacement lamp spec'ed in the book at the local Walmart. It called for a 921 bulb. Then, I went home and had a look around the trunk. I wasn't sure if the light was in the trunk lid, but soon found flaps on either side of the lid behind the lights. Here are what my lights look like (it's a Premium Plus w/ LED lights)
Under the trunk lid, open the flap. Carefully pull till the 2 retaining clips pop free. Once open, you'll notice 2 long nuts that are part of 2 retaining clips. Use a wrench or large flat-blade screw driver to loosen the nuts and remove the clips.

Once the clips are removed, unplug the electrical connector and you'll be able to lift out the light assembly.
The reverse light is located in the corner, turn it slightly counter-clockwise.
Now, you can replace the bulb.
As they say, reassemble in reverse order!

Any questions, please ask!

Wednesday, April 9, 2014

Lights In a Jar

I've liked blue lights since I was a kid. I noticed the blue lights when we drove past the airport. I like blue glass also. It's a pleasing color. I was drinking some wine recently and was struck by the blue bottle.


I thought it might look nice if illuminated from inside. Being a little creative, I thought about fun ways to light the bottle from the inside. My first thought was using white LEDs. I though, why not put some strings of LEDs inside at different angles. The next day, I remembered I had an Adafruit Trinket laying around and wondered if it would fit in the mouth of the bottle. It does, with room to spare! How many PWM outputs? 3? nice! Each can drive 20mA, so hmm, ok, with a transistor, could drive some more LEDs off each output. I settled on 3 strings of 4 LEDs hung at different heights in the bottle. I thought I could drive them to fade out at regular intervals to add some interest and make it a little more dynamic.

I wrote some code and soon found that the 3rd PWM output wasn't enabled by default using the Arduino IDE. There is a workaround on the Adafruit forums. Their whole site was down for maintenance when I was working on the code, so I didn't get that fix in until later that evening. I made a video of the problem prior to that, so you can see the earlier code in action. I've posted the code on github.

Let me take a little time to talk about the code for those not so familiar with software design (since that is my profession). If you follow the github link and look at LightsInAJar.ino, you'll find the normal setup and loop functions, but also more. The PWM4_init and analogWrite4 functions come from that forum post and handle the pint 4 PWM problem I mentioned. Setup is pretty straight forward in that it sets the 3 output pin modes, then configures the troublesome PWM output. After that, we get into some logic for a state machine. For those unfamiliar, state machines have been around for a long time. They are sometimes helpful in software since they consist of discrete states and transitions between states. In this case, I've defined 4 states for each of the outputs;
// states for 3 led strands
// 0 = off
// 1 = turning on
// 2 = on
// 3 = turning off

The code in the update function handles what to do in each state. If you check the main loop, it calls update for each LED, then delays 20 milliseconds and repeats, forever. So, for each LED, update is called every 20 milliseconds. Each state increments a counter since I want the LED to remain in each state for a period of time. It also checks a limit to see when it is time to move to the next state. For states 0 and 2, it simply waits and moves to the next state. For states 1 and 3, the PWM value for that pin is also changed. In those states, we are either turning the LED on or off, so we pass the counter value to analogWrite4 when turning the light on, and we pass 128-counter when turning the light off (instead of decrementing the counter. All of the state machine logic is the same for each LED. I set up the state variables differently for each LED to make each output start at a different state, and counter value. I also used "pass by reference" to allow me to pass variable into the update function and use those external variable directly within the function.

Enough about the code! I have single LEDs turning on and off, but I still needed to design the transistor driver circuit and since I'm a little rusty on that, I looked for an on-line circuit simulator. I found CircuitLab which worked pretty well, but for serious use, they need a paid acct. If anybody can give me a pointer to some decent open source visual circuit simulation, I'd be very happy!
I set up a simple driver circuit, designed to handle 4 LEDs at 20mA each. Here's a picture I took of the simulation.

I wired this up and it worked very nicely! I will point out that I am using blue LEDs for breadboarding. I ordered some compact white LEDs from eBay and hope to get those within a week. They were $2.30 for 100, which is way more than I need, but 1/10th the price of RadioShack (which is where I picked up the transistors and resistors).


To power this, I plan on using an old wall adapter for a bluetooth headset. Those put out 300mA and will be enough for this since 12 LEDs at 20mA each + 12mA for the trinket adds up to 252mA. I plan on including a proper power switch as well since I want to power the whole thing off. Otherwise, I may have simply connected a pushbutton to the trinket and made a software switch. I'll follow up with the rest of the project soon!

Tuesday, February 4, 2014

Eclipse Clock - making the case

I've had the circuit running on the breadboard and the software is in a workable state, so what's next? Well, I could work on the circuit board or the case. I chose the case. My idea was to use MDF (medium density fiberboard) for the back since it is very easy to work with and stable. I also knew I needed a way to cut perfect circles. I have a Bosch Colt hand router that came with a fence bracket. I was able to use part of that along with a 1/2" nylon bushing, screw and wing-nut to make a circle cutting jig. Pictures of that later. First, I had ideas about how the case would look and how it should be put together. As I got to the point of actually making the case, I jotted down a cross-section diagram with dimensions in my notebook.


The dimensions in there are pretty accurate. Let's call the parts "back", "spacer" and "front". The back and spacer are made from 1/2" MDF and the front was made from some curly maple that I got at a local specialty wood store. I chose curly maple since it was interesting to look at and quite hard. I bought a 7" x 15/16" board that I cut into 2 16" sections and jointed and glued together to form a 14"x"16" piece. I made the one dimension 16" so that it was easier to feed through a drum sander. I ran the glued board through the sander until each side was perfectly flat and no glue seam remained.


Now, I had all of my materials and I needed to start cutting circles! I got a 1/4" straight bit for the router and made some test pieces for the back. The problem was that the Adafruit 1M LED strip needed to form a perfect circle with the ends meeting perfectly so the LED spacing would be consistent, even at the joint. 1M circumference results in a 12.53" diameter circle. I adjusted my circle cutting jig to 6.25" (radius). It turns out I needed to try a couple of times. The first back piece was too small (the ends of the LED strip overlapped by about 1/2 LED length.). The second one was too large (too much gap in the ends of the strip). The third one.. the third one was just right! I had very minimal overlap and didn't feel like I needed a 4th!

\

This picture shows the MDF after I've made about 3 passes. You really shouldn't take more than 1/8 of material at a time. The bit would overheat. You can clearly see the jig I made in this picture. The hard part was measuring between the bit and the center of the nylon spacer. I had to use a screw driver to tighten the screw and double check the measurement each time. Notice the 1/2" guide hole in the MDF. That's what guides the entire cutting operation.

I should point out what might be obvious, but not to somebody who is new to this type of thing. You must make the larger diameter cuts first. Cut the outer diameter groove, then I actually went further out and cut all the way through to make the disk. This was how I left that little shelf for the LED strip to rest on. Once the outer diameter is cut, move in and cut the inner radius. Once you cut the inner radius, you can't go back and do the outer radius because that guide hole is no longer part of the piece!

The next thing I made was the spacer. It was a circle of MDF about 3/4" wide. After that, I could start on the maple case front. I chose one side that would be visible on the outside based on the grain pattern I liked. I then cut the opposite side. I drilled a guide hole and started routing the groove on the outer diameter. This maple is definitely harder than MDF! Go slow and make small depth adjustments as you go. It will take a while!


Once the circle is cut out, I had to start on the recessed area. This is visible in the cross section and will be where the electronics live. I made 2 grooves that formed the boundary for the recess. These were 3/8" deep.


Next, I had to remove the rest of the material between those grooves. Doing this with that 1/4" bit would have been time consuming. Luckily, I had a 1/2" bit from another project so I was able to use that to clear the material in 3 passes (many more if you consider advancing the depth bit-by-bit).

Finally, I was done clearing out the recess. I should mention that I had to run the shop vac between each pass due to the amount of sawdust created. Here's proof!


Final step is to remove the center disk and complete the front case shape. I worked on making the groove deeper and deeper, then a final check of my spacer to be sure it fit. This would be the last chance to get in there and adjust the recess area!


Once that was done, some light sanding and checking how it all fit together. I decided to mount the LED strip next to get a better idea of how it all worked when put together. I used about 7 dabs of hot-melt glue to attach the strip. Prior to doing this, I created some space behind the joint in strip. I needed room to attach wires and route them to the interior of the case.


I also used a saber saw to cut a flat on the spacer ring. I figured this would leave plenty of room for the electronics and was part of my original plan when calculating dimensions.


See? Plenty of room for the Arduino Micro and my own small board (which I still need to build!) With everything held together, here's how it looks. I have some rough sanding to do on the outer and inner radius of the front part of the case. I also used a chamfer bit to ease the front edge of the case. I think it looks pretty slick.



Next time, I'll show more about the electronics and the finished look of the case.

Saturday, January 18, 2014

Eclipse Clock

I was initially impressed by a clock I saw called the "Equinox Clock" posted here. The author went into some detail on the construction, but it wasn't a full how-to. I thought about doing my own, but all of the work he did with the separate driver chips and LEDs kept me from getting started. Mostly because of the time investment required. When I saw that Adafruit Industries started selling 1M strips of their "NeoPixels", I thought that would be a great alternative and most of the work spent on the clock would go into other things besides custom circuit boards and interconnects.

I plan on posting all of my plans and code on-line with instructions to help you build your own. I'm calling it "Eclipse Clock" because I think it looks more like a solar eclipse (and I didn't want to steal the name). Here's the part list I'm using;

  • 1M Neo-Pixel strip
  • Arduino Micro
  • DS1307 RTC chip
  • 32.786 KHz crystal
  • CR2032 lithium battery (and holder)
  • push-button switch (N.O.)
  • small Cds cell
  • 4 10K Ohm resistors
  • 1 1000 uF capacitor
  • 5v power supply (4 amps ideally, more on that later)

The clock will consist of an strip of LEDs shining sideways out of a round case. They radiate outwards and end up reflecting off the wall. There is a single pushbutton for setting the clock and changing color scheme between some presets. A real-time clock chip keeps accurate time. Hours are represented by 3 lit pixels, minutes by 1 lit pixel and seconds by another lit pixel. Themes can change color values of these as well as use a separate background color (which could let you have a fully lit ring with dark values for hours/minutes/seconds).

Source code will be on github.

More in a future post, but that's where I'm starting!