» pages: blog | About Me | projects | Resume |

Greenovation at RIT

projects, wind power — davidb — January 18th, 2009

A couple of friends of mine have started a new website dedicated to “Greenovation” (http://greenly.tv/). Being RIT students, a decent amount of their content is dedicated to programs/projects happening here at RIT. I know I don’t keep up with as much of these kinds of projects as I would like, so it is going to be nice to be able to follow it. I strongly suggest you check it out.

Wind Turbine at RIT

Also, if you follow my blog, you have probably read about the wind-powered wifi repeater my friend Dan Lampie installed on campus at RIT last spring. RIT administration decided to take it down after the Imagine RIT festival, so he has been trying since the fall of this year to reinstall it in a better location. A few weeks before Christmas he finally got all of the permission he needed and I again helped him set it up. We probably couldn’t have picked a worse day to install the turbine (in the middle of a blizzard). However, it went quite well. About a week ago, disaster struck. Well, not really. The only stakes we were able to get were no more than about a foot in length. Due to the nasty weather conditions last week, one of the stakes was ripped out of the ground and the turbine fell over, snapping one of the blades as it fell to the ground. So, Dan asked RIT Facilities Management Services (FMS) to provide us with some better stakes. The stakes out there now are 6 feet long and, barring a hurricane/tornado, are not going anywhere. So, now that the wind turbine is up and running again, he has ordered a new omni-directional atenna, some bigger batteries, and a solar pannel so that the batteries will still charge on non-windy days. He has a bunch of great ideas on what to power with the turbine, so I am really looking forward to seeing what comes out of it. I’m also going to help him out with some monitoring circuitry (a microcontroller to monitor current/voltage/power). More information on his turbine is available on his website.

BarCamp Rochester 4

barcamp — davidb — January 5th, 2009

BarCamp Rochester 4

Great news! BarCamp Rochester 4 has confirmed the date of April 18, 2009. I registered two domain names (barcamproc.org and barcamprochester.org) and our website is up, running, and ready for attendees to sign up. So, if you or someone you know is going to be in the Rochester area, please sign up on our wiki. We’re also currently looking for sponsors. If you think your organization may be interested in helping us out, please drop me an email.

toggle headphones/speakers key via xbindkeys

linux — davidb — December 5th, 2008

I’ve been using xbindkeys for a few years now to create keyboard shortcuts on my computer. It’s super useful, and a quite easy way to get the multimedia keys on my keyboard to do what I want. A quick tutorial on xbindkeys:

First, install it

sudo apt-get install xbindkeys

Then, run the following in a console to grab input for a specific key press combination.

xbindkeys -mk

Select the window that pops up, type the key, and on the console you should see some output something like this:

"(Scheme function)"
    m:0x10 + c:98
    Mod2 + Up

Copy and paste that into your .xbindkeysrc and change “(Scheme function)” to “foo” where foo is the command you would like executed. Quit that, run xbindkeys, and whenever you type that key combination, foo will be executed.

So, a few months ago I bought a pair of 2.1 speakers for my computer. In the past I’ve only used headphones, so being able to lie in bed and watch movies/listen to music was very nice. However, I tend to work late into the night and my room mates don’t exactly appreciate my loud music. So, I still use headphones occasionally. The problem is I don’t want to have to unplug the speakers and plug them back in every time I want to use headphones. Luckily, my sound card has multiple line outs. So, a combination of amixer and xbindkeys allows me to simply hit a button on my keyboard to switch between the headphones and the speakers.

Here’s the snippet of my .xbindkeysrc that does this work:

# favorites button - toggle headphones/speakers
"amixer set Surround toggle; amixer set Front toggle"
m:0x10 + c:230
Mod2 + NoSymbol

what I’ve been doing..

VLSI, fpga, projects, uController — davidb — November 16th, 2008

I’ve been extremely busy the last 10 weeks. I decided it would be a good idea to take 4 graduate level computer engineering classes (3 project-based) at the same time. Guess what – it’s not. But, I made it through and I’m pretty damn proud of myself. So, since I think it’s pretty interesting, I decided to post what I’ve been up to the past couple of months.

First, the most recently completed project – VLSI. For my project, my partner and I had to design and layout an 8-bit Brent-Kung adder with BIST using TSMC 0.35 micron N-Well process technology. What’s that? Well, an 8-bit adder is a device that adds two 8-bit numbers. Brent-Kung is a specific type of tree-adder (defining the way the circuit is organized) that is used as a basis for many other tree-adder networks as it attempts to minimize wiring tracks and fanout gate count. BIST stands for built-in self test, a mechanism that allows the circuit to test itself. The final area for the entire circuit (8-bit BK adder with BIST) was 28,757 square microns. Any one extra interested in this can read my final report. For fun, and to show how one goes about doing physical layout, here’s some pictures of our final layout. First, the adder with BIST. On the left is the adder/BIST on the I/O pad. On the right, the adder/BIST itself. For a closer view, just click on the image.

PPA8BIST on IO Pad

Next,the adder layout. Note: that space at the left top and bottom was on purpose: it’s for the DFF.

PPA8 - BK adder

Next, everyone’s favorite ASCII art: the “I passed LVS check mark/smiley face.” For those not-so-familiar with VLSI/Mentor Graphics tools, LVS stand for layout versus schematic. That means it compares my wonderful layout (those colorful polygons seen above) versus my schematic to ensure the extracted netlists from both the layout and schematic match. The schematic is functionally verified to work correctly by simulating it. In theory, if the schematic works and the layout passes LVS, the circuit should work. However, post-layout simulations should be done as well.

LVS

When we finished the layout, we printed it to the 36″ plotter. Naturally, I hung my masterpiece on the wall above my bed.

Plot of PPA8BIST proudly hung above my bed

The next project of interest: the heart rate monitor. The point of the project was to implement a complete automatic data acquisition system. (sensors, signal conditioning, analog-to-digital conversion, uController, and finally digital-to-analog conversion). The sensor for the system that we used was an opto-isolator. It works by emitting IR light through an LED that is then picked up by a photo transistor. So, for the heart rate sensor, a human finger rests on top of the opto-isolator that produces a varying voltage as a result of the blood flow through the finger. This signal is quite noisy and quite low in amplitude, so it was connected to an amplifier and low pass filter. Because the ATD we used requires 0 to 5V on the input, we added a final stage to level shift and amplify the signal to that range. This was then connected to the input of an HCS12 microcontroller programmed to calculate the heart rate and display it to a monitor via serial connection. If you’re interested, we made a poster displaying the schematics and a bit more detail on how the system works. You can take a look at that here. Here’s a picture of the final circuit and my beautiful finger.

Heart rate monitor circuit. Notice my finger!

And, just to prove it works, here’s the oscilloscope output.

Heart beat oscilloscope output

The final project I’ve been working on is an implementation of a median filter on a FPGA. Median filters are used to remove salt and peppering effects from an image. The system interfaces an external memory chip to the FPGA and connects to a PC via a parallel port. A program from a computer sends the gray-scale PNG image to the FPGA. The FPGA then processes the image and sends it back to the PC. The project was done using VHDL and the FPGA was a Xilinx Spartan II. In addition, a histogram stretching algorithm was implemented on the FPGA. Histogram stretching is a form of contrast enhancement. Once the median filter was successfully implemented, the histogram stretching algorithm was quite easy. Unfortunately, there’s no pictures for this one. This was a long quarter, but now I get 2 weeks to relax and work on a couple of my independent projects before I dive back into the school work.

debian dual monitors with nvidia twinview

linux — davidb — October 10th, 2008

I recently bought a touch screen off ebay. I hooked it up to my laptop and tested it to make sure it works. It does (only one dead pixel)! The next step was to hook it up to my desktop in a dual head configuration. This wasn’t difficult to do by any means, but it was a little bit tricky finding the option to set the screen order in TwinView. I have two monitors (one LCD w/ DVI and the touch screen TFT with VGA). By default, the Nvidia driver sets any VGA connection to screen 0. With a bit of digging, I found the “TwinViewXineramaInfoOrder” option from Appendix D of the Nvidia Linux Driver Readme/Install Guide:

Option "TwinViewXineramaInfoOrder" "string"
When the NVIDIA X driver provides TwinViewXineramaInfo (see the NoTwinViewXineramaInfo X config option), it by default reports the currently enabled display devices in the order “CRT, DFP, TV”. The TwinViewXineramaInfoOrder X config option can be used to override this order.

The option string is a comma-separated list of display device names. The display device names can either be general (e.g, “CRT”, which identifies all CRTs), or specific (e.g., “CRT-1″, which identifies a particular CRT). Not all display devices need to be identified in the option string; display devices that are not listed will be implicitly appended to the end of the list, in their default order.

Note that TwinViewXineramaInfoOrder tracks all display devices that could possibly be connected to the GPU, not just the ones that are currently enabled. When reporting the Xinerama information, the NVIDIA X driver walks through the display devices in the order specified, only reporting enabled display devices.

Examples:
“DFP”
“TV, DFP”
“DFP-1, DFP-0, TV, CRT”

In the first example, any enabled DFPs would be reported first (any enabled CRTs or TVs would be reported afterwards). In the second example, any enabled TVs would be reported first, then any enabled DFPs (any enabled CRTs would be reported last). In the last example, if DFP-1 were enabled, it would be reported first, then DFP-0, then any enabled TVs, and then any enabled CRTs; finally, any other enabled DFPs would be reported.

Default: “CRT, DFP, TV”

So, with that, it’s pretty easy to do. I set it to “DFP” and it now works great! For reference, here’s the device section of my /ect/X11/xorg.conf:

Section "Device"
        Identifier      "Configured Video Device"
        Driver          "nvidia"
        BusID           "PCI:1:0:0"
        Option          "RenderAccel"
        Option          "TwinView"
        Option          "TwinViewOrientation"      "LeftOf"
        Option          "TwinViewXineramaInfoOrder" "DFP"
EndSection

alsa + mpd + flash sound fix

linux — davidb — September 12th, 2008

So I’ve had a problem for a while and haven’t bothered looking into it until now. When a web page loads flash with sound, it either: a) doesn’t play if mpd is playing or b) prevents mpd from playing sound unless I close firefox. Obviously this was an extremely irritating behavior. I thought it was something to do with flash using the wrong sound driver, but it was right.

