Tuesday, September 29, 2009

DMSS Notes 3

Today we made a two simple circuits which involved getting a LED to work. The first one was simply putting the 5v through a resistor and LED to ground. This lit up the LED. In the second circuit we powered the circuit through a pin in an arduino which was controlled by a switch. We fed a wire from the switch to pin 5 in the arduino and depending on if it was high or low it turned on power through pin 10. I got mine to work after making the mistake of putting the switch the wrong way around. Duh!



Without button pressed
With button pressed



Monday, September 28, 2009

DMSS Notes

Voltage:

Voltage is the pressure of the electricity. It is measured using a Voltmeter.
Another term for voltage is Potential Difference.

Current:

Current is the measure of the amount of electricity that is flowing. Or the Flow of the electricity.

The flow of electricity is measured in the unit Amperes

Resistance:

Resistance is the measure of how well it resists the flow of electricity. Resistance is measured in Ohms.


WATER PUMP ANALOGY


In this simple system two parameters are important: the pressure of the water (determined by how powerful the pump is) and the amount of water that can flow in the pipes (determined by the size of the pipes and the resistance that the wheel will oppose to the stream of water hitting it).
If you want the wheel to spin faster, you need to increase the size of the pipes and increase the pressure that the pump can achieve. Increasing the size of the pipes allows more water to flow through them, and by making them bigger we reduce the resistance they oppose to the flow of water. This works until the wheel won’t spin any faster because the pressure of the water is not strong enough. This is when we need the pump to be stronger.
In turn, this works until the wheel falls apart because the water flow is too strong and destroys it. You’ll notice that as the wheel spins faster, the axle will heat up a little bit. No matter how well we mount the wheel, the friction between the axle and the holes it is mounted in will generate heat.
It’s important to understand that in a system like this, not all the energy you pump into the system will be converted into movement. Some of it will be lost in a number of inefficiencies (generally as heat emanating from some parts of the system).
The important pasrts of this system are therefore: the pressure produced by the pump, the resistance that the pipes and wheel oppose to the flow of water and the actual flow of water (represented by the number of litres of water that flow in one 15 of a second).



OHM
S LAW

R (resistance) = V (voltage) / I (current)

V= R * I

I = V /R


How to read a resistor


















Sensorwiki.org

Resistive Sensors
Flexions = (flexpoint) - bendsensor
LDR = light dependent resistor

FSR = force sensitive resistor (pressure)
Thermistors = temp


Arduino

Arduino refers to three separate tools. First, there is the Arduino controller, which exists in several forms, from large to small, Second, there is the language and compiler, which creates code for this microcontroller and finally, there is the Arduino programming environment, which is like the Processing IDE, its is a simple open source IDE built in Java.


Links

http://todbot.com/blog/
http://www.avrfreaks.net/
http://del.icio.us/popular/arduino
http://www.ladyada.net/make/
http://www.arduino.cc/en/Main/ArduinoBoardLilyPad



Example of code
// Blinking LED

int ledPin = 13; // LED connected to digital pin 13

void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}

void loop()
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
}