Tuesday, November 5, 2013

DIY F30 HiFi stereo upgrade for under $1000!

This post outlines a DIY stereo system upgrade for an (2012+) F30 - 3 series equipped with the standard HiFi system.

After doing a little research and specifically reading this bimmerfest post, I set out to do my own upgrade.  Just to clarify, I do have some experience installing car stereos and building speaker boxes so none of this was new to me, but if you follow this guidance, I'm sure a novice could pull it off.  I'm going to break this post up into the following 4 sections for ease of navigation: The Plan; The Box; The Install and Tuning.   Your specific needs may dictate which sections are more important to you but they're all here for your reference.  So here goes:

The Plan….
I didn't want to break the bank on this so I set my budget to $1,000.  As it turns out I managed to do it all for just under $700. I achieved this with a little help from Amazon (for amp and parts) and Craigslist for a second hand subwoofer.  My plan was to replace the factory amp with a clean 5 channel Class D amplifier.  I needed 5 channels because I wanted to send the high pass signal (above 200hz) to the 4 inch factory door speakers.  Send a band pass signal (between 80hz - 200hz) to the factory under-seat woofers, and still have a subwoofer channel (below 80hz) to send to the a true subwoofer in the trunk.
This is what I ended up buying…..
1 – Wiring Harness (via Technic on the bimmerfest 3 series forum) $90 via Technic
1 – JL Audio XD700/5 (5 Channel Amplifier with built in crossover) $419 Amazon
1 – JL Audio 12w3v3-2 (12 inch 2 ohm subwoofer) - $75 second hand via Craigslist
1 – JL Audio HD-RLC – (Remote level control for subwoofer output) $29 Amazon
¾ inch MDF, Carpet, Adhesive, Glue, Silicone, etc. - $70 Home Depot / Amazon

The Box...
So, I wanted true sub bass but didn't want to sacrifice too much space and needed to stay within budget.  I search for a while and settled on the JL Audio 12w3v3-2.  It's a high performance 2 ohm subwoofer that has good power handling (perfectly matched with the XD700/5 mono output), and only requires 1.25cu/ft of volume in a sealed enclosure.   After measuring my trunk and building a couple templates, I managed to come up with a rear-firing wedge shaped design that fits snug against the back seat and takes up minimal trunk depth.  Below is the detailed spec as well as some pictures of the whole process .



Started by taking measurements of the trunk and doing a detailed spec to ensure volume and displacement requirements were being met .


Then cut a cardboard template to ensure proper fit of the proposed design.


Then built a wooden frame to get exact piece sizes and cut angles.


Next bought the wood (3/4 inch MDF) from home depot and had most of the pieces pre-cut to save time.


Cut the angles and end pieces, wood glued / nailed (and screwed) all the pieces together to make the box.


Once dry, cut out a hole for the sub.


Cut hole for the wiring terminal and silicone sealed all the joints.


Sanded all the rough edges


Used spray adhesive to stick on the carpet.


Carpet on the ends and cut the seams clean.


Cut out hole for the speaker and tested the fit (like a glove!)


The Install...
As for the amp install, the first thing to note is that the wiring harness available from Technic (via the bimmerfest forum) is the key.  It exposes all of the factory speaker wiring (except the center channel), a switched remote turn on lead as well as low-level (RCA) inputs from the factory head-unit.  Technic also provides you with a fused 4 AWG power cable and ground cable with the appropriate battery and ring terminals.  This harness is well worth the $90.  It eliminates all the guesswork and is completely reversible with no side effects or cutting wires.

This harness also makes connecting the amp easy.  You can do most of the wiring outside of the car.


Once wired up it should look something like this (depending on your amp and speaker configuration).


Now for the car, I started by removing the floor board and battery cover in the trunk.


I used a panel pry to pop up the middle of each plastic push pin holding down the trunk lining.


Used a Torx screw bit to remove the tie down anchors.


Removed trunk liner to expose the factory amp (driver side well)


I flipped up the plastic lever to unplug factory harness from factory amp.