I finally actually looked into it. The fix is quite simple and painless. I had to configure mpd to use dmix (the alsa software mixer). All of the instructions are clearly laid out on the mpd wiki. Enjoy! (NOTE: For those unfamiliar with mpd it is music player daemon, my music player of choice. Check out their wiki for more information).

As an added bonus, I just learned RIT has a debian mirror: http://mirror.rit.edu! Thanks to the RITLUG, I can now fetch my upgrades much, much quicker.

oh boy, it’s been a while!

Uncategorized — davidb — September 5th, 2008

So, I’ve only had about three months of down time. Pretty good, right? The problem: I had been hosting my website off of my desktop for a few months, but when it came time to move out to California for the summer, I realized this wasn’t going to work. I bought another computer to use as a server and left it with a friend. Unfortunately, there were a few hardware compatability issues with my hardware and my friend didn’t have much time to mess with it. Now that I’m back in Rochester, I spent a few days configuring the machine and now my machine/website is back up!

proprietary fpga dev board + linux

fpga, linux, projects, virtualization — davidb — May 12th, 2008

For my Digital System Design course I was given the option to do the standard labs (about 3 labs and 2 projects: a vending machine controller and a BIST) or implement my own project of similar complexity. I decided to go with latter as it sounded like a good learning experience. So, I wrote up my proposal and got my FPGA board: a Digilent BASYS. For my project, I decided to implement a clone of the popular 80’s Simon game by Matel.

