Wednesday, March 12, 2008

Red, Green, White LEDs

Our original circuit design used a dual-colored LED (red/green) as an idicator to signal the crossover of a voltage on the comparitor (if that makes any sense). The problem, as seen in the graph below, was that for a given voltage, the currents across the different colors varied significantly. This caused a problem in that when the red/green LED switched colors, it would cause the white LED on the end of the shaft to dim or go brighter. For obvious reasons, this is not good. We need a constant light source.

So I decided to use two discrete LEDs in hopes that I could put different resistor values in series with each of them, thus providing equal current drain.

This last week we got the LEDs and I built the circuit and it works. Previous current drains were up in the ~20mA (for green) and ~30mA (for red). Now it's closer to 6mA for both colors.

Just a note: The opamp swings different amounts in both directions. I don't know if this is a problem or what exactly is causing it. My guess would be that the resistor values on the voltage dividers aren't exactly equal, resulting in the power supplies being skewed.

So I hooked the two leds up (separately) to a variable resistor, set the resistor value to yield an appropriate3 intensity and current measurement, and then measured the variable resistor to figure out what value of discrete resistor I should use to yield the desired results.

Red: ~8k
Green: ~3.3k

Using these values, like alluded to above, I measure the current drain of the entire circuit and found it to be very stable.


Now a note about white LEDs. The white LEDs we have are super bright and they only draw 1-2mA (compared to ~3mA for the red and green ones). It makes me wonder if we should (can) use a coupled of white LEDs with cheap filters over them (think red cellophane) instead of the colored ones.

Thursday, March 06, 2008

Django on Ubuntu Gutsy

My first steps at Django

sudo apt-get install libapache2-mod-python python-django
sudo apt-get install mysql-server python-mysqldb
sudo /etc/init.d/mysql start (the previous line upgraded mysql and didn't restart it)

cd /home/username_here
django-admin startproject mysite
cd mysite
./ runserver

[I opened up a putty session forwarding my localport 7145 over to localhost:8000 on the ubuntu box]

in firefox: http://localhost:7145

Wednesday, March 05, 2008


For my ME Capstone course, I'm building a distance sensing circuit which will throw a dual colored LED on way or the other depending on which site of a distance threshold the tip of the device is at.

Currently, we have a potentiometer to calibrate the device in one location and we're thinking of moving to another location with the hopes of making the device 'totally calibratable'. This is in an effort to compensate for variances in photoresistor performance.

So, I'm going to run a parametric sweep simulation to show my how the device switches for the configuration we have now, and then I will run the same simulation, moving the pot as shown above.

Here are the results from my first simulation.