I then connected the power wire to the positive(+) battery terminal (be sure to remove fuse first!).  Then ran the power cable along the back trunk wall (below the latch).  It tucks nicely underneath the plastic trunk liner trim piece.


I then connected the ground(-) wire to the existing ground terminal bolt on the driver side wheel well above factory amp.  Once grounded, I re-connected the fuse on the power lead and used the factory amp mounting bracket (and Velcro) to secure the new amp in place.
 

I made sure to position the new amp directly under the removable plastic tray (driver side wheel well) so that I could make final tweaks without needing to remove the trunk liner again.


I then put everything back together, wired up the subwoofer and DONE!  Now time for the tweaking…..

Tuning (aka tweaking)...
Probably one of the most important parts of any stereo install is getting the relative levels and crossover points right. While there are general guidelines, and definite dos and don'ts, some of this is dependant on the type of music you listen to and your personal preferences.  Tweaking involves two main things. Setting your crossover points and setting your gains.

Setting your crossover points:
The main objective here is to send the right frequencies to the right speakers.  Being that I kept the factory speakers in place, I set my high pass filter pretty high because the stock door speakers are 4" drivers.  A HP filter of 200hz sounded best for me.
The 'midbass' drivers took a little more fiddling, they can technically reproduce low (sub) range frequencies but I wanted to leave that up to the true sub in the trunk so I ended up settling on a band pass range of about (BP 80hz - 200hz).
The sub channel low pass was set to LP 80hz.  I also used the 24db/octave setting to ensure a sharper cutoff of the higher frequencies to the sub woofer.  Being that it's a 12inch true sub, I didn't want it trying to reproduce any of the mid bass.  This configuration works well.

Setting your gains:
The goal here is to maximize volume while also minimizing distortion.  There are various tools that help you with this (CD's, voltage monitors, etc), but without these, you can just let your ears be your guide.  The first step is to set all your gains to zero, and focus on one pair of channels at a time.  Turn the volume on your stereo up to about ¾ levels and slowly adjust the gain until you start to hear distortion.  I like to dial it back a notch from there.  This again is a matter of personal preference.
Your results may very but I found that the amp powered the inside speakers just fine with almost no gain.

Being that I was using channels 1&2 for all 4 door speakers, I decided to play around with numerous wiring configurations.  I first tried to run the two pairs in parallel, but I found that the ohm load was too low and the gain had to be set to zero to prevent distortion at high volumes.   I tried again with just the front speakers (no rear doors) but felt the car was not 'filling' with enough sound.  I finally settled on a wiring the front and rear doors in a series configuration.  This increased the ohm load on the amp (and thus reduced the power to each speaker), but I was able to get all 4 speakers to run clean at relatively high volumes.  The amp has plenty of power to run all 4 doors in this configuration.  I settled on a gain of just about ¼ turn.
For the midbass drivers I settled on a gain of about 1/3 turn.  This allows the drivers to move plenty of air but not distort at high volumes.
Finally the sub, for this I settled on just under ½ gain.  This was probably a bit more than I needed but I kept this configuration because I also added the HD-RCL remote level control so I can make real time adjustments to the sub bass from the front of the car.  This allows me to change the relative sub bass level for different types of music.


Here are is a picture of the amp settings (just before I finished tuning the gains).

In the end I was very pleased with the result.  I managed to get VERY good sound for under $700 and had minimal space loss in my trunk.  Further, the entire system is reversible so I can put the factory system back together if I need to (if/when I sell the car).  I hope this post will be helpful for all you DIY'ers.  I'm always happy to answer any questions.

Saturday, November 26, 2011

Card Sweeping - Blackjack Card Counting in an Instant!

Now as most of you know, I'm not a big gambler. I rarely go to the casino and aside from the occasional options trade with my Roth IRA, I rarely put my money at risk. I guess you can call me risk averse. However, when I do wonder off to the casino, the only games I play are Poker (Texas hold'em) and Blackjack. I play these because I feel I somehow have more control over my destiny than with other games. With Poker this is pretty easy, fold the bad hands and only play the good ones. With Blackjack, however, this can be a bit more tricky, unless of course you know how to count cards. Now, I'm no card counting expert, I've read all about it and it's way too complicated to implement in real-time. Luckily, I found a short cut. I call it 'Card Sweeping'. And for the first time, I am making this priceless knowledge public for all to see! So here goes...