I wanted to be able to work on this project from home, so I went ahead and downloaded Xilinx ISE Webpack from http://www.xilinx.com. I run Linux (specifically Debian) as my primary OS, so I installed the Linux version of ISE. The install certainly could have gone smoother (it seems to be targeted more towards RedHat), but thanks to a bit of research I was able to get it running smoothly. Unfortunately, Digilent (the maker of the development board I’m using) only has a Windows version of their software for programming the FPGA. I thought I was out of luck and would have to develop on my machine and then use a Windows machine to actually program the FPGA. But, thanks to VMWare, that’s not a problem.

The only thing that I have really missed since I completely switched over to Linux about a year ago is Microsoft Office. Open Office just doesn’t do it for me 100% (especially given the amount of .doc and .docx files I get from professors here at RIT). So, I run VMWare Server with XP as a guest operating system to address that problem. This way, I don’t have to reboot to open a word document or write a paper. This is also useful as it allows me to run a bunch of other Windows-only applications without the any real hassle.

That’s definitely spiffy, but what’s even cooler is the ability to share physical hardware between the host and guest OS. I can map a USB controller to my guest OS that will give me the ability to use USB devices in my VM just as I would if I were running WIndows nativelly on the machine. Long story short – this nifty feature allows me to install Digilent’s programming software in Windows and program the FPGA without rebooting.

wind-powered wifi AP repeater

projects, wind power — davidb — April 22nd, 2008

I can not really take credit for this one, but a couple weekends ago I helped a friend of mine, Dan Lampie, set up a wind turbine here at RIT (check out his website for more details). Dan has been talking about/working on this project for about a year now (well, he started it last year at least). Last summer he sent me a couple of pictures of the turbine set up in his backyard. It was more or less the same set up that he has now, only the previous iteration was just being used to power a light bulb (and to measure what kind of power it can supply). Dan built the whole thing himself along with a bit of advice from a professor and some internet forums. It is quite impressive and (at least to me) surprisingly not terribly complicated to do.

