Sunday, December 11, 2011

Audio Delay

I've always wanted to build an audio delay box, something that would take an audio input (mono or stereo) and delay it by some variable amount (user determined). Why? Because when I've watched the Saturday afternoon game and the baseball playoffs for my home team (SF Giants), I realize just how lousy those national league announcers are. But, playing an out of sync radio broadcast with the TV broadcast is the stuff of nightmare. The radio is always ahead of the TV broadcast because the radio is transmitted locally and the TV broadcast goes around and around, up and down, cable, satellite, whatever.

So, I need an audio delay device. The Arduino family seems like a great place to start building such a device. Just before starting to build this project, I looked around to see if anyone had built one of these. There are plenty of options for products between $60 and $200 that delay between 1 second and 1 minute. I found one product that could delay up to 20 minutes.

I only need a delay of max 5 seconds, but I'm an engineer, so as big as I can make it will make me happy. Plus, I need to build it for less than $60 in parts, or I might as well buy it. Actually, that's not exactly true, any cost over $60 pays for my enjoyment in building the project, but you get what I mean.

If I use the Arduino (or the Mega) that's half or all of my budget, so this engineering process should get interesting.

I have a few ideas for designs and will make follow up posts detailing them with some pros and cons. In short, here's what I've thought through so far:


  1. ADC -> MEM -> DAC + CPLD/FPGA + Arduino
  2. ADC -> Flash Mem -> DAC + CPLD/FPGA/Arduino
  3. ADC -> MEM -> DAC + Arduino Mega (which has lots of address pins)
  4. Delta-Sigma Modulator + Delay Queue (implemented w/ Arduino + majolsurf mem expansion)
For MEM, I was thinking of an old DDR2 board.

Basically, the designs come down to some combination of the following elements:
  • An Analog to Digital Converter that outputs one or two channel (mono v. stereo) and 1 bit or N bit (generally, 16 bits). However, even the N-bit ADCs really stack up 1 bit outputs and then release them as N bits, but on a serial line! Therefore, the N-bit ADCs are simply bursty one bit ADCs. None of them have 8 or 16 parallel output, so their output needs to be thrown into a shift register if to be used in parallel.
  • A Digital to Analog Converter (1 bit or N bit). If data held in parallel, then it needs to be placed in an SR and sent to DAC, serially. N-bit DACs don't accept input in parallel.
  • Memory
    • Flash memory accepts input as a bit stream and it should be in page chunks, that is, written or read sequentially. Flash memory really isn't meant to be Random Access, or least NAND based flash isn't.
    • DDR2 has some interesting requirements (a section of low addressed memory that is off limits for storage) and 200 PINs to drive or read. The Arduino Mega could run a DDR2 board.
  • Data Transfer Protocols
    • I2C or SPI or Parallel or NIH (Not Invented Here or Roll My Own).
    • The challenge of the first two are lack of familiarity and/or speed limitations.
    • The challenge of the second is a heck of a lot of wiring - ugh!
    • The challenge of the third is inventing a stable (serial) protocol better than I2C or SPI.
  • Delay Control - one or two knobs that allow the user to dial in a delay (coarse/fine grained delay). It would be great if the delay could be from sub microsecond up to limit of the system. Also, if the system delay maximum is large, the coarse grained control should be non-linear in response (smaller steps closer to zero).
  • Display Delay - it would be nice if the user could see how much of a delay the system was using.
  • Controller/Control Signaling - somehow, all of these elements need to communicate with each other and do the delay work.
In the end, the system converts analog voltage levels into frequency bit streams that get delayed then returned back into a voltage signal. Everything else is just implementation.

Sunday, December 4, 2011

Hardware Hacking

There are some fabulous hardware devices out there for hardware hacking - it warms my EE heart. Having been out of the field for decades (really, only played with this stuff in college and high school), I'm enjoying getting back into things.

That said, folks who've never studied the material before can still play.

First, get yourself and arduino or similar device.

Then, learn some basic electronics - youtube is a great place to start.

Then, build and enjoy...

Tuesday, November 29, 2011

Watch a Memory Bit Switch

Want to watch a memory bit flip at the atomic scale?

Calling all my fellow EE's and any other physics/geek aficionados, check out this 5 min interview explaining latest research in ferroelectric memory. Why is it cool? Because you can see the material change state (the field sweep) through the memory layer. Bonus: this imaging of the process was unexpected, current models do not represent this effect. They need to be revised. So cool.

http://www.youtube.com/watch?v=7I-G9TzfDYY

Don't know about that youtube title - I doubt this effect is "real time". It has to have been slowed down.

Thursday, October 27, 2011

Great Post - My Sentiments Exactly

This post on Seeking Alpha represents my feelings on the market at this time.

The point by point summary (see post for explanation):

1. Not enough money for bond guarantees. 2. Covers financing needs through mid 2013. 3. A 20%-25% guarantee is insufficient. 4. The guarantee is not credible. 5. Germany doesn’t want to assume risk as guarantor. 6. Outside investors will not participate meaningfully.7. Bank recapitalizations not credible.8. Core credit risk. 9. Insane cost.10. EFSF as preferred creditor. 11. Fake Brady Bonds.12. No restructuring. 13. Reference interest rates too high. 14. Without ECB money creation, any plan will fail. 

