Sunday, September 1, 2013

Step 2: Audio

It's been a while since I worked on this project, but finally graduating from college has given me a little more time. Now I put the audio components in the car. Thanks to some members over at mp3car.com, I selected a Pyle 4-Channel 800-watt waterproof micro marine amplifier and the appropriate wiring harness for my truck.

First, I removed the stereo. If you have a late-90s Chevy pickup like I had, you'll need to watch this video to remove the faceplate, and then disconnect the stereo harness and antenna to remove the factory stereo. Then before I could connect the amp, I had to splice the wires into the harness. Below is a picture of the in-car harness plug and the panel I later installed the volume knob on:
After removing the stereo
The harness came with a wire color code guide, which I'll reproduce here:
  • Yellow: 12 Volt Battery/Constant
  • Red: 12 Volt Ignition/Switched
  • Black: Chassis Ground
  • Black/White: Factory Amplifier Ground
  • Blue: Power Antenna/Factory Amplifier Remote Turn On
  • Blue/White: Factory Amplifier Remote Turn On
  • Orange: Illumination/Dimmer
  • Orange/White: Illumination/Dimmer
  • Orange/Black: Illumination Ground/Dimmer Ground
  • Brown: Mute/Not Used
  • White: Left Front Positive (LF+)
  • White/Black: Left Front Negative (LF-)
  • Grey: Right Front Positive (RF+)
  • Grey/Black: Right Front Negative (RF-)
  • Green: Left Rear Positive (LR+)
  • Green/Black: Left Rear Negative (LR-)
  • Violet: Right Rear Positive (RR+)
  • Violet/Black: Right Rear Negative (RR-)
The amplifier also came with a wiring guide, which can be found here. The most important part was getting the power right. Since I wanted to have it on only when the truck was on, I wired it in the following way:
Power wiring arrangement

The yellow wire (12V battery/constant) from the harness connects to the red (Battery + 12DC) wire of the amp, which is protected by a 10A fuse. The black (chassis ground) from the harness connects to the black (Battery -, Ground) wire of the amp. The red wire (12V ignition/switched) from the harness connects to the blue wire (remote turn on) of the amp. This configuration allows the amp to receive power only after turning on the ignition.

Next I had to connect the speaker wiring. The amplifier end has 8 wires with female bullet connectors (positive/negative for 4 channels). Unfortunately, I was not careful enough in checking the packing for the amp and ended up soldering my own male bullet connectors onto the harness speaker connections. Yes, the amplifier comes with male bullet connectors on wires that can simply be crimped together to the harness speaker wires. The colorings all matched up easily (Violet to Violet, Gray/Black to Gray/Black). As you can see in the below picture, the blue and orange wires are not used so I capped them with beanies to prevent a short.

Speaker wiring bullet connectors
Then I simply plugged the bullet connectors together and the initial setup is complete!
Completed wiring connections
The amplifier came with a volume control knob, and I had an open (unused) panel above the cargo lamp. So I drilled a hole in the panel, and attached the knob. The knob comes with adhesive backing on the back, so simply peel off the protective cover and stick it on there. The volume knob also shuts off power to the amp when turned all the way down.

Volume control knob installation

As you can see in the above picture, the cavity that held the stereo has no floor, and simply has the connectors for the volume control down below. So I made a floor out of some aluminum sheeting I had lying around. It is pretty thin, so I just used metal shears to cut out a 7" by 8" section:
Aluminum "floor"
The amp comes with mounting hardware (screws, lockwashers, and washers). So I drilled slightly smaller holes in the aluminum, and attached the amp towards the back of the plate.
Attached amplifier

Then the only thing remaining was to slide the sheet assembly into the cavity, attach the harness, and it worked flawlessly. Well, almost flawlessly. I have noticed in the past day some feedback on the line from the car's electrical system. So I will have to install a power filter at some point.
Installed amplifier (note dangling 3.5mm input)


Overall, the amplifier and harness worked excellently and I was happy with the fairly easy installation.