Your chances of winning a random hand of blackjack in a typical Vegas casino are approximately 49.36%. This assumes the table is dealing a 6 deck shoe and that you play by the book using Basic Strategy. When compared to most other table games in a casino these chances are pretty good. But the key to blackjack is not simply its favorable odds, but rather a player’s inherent ability to ‘tilt’ the odds in his/her favor. It’s been proven that card counting techniques work and if executed properly, can give a player a significant advantage over the house. While the details of card counting are beyond the scope of this discussion, the basic idea is this: If you can keep track of what cards have already been dealt, you can theoretically predict the likelihood of what the next cards will be. As a result you can increase your bet when the cards will be in your favor and decrease your bet when they won’t. True card counting however, can get quite complicated and requires you to keep a running count of every single card that comes out of the shoe. This can be challenging especially if you’re not particularly quick at math or if you've had a few too many free cocktails. Additionally, card counting is banned at most casinos so unless you’re an expert at being covert, I don’t recommend wasting your time. Fortunately there is an easier way.

By relying on the law of averages you can make sweeping assumptions about the running card count which can all but eliminate the need of ‘counting’ anything. Statistically speaking, my card sweeping technique performs just as well in simulations as even some of the most advanced card counting techniques. For those who are interested in the math, I use a modified version of the KO Rookie system and plug in some assumptions into a spreadsheet which enables me to adjust my triggers according to the players at the table and decks being used. I'm happy to explain in greater details for anyone who's interested. For the rest of us, here are the basics:

First of all, the pre-requisite for this technique is that you must use Basic Strategy for all your hits, doubles and splits. If you don’t already know Basic Strategy, I recommend reading the Wikipedia article and downloading the Basic Strategy reference sheet. Most casinos will allow you to use it at the table, so go ahead and print it out and bring it with you.

OK now for the good stuff:

Step 1:

Decide on 3 bet amounts (minimum, high, and max). These can be whatever amounts you want, but make sure you have enough in your stack to bet the minimum amount at least 10 times before you have to re-up. I usually start with the table minimum; double that for the high, then double that again for the max. (so $15, $30 and $60 respectively with a stack of at least $150).

Step 2:

Find a table with a 6 deck shoe and at least 3 players (excluding you and the dealer). Ideally you will be sitting at a table with 5 total players (including you and the dealer). 6 deck shoes are the most common blackjack tables in Vegas so it shouldn’t be too hard to find one. If you can’t find one with 3 players and six decks, simply refer to the spreadsheet for other deck / player options.

Step 3:

Place your first bet, your minimum. After all the cards are dealt, in one ‘sweep’ of the table, count the total number of 10’s or above(Face Cards and Aces) that were dealt. If your count is 3 or less increase your bet on the next hand. If the count is 4 or 5 keep the same bet amount, if the count is more than 5 reduce your bet.

Step 4:

Repeat step 3, increasing your bet each hand up to your max and decreasing down to your minimum based on the previous sweep count. Got it?

Let's Review... 3 or less 10's increase your bet, 4 or 5 keep the same bet, more than 5 decrease... That's It!

Step 5:

Walk away when you earned enough!


Please Note: The numbers change slightly with more or less players at the table and/or more or less decks but you can refer to my handy spreadsheet for adjustments. So good luck, and let me know how it goes.

Saturday, May 22, 2010

Jairou is Live!