He wanted to set it up at RIT for Imagine RIT: RIT’s Innovation & Creativity Festival (on May 3rd, if you are in the area, check it out). After about half a year of red tape and bureaucracy (literally 100s of emails), he finally managed to get RIT’s permission to install it on campus. Dan drove up for the weekend from Boston (where he’s currently interning at Cisco) and asked me to help him set it up. We took a bunch of pictures, so here’s a few. This first one is after we got most of the stakes down, when we were installing the turbine itself onto the post.

Ataching the turbine to the post

I’m the one with my back turned to the camera, Dan is in front of me, and Chris (who also offered to help) is the one in the brown sweatshirt.

Almost there..

The next step was just to stake everything down. You can’t really tell from the picture, but the ground was extremely wet as it had been raining quite a bit. The stakes went in rather easily, but we were covered in mud by the time we finished.

Electronic guts. Two 12V batteries and a circuit to limit the charge

This picture shows the electronics that make the whole thing work. Dan built the charging circuit himself. Essentially the windmill recharges two 12V batteries and the circuit exists to make sure it does not over charge them. The wireless AP/repeater (not in the picture) is connected to the battery terminals. We “waterproofed” it using plumber’s putty, the platic tuperware box, and that metal box that Dan got off ebay). It is not exactly environmentally tested, but the components are rugged enough that they should be fine even if a bit of water gets in there from humidity/condensation.

The finished product

There’s Dan standing proud with his finished product. As you can tell from the picture, when there’s a big gust the blades spin pretty fast. Standing right underneath it was kinda scary, but it is very stable. The location is not ideal for a wind turbine because the trees/buildings shield it from the wind, but it still works. The building behind him is Gracie’s (the main RIT cafeteria on the dorm side of campus). The turbine’s AP gets the wifi signal from there and then broadcasts it down the “quarter mile” (RIT’s main walkway from the dorm to the academic side of campus). We haven’t done too much extensive testing of it, but it does work. Dan will probably be up here before the festival to do a bit more tweaking of the project. It’s certainly cool and goes along with the seemingly “new trend” of eco-friendliness/”going green.” If you are interested in doing something like this yourself, there is a vast amount of resources online (search diy wind turbine) or contact me and I can get you in touch with Dan.

my router plays music!

projects, wireless boombox — davidb — April 17th, 2008

I think I mentioned this project in a previous post, if not here it goes: I plan to make a wireless, portable internet boombox from a bunch of parts I scrounged up/have had lying around my house for a while. I bought a Netgear WGT634U wireless router off of ebay for ~$30. The reason I went for this particular model is that it comes with a USB port on the router itself. This was really useful since it allowed me to buy a cheap USB sound card off of ebay (~$5). This, combined with an old Magnavox boombox that I have had for years, will form my wireless boombox. My goal is to have it be completely battery powered, but that may not be 100% feasible.

As soon as I got the router, I spent a few hours installing and configuring/playing with OpenWRT. Unfortunately the sound card shipped from Hong Kong, so I had to wait about a week for it to get here. It finally arrived yesterday and as soon as I got a chance today, I hooked it up and started streaming my music over the air.

Wireless Boombox

There’s a picture of the setup I have so far. I took the top of the router off to start messing around with it and haven’t put it back on yet. That little thing jutting out of the back of the router is the USB sound card. The boombox does not have an aux in port, so for now I ripped apart a really old pair of head phones and attached the leads to the tape deck head. I don’t have long enough screwdrivers to take apart the boombox yet, but once I do I plan to take out the electronics for the cd player and enclose the router in the boombox. Also, I will attach the headphone leads more permanently (likely replacing the cd player module’s connections). The other thing I need to do is find an appropriate battery to power this set up as I would really like it to be truly wireless.

Once all of that is out of the way, the only thing left to do is to figure out how to control the thing. I plan on using mpd/mpc for the music player software, but having to ssh to the boombox to get it to play music somewhat defeats the purpose. The router does have a serial console port, so I may end up wiring the buttons on the boombox to change the song and use a c program to monitor it and trigger the appropriate mpc commands. Another option/additional feature might be setting up a very simple webpage that I could view from my phone that displays information about the current song and allows the various playback controls. I don’t have one of those fancy smart phones, but my phone should be able to support something like that. Besides that, I could also have a fancier AJAX-y web interface (but again, that seems to defeat the purpose). I am looking forward to finishing this thing up, but I have quite a bit of school work these next couple of weeks so I’ll see how it goes. The weather’s getting nicer outside so I’d really like to get this thing together and use it at a BBQ.

Next Page »
(c) 2009 david-brenner.net | powered by WordPress with Barecity