From the conclusion.
Thus, I believe that the correct posture at the moment is for investors to be entirely in cash, or at least equity neutral via paired trades and/or hedges...  The question is this: Do you have the courage to stand aside and possibly leave 10%-20% or even 30% on the table? Or would you rather not take the “risk” of missing out on that gain -- even if it means assuming the possibility losing 30%-50% when and if the European plan unravels?

Tuesday, October 25, 2011

November 5th

V day, change your bank account day and the day, allegedly, that Anonymous will go after Fox News.

Friday, October 21, 2011

Prime Housing Market and BAC

There's some serious hating going on with Bank of America:

The first article discusses the possibility of a Bank of America default. The second and third articles are about a move of risky Merrill Lynch assets into the Bank of America holding company which contains Bank depositors money and is protected with FDIC. These two authors propose that bank deposits are being used as collateral for the derivatives.

Should B of A customers be worried? What about Merrill Lynch customers? What if your bank clears through BofA (e.g. First Republic Bank), should you be worried about that?

What does this have to do with housing? I'm not sure unless the CDS book that Merrill held includes a whole bunch of subprime, alt-prime and prime MBS?

On another note, after reading quite a bit in the blogosphere (and not sure if I'm just looking for bad news), but I've come to the, perhaps, cynical view that the Fed is holding interest rates low to protect large banks; that is, to keep them from failing. Why? Because banks get to keep assets on their books without marking to market. If interest rates go up, housing prices will fall (it's the natural way of things). Banks aren't in the business of managing real estate, they hold the property as collateral, but want to be rid of it as soon as possible. It seems they are trying very hard to not recognize bad loans by (1) holding back on foreclosures and (2) not marking to market. Also, (3) lobbying government to hold rates low to keep prices high is not a bad move.

Back that up you say? OK:

Here's an article that explores different options in the Mark to Market debate (#2).
It's pretty easy to find conspiracy theories that defend point #3.

On yet another note, here are two great articles on why right now (2011) is a bad time to buy an expensive house and how to determine if the house you're buying is too expensive (via prevailing rent rates): (a) terrible idea and (b) don't be suckered.

Finally, Zero Hedge believes Bill Gross front runs the Fed using contacts he has on the Fed. Here's an article proposing that he's buying up MBS because the Fed is about to start a program to do that (and he's trying to arbitrage that trade).

I've noticed that the PrimeX indexes have taken a breather from their downward plunge. Deutsche Bank put out a report on the PrimeX suggesting a BUY. Here are the last two paragraphs from that report:

Based on October 14’s closing PrimeX prices, we estimate that the market implied HPDs forARM.1, ARM.2, FRM.1 and FRM.2 are 16%, 19%, 27% and 30%, respectively. Those HPDscenarios are worse than most of the projections by market participants. Therefore, PrimeXindices are oversold at their current levels, according to our work.

Despite all the weak fundamentals and technicals, we believe that the PrimeX indices areoversold at current levels. The market-implied HPD in our analysis suggests that a massivedecline from current price level is not sustainable given the indication that future home pricedeclines have been mostly priced in. Furthermore, the high running coupons of the PrimeX indices are significantly more expensive to carry for shorting the PrimeX.

I'm not moved by this logic. The claim is that PrimeX is a buy because those default rates seem unlikely and shorts are too expensive (coupon). The coupon is only expensive if you don't believe there will be defaults.

Monday, October 17, 2011


Well, since I've first started watching this thing, it's dropped every single day. I caught Jeff Gundlach on CNBC last week (Strategy Session) who talked about this index and claimed that Hedge Funds were selling out of their leveraged positions in this and that was a likely cause of the drop in the index. He claimed there was room for 5 more points of drop (this was on Thursday morning, 10/13/2011). However, because banks didn't need to mark this index to market, you wouldn't see any changes in bank balance sheet values. Also, he said this CDS market only represented about $11B in float, so it isn't the huge $100B subprime market we had in 2008.


17-Oct-11 Overview
IndexSeriesCouponRED IDPriceFactor
PRIMEX.ARM.110.04427B579YAA395.042 [-4.770]0.408221747
PRIMEX.ARM.220.04587B579YAB182.458 [-6.584]0.436699618
PRIMEX.FRM.110.04427B57AKAA199.958 [-3.875]0.468172369
PRIMEX.FRM.220.04587B57AKAB987.875 [-6.000]0.488982221


So, explain something to me. How do banks avoid the need to mark assets to market prices? Right now, any (European) bank that owns PrimeX CDS and is using these assets as leverage just had the value of this asset fall 4-6% in seven days. However, if this really represents selling pressure only (double whammy of Hedge Funds and EU Banks divesting), then those on the buying end believe that the Prime RMBS market is great and they're getting a steal. If, on the other hand, Prime RMBS market is crap (or the loans underlying this index a crap, those are two different things), then the Hedge Funds and the EU Banks are getting out just in time and someone else will be left holding the bag.

Wish I had a crystal ball.