Monday, November 24, 2008

Some Assembly Required

You may have noticed that some of those components from last time can't actually be dropped into a breadboard as is. I should note at this point that I've never soldered anything in my life (yes, I'm a terrible person, I know.) But it had to be done, and I had these cute little header pin things that you can solder into the breakout boards and all...

It actually didn't go too badly. I only burned myself once! It's actually surprisingly easy, as long as you pay attention to what you're doing.





After that, I was all set to start plugging things into the breadboard. However...

Fail #1
So remember how last time I mentioned that taking the LCD out of the frame was a bad idea?

I had a good reason, I swear. Look at the connectors on that:

(the above image courtesy of sparkfun.com)


They're some sort of weird spring-loaded... something. So I took the LCD out of the frame to see if it connected to anything that was a bit easier to work with - but no.




You can just barely see the groups of iridescent traces coming up off of the black insulated rectangle. How is that even conductive?? Anyone know?

Since there obviously wasn't anything we could do with it out of the case, Mike and I tried to put it back in, so it wouldn't get accidentally broken.

Ahahahaha...





Why is it always easier to get things out of cases than back into them?

Fail #2

Oops. It doesn't fit. Either I need to find a smaller cheap low-power LCD (I can't imagine I'm going to have much luck), or another pocketwatch. The thing is, the LCD would totally fit in there - if I could just get it past the ring where the front and back screw on.


Anyway, after that I started throwing things on the breadboard - I'm going to build and test the entire system on the breadboard before I start getting serious about final assembly.


From left to right, the things you see are: the whatever-it-is that's providing 3.3V, the SD card reader (you can see the square metal socket), the Arduino (it takes up, what, half the board?) with the audio output jack on the very end. You can see the extra power rail I tacked on, too; I wanted to have an easily accessible 3.3V rail. (3.3V power is color-coded orange on my board - orange is like red, but, well, less so. (Red is the traditional color for power.) I also have 5V on there, so I wanted to make sure it was clear which was which.)




See that big blue clump of wires on the bottom? Apparently the arduino vaguely prefers to use particular pins to talk to the SD card. Just for reference, it's:
CS (chip select/slave select): pin 10
DI (data in): pin 11
DO (data out): pin 12
SCK (clock): pin 13



And since DI and SCK are coming from the Arduino, we have to run it through a voltage divider to get it to a value that's safe for the SD card. We may also have to do that for CS; I'm not sure. Here I just used a pair of 10K resistors (the peanut-shaped things between the SD card socket and the edge of the Arduino) for each to cut the voltage in half - 2.5 volts is within the acceptable range according to the SD card spec, so it's all good.


Me being all industrious and such.


Mike, my partner in crime, looking up datasheets for me.

And then, uh, I got home and realized that even as fanatically neat as my breadboards always are, I was going to be super cramped on that board. So I went home and pulled all the stuff out of another board I had from an EE class (which I failed, incidentally. I was terrible at the math. However, I had the prettiest breadboards in the lab!), hooked them together, and transferred everything over.



Complete with my pinout cheatsheet!

Unfortunately, I didn't hook up the SD card reader again, because I ran out of colors of wire that were not red or orange. I may need to go swipe a couple feet of various colors of wire from one of the labs. *cough* er... did I say that out loud?

One last note - see how there's a power rail running under the SD and audio out boards? I've actually got them hooked up to power and ground underneath, like so:





(Like I said, I ran out of everything that's not power-colored, so I used green. Green is the new black. Right?)

For next time, I'll hook it up to the computer and write some code to try to get the processor to talk to the SD card reader and the audio jack. (Although if you really want to see it, I'll share my experience of getting the equivalent of Hello World running on the Arduino.) I'm limited with what I can do with the audio until I get the decoder chip, but presumably I can send it a sine wave or something. Also, I haven't looked too hard at it yet, but this looks promising.

No comments:

Post a Comment