I finally did it! I released Jairou, a long time goal of mine which I rarely find enough time to dedicate. Needless to say, I'm pretty pumped! For those of you who don't know, Jairou is a Java framework that allows you to build web based applications. In fact, I built gcaddy.com with it about a year ago. I think it's the best Java web application framework out there, but of course I'm bias. But regardless of whether or not it's the best, it's most certainly different. Here are a few of the things that make it unique.
  1. It's small, very small, in fact it's tiny! It's only 31kb total! That's right, I said kb. Most web pages are larger than that, let alone an entire server side web application framework!
  2. It's packed with features. You can literally build entire web applications with it and not need to code any custom features. gcaddy.com is proof.
  3. It's completely configurable (or rather declarative) via XML. It's based on the idea that applications should be configured, not written. Most of the code you need to write is included in the framework, so why write more.
  4. It's easy, you don't need to be a Java expert to use it. In fact, your better off knowing XML, Javascript and SQL, because most (if not all) the Java is done for you.
  5. It deploys as a J2EE compliant web application, therefore reaping the benefits and robustness of an enterprise grade platform.
There's more, but it doesn't make sense for me to ramble on about it. In fact I don't really care if anyone besides myself ends up using it. But if you're interested, feel free to check it out at jariou.org

BTW: The definition of jairou is 'Asiatic gazelle' hence the leaping buck logo.

Thursday, June 4, 2009

Lean HTML Fast!

This screen cast introduces Hyper Text Markup Language (HTML). Being that HTML is simply text, it can be written using any text editor, and viewed in any web browser. In this screen cast I perform the following steps...Fast! Feel free to pause / replay as necessary.
  1. Open notepad to create the most basic Hello web page.
  2. Save it as 'hello.html' and double click to open in a browser.
  3. Add a 'center' tag to illustrate the 'markup' effect.
  4. Add the 'head' and 'body' tags to make the document more standardized.
  5. Give the document a title.
  6. Add a line break after the word hello and a 'hyperlink' to an About page.
  7. Save document and refresh the browser.
  8. Click the hyperlink (notice the browser re-directs to the about.html page).
  9. Create the about page, save as 'about.html', refresh the browser.
  10. Click the About and Home links to illustrate the hyper linked documents.
  11. Re-open the 'hello.html' page to add more complex tags.
  12. Add an 'img' (image) tag and set the 'src' (source) to the url of the Google logo.
  13. Add a 'br' (line break), 'form' and input (text and button) tags to replicate the Google website.
  14. Save the document, and refresh the browser.
  15. Vwalla, you just built the UI for Google in under 5 mins!


Recommended online followup tutorial is Learn HTML from W3Schools.com

Learn how to code in 5 minutes!

This post is an introduction to a series of “How to Code” screen casts, each designed to teach the basic concepts of a given technology.  I’ve decided to use screen casts instead of online tutorials because they get the point across quicker.  Also seeing is believing and once you see how easy some of these technologies actually are, you will have the confidence to explore them further on your own.  The screen casts are NOT intended to give you a deep understanding of each technology, in fact they are designed to do just the opposite.  They are intended to simplify the technology to it’s fundamental core with basic examples you can quickly grasp.  Most start with a simple Hello World and elaborate until the primary concepts are addressed.  There are thousands of books and online references on these technologies where you can get further information and I will make an effort to include links to relevant references for each post. 

Additionally, the screen casts will be grouped logically such that one can get an entire overview of a related set of technologies within the group.  Grouped posts will also follow a recommended sequence which build on the concepts and examples of the previous screen cast within the group.  This will allow you to gain a broader understanding of the related technologies and how they “fit” together to address a larger technical domain.  

After watching a given screen cast and reading the post, please don’t hesitate to submit your questions and comments and I will do my best to answer them within the post or in a follow-on screen cast.  Happy Coding!

The following is an outline of my planned screen casts.  As they become available I will add a link here.  Feel free to bookmark this post and come back to see watch the latest and greatest.

Client Side Web Development

HTML

CSS

Javascript

JSON

AJAX

ExtJs 

Server Side Web Development

Intro to Server Side Web

JSP 

Database Development

Intro to Data Modeling

DDL

SQL

MySQL 

Object Oriented Programming

Intro to OOP

UML

Java   

Saturday, May 2, 2009

How I chose my own nickname

As all can see, my real name is Roger, but my blog title says Rush, so to clear up any confusion, I figured I'd write my first post about how the nickname Rush came about.  Everybody knows that the natural nick name for Roger is 'Rog', however what most people don't know is that my "real" name is not Roger, or rather not pronounced Roger.  Being that I'm from Lebanon (which was once a French colony), my mother's intention when she named me was to use the French pronunciation of Roger, where the final r is silent.  Little did she know the day after I was born would mark the start of a 17 year long civil war which would completely cripple the country and force our family to immigrate to the United States.  This ripple effect led to my name being mispronounced by my American peers my entire life.  

Needless to say, my mother never really liked it when my friends called me Roger, and I never really liked it either.  My grief, however was not from the English pronunciation of Roger, but rather the natural nickname Rog.  Rog is not a bad nickname, in fact I think it's kind of cool, but when you look Lebanese and you live in America and someone calls you Rog, far too often people mistake the nickname for the common Indian name Raj.  Anyway, as you can imagine, I got pretty sick of explaining to people that my nickname is not Raj, it's Rog; with a G, which is short for Roger, which is technically Roger, pronounced the French way; with a silent R at the end.  I know, this is getting complicated, but bare with me.   

By the 7th grade this got to be a bit too much for me to handle, so I decided to take matters into my own hands and come up with my own nickname.  The problem was that nicknames are not something you typically choose for yourself.  Nicknames are usually somthing you are given.  And even if you happen to choose a nickname and introduce yourself by that name, it is usually a derivative of your real name.  So how does one go about giving himself a nickname that has absolutely no relation to his real name?  Well, I don't know if I can answer that question for those of you looking to change your own nicknames, but here's how I did it:

It officially started on the first day of middle school, when my English teacher, Mr. Fletcher, was calling role.  As many teachers do on the first day of school, Mr. Fletcher asked the class to let him know if they wanted to be referred to by anything other than their legal name.  This is the time most William's say Bill and most Rebecca's say Becky and so on.  I usually kept my mouth shut, for if I said Rog, well... you know what would happen.  But this time was different.  As he was going through the role, I thought to myself. "This is my chance, I can finally change my nickname to anything I want!"

The problem was while I knew I wanted a new nickname, I didn't have one prepared, and I only had about a minute to figure it out.  I knew I had to say it with confidence or else the stern Mr. Fletcher would surely know it was a lie, and probably never use it.  I also felt it had to start with an 'R' or else it just wouldn't sound right.  At the time I was into hip hop music, and followed many of the up and coming artists of the late 80's who are now referred to as "old school".  Guys like Run-DMC, Public Enemy, and LL Cool J to name a few.  Anyway, not to bore you with hip hop history but many of these early artists had record deals with Russell Simmons (who happens to be Run, of Run-DMC's older brother).  Simmons, started a record company under the label "Rush Records", which eventually evolved into the world famous Def-Jam Records and Rush Communications empire.  Back when they were "Rush Records" I was very much into their music, and I thought "Rush... that sounds like a cool name", and just as the thought cleared my mind I heard Mr. Fletcher...

"Roger Ramia?" he called.

"Yes" I replied.

"Nickname?" He paused.

"Yes... Rush" I said confidently.

"Rush as in R.U.S.H?" He confirmed.

"Yes" I said trying not to smile.

And from that moment on, he referred to me as Rush.  In the beginning it was a bit weird because he was the only person who called me Rush.  Everyone who knew me previously as Roger still called me Roger or Rog/Raj.  I remember second guessing my decision and wondering "What have I just done?  How will I tell all my existing friends that I just changed my nickname to Rush?"  But by now it was too late, Mr. Fletcher was calling me Rush everyday, and I was far to embarrassed to tell him to stop.  Thankfully, over time, everyone in that class, even the ones who knew me previously, began to call me Rush.  Eventually it caught on to even my closest friends and relatives, until it became an true, bonafide nickname.  Little did anyone know I made it up, on the spot.  Mr. Fletcher, if you’re out there, I thank you!

Only after college when I started my career, did people start calling me Roger again.  These days, I just let it slide, but those who know me well enough still refer to me as Rush.  You can call me whatever you like, but just thought I'd finally come clean.