Status update:
Time spent (4 days): 15 hours
Cost expended (prices given include paid shipping): $173.32 ($50.53 + $122.79 previous. If you don't have spare aluminum and electrical beanies, you may have to spend a few dollars to buy some)

Sunday, June 24, 2012

Step 1: Testing Components

Now it's time to put the parts together. Since the Bluetooth module does not already have the pins installed, attaching those is the first step. I used a small piece of Category 5e Ethernet cable, since the Bluetooth module needs six pins, and a Cat 5 cable has six wires inside. So I soldered one end of the Cat 5 cable onto the BlueSmirf Bluetooth module. I would recommend using a pair of wearable magnifying glasses, and getting someone to hold the module. Soldering the wires takes a significant amount of precision, so make sure you don't melt any part of the board or make the solder bubbles contact each other.
Since we don't need two of the wires, I cut off the Brown and Brown/White colored cables, and used the following wiring setup:
Wire                      Pin
Green/White      CTS-I (for use of hardware flow control)
Orange               VCC (power)
Orange/White    GND (ground)
Blue                   TX-0
Blue/White        RX-I
Green                RTS-0 (for use of hardware flow control)

I used this site to help with setting  up the wiring. Since the Bluetooth module in my laptop is currently acting up, I paired it with my Droid Incredible smartphone. Once it was all hooked up, it paired with little problem. One difference between 'Step 4' in the link and what I had to do was that the module paired as RN42-C280 rather than BlueRadios, and the passkey was '1234' rather than 'default'. Final soldered module pictured below:

With no application installed on my phone, I tested the performance of the board while plugged into my laptop. First I installed a LED and a resistor on the board as described here, in the 'Blink' tutorial.
Since I didn't have a 220-ohm resistor, I installed a 470-ohm resistor and 560-ohm resistor in parallel, which yields an effective resistance of 256 ohms, good enough for the test. Following the other directions in the blink tutorial, the diode blinked with no trouble. Moving on to test the servo, using the 'Sweep' tutorial, I used another cat 5e category to lengthen the servo cable to reach each necessary pin.

The sweep program uploaded fine, but it did not work exactly as planned. The analog nature of the servo did not allow for the precise positioning, something I was afraid of. So it looks like I will have to invest in some digital servos. But a good start, and good to know everything works.

Status update:
Time spent (3 days): 11 hours
Cost expended (prices given include paid shipping): $122.79 (if you don't have resistors and Cat 5e cables lying around, you may have to buy some for a few dollars)



Thursday, June 14, 2012

Project Overview: Android Environment Control System

This blog's purpose is to document the construction of a car environment control system using an Android tablet connected to an Arduino microcontroller board. below is an image of the layout of the entire project:


I am looking at using the Google Nexus tablet, once it is released, but its use will depend on the final technical specifications upon release. Price is also a major consideration, as this will only be used for running a simple app and music playback. Final determination of the tablet for use will be made at a later date, but the required specifications are:
7" or 7.7" multitouch screen
Android 4.0 ICS OS
8GB Internal storage
Removeable microSD or SD card slot
Bluetooth module

The board I am using is an Android ADK version of the Arduino MEGA Board ($60.95). So far, I have only purchased one Servo ($18.25), in order to test to ensure it will work with the proposed system. This servo has 360 degree rotation and analog control. I may need to change to a digitally-controlled servo, depending on how precise a positioning system I need. I am also using a Bluetooth module ($43.59), which as of this writing has not arrived.
Board picture:


Servo picture:


The vehicle that this system will be installed on is a 1998 Chevrolet K1500 Silverado pickup. It has the factory stock stereo and environment controls built in. Initially, the plan was to connect directly to the car's computer system rather than physically manipulating the dials, but this was dismissed as being too difficult and having little benefit. Hence the use of the servos. Picture of the current configuration:

 I have done some coding, but only a little, and it is not stable or even tested, as I'm new to both Arduino and Android development.

Status update:
Time spent (2 days): 9 hours
Cost expended (prices given include paid shipping): $122.79


Interested in helping? Contact me through my Google+ profile on the sidebar.