Show Posts
Pages: 1 [2] 3 4 ... 8
16  Using Arduino / Sensors / Re: recommedation for ultrasonic water level sensor? on: September 23, 2012, 08:58:14 pm
@gardner,

The air pressure sensor seems like the best solution to me. All you have to do is put a small water-proof bag at the end of an air tube and fasten the bag flat to the bottom of the tank. The water pressure will compress the air in the bag and pressurize the tube to the same pressure as the water. The air in the tube stays dry. The inside of the pressure sensor stays dry. Mount the pressure sensor outside the tank and it stays dry, too.

Tom
17  Using Arduino / Sensors / Re: Diode temp sensor help. on: August 11, 2012, 11:18:53 am
Sorry to break in, but I read these posts this morning and made a diode temperature sensor just now.  I had no idea you could do this!  I don't know the number of the diode I have, but it works great.  I'm watching the temperature drop a couple of degrees F when the air conditioner comes on, then slowly creep back up.  Thank you all for the information!

(edit - added my code)

Code:
// Diode Temperature Sensor, diode plus 10K resistor
// Written by Tom Fangrow, August 11, 2012

int hotVal=86;      // value with boiling water, 100 degrees C
int coldVal=256;    // value with ice water, 0 degrees C
float slope;

void setup() {
  slope=(coldVal-hotVal)/100.0;     // value per degree C
  analogReference(INTERNAL);        // 1.1 Volt reference
  Serial.begin(9600);
}

void loop() {
  int val = analogRead(0);
  float c = (coldVal-val)/slope;    // Celsius
  float f = 32+c*9/5;               // Fahrenheit
  Serial.println(f);
  delay(1000);
}
18  Using Arduino / Interfacing w/ Software on the Computer / Re: Serial monitor displaying junk. on: August 10, 2012, 06:35:32 pm
Quote
thanks for your replay but i mentioned that
PC BAUD RATE IS 9600".

I realize you said that, it's just that I got some of the same characters you mentioned in your first post when I set my serial monitor to 300 baud.  Hope you find a solution!   
19  Using Arduino / Interfacing w/ Software on the Computer / Re: Serial monitor displaying junk. on: August 10, 2012, 02:55:04 pm
By any chance is the serial monitor baudrate different than 9600?  They need to be the same.
20  Using Arduino / Programming Questions / Re: Converting String to binary code on: August 10, 2012, 08:55:04 am
You can do it like this.  In my sketch the least significant bits of each character are printed first, so the output will look a little different than what you posted.  Is that OK?

Code:
// Text to binary using serial monitor input
// Tom Fangrow, August 10, 2012

void setup() {
  Serial.begin(9600);         // open serial port at 9600 baud
}

void loop() {
  if(Serial.available()) {    // if anything on port
    byte c = Serial.read();   // read one character
    for(int i=0; i<8; i++) { 
      Serial.print(c%2);      // print the least significant bit
      c /= 2;                 // move to next significant bit
    }
  }
}
21  Using Arduino / Sensors / Re: Measuring speed of a motorbike wheel on: August 09, 2012, 09:02:10 pm
Sorry to hear about your mega.  Looking forward to the pictures of your project.
22  Using Arduino / Sensors / Re: String potentiometer on: August 09, 2012, 08:57:10 pm
This may sound stupid, but if you taped an optical mouse to your trombone, do you think it would sense and measure the movement of the slide?  I did something like that with an optical mouse and a syringe to measure the amount of fluid delivered.  Since you have nothing better at the moment, you could try that.
23  Community / Bar Sport / Arduino Grill on: August 08, 2012, 01:47:47 pm
A group of functions stopped for fast food at the Arduino Grill.  "What'll you have?", asked the waitress.  "I'll take a vanilla float", said the first.  "String fries for me", said the next.  "Pass me a foot long hotdog" said the third.  "I'll take the char broiled fish", said the next.  "And what would you like, honey?", she asked the child function.  "I'll take a double cheeseburger!", he exclaimed.  The other functions all turned to look at him with surprise.  "Are you sure you can eat that much?", asked the waitress.  "I think I can handle it", said the small child.  "At Arduino's, it's only 4 bytes!".
24  Using Arduino / Programming Questions / Re: millis() One pin. Two different delays Help? on: August 06, 2012, 10:32:25 pm
There are many ways to do it.  Here is one I just wrote and tested:

Code:
// pin 4 high 10 sec, low 2 sec. Tom Fangrow, Aug 6, 2012

unsigned long oldTime=0, period1=10000, period2=2000;

void setup() {
  pinMode(4, OUTPUT);
}

void loop() {
  if(millis() - oldTime < period1) {
    digitalWrite(4, HIGH);
  }
  else if(millis() - oldTime < period1 + period2) {
    digitalWrite(4, LOW);
  }
  else {
    oldTime = millis();
  }
}
25  Using Arduino / Programming Questions / Re: don't understand float on: August 05, 2012, 06:11:14 pm
I think the title should have been "don't understand int".  Ints don't have decimals!  Also, you can't divide properly using ints.  Consider that 1 divided by 2 equals zero using integer math.
26  Using Arduino / Sensors / Re: Measure distance or direction with accelerometer? on: August 05, 2012, 05:18:24 pm
Quote
Do you think it's possible with some kind of algorithm to calculate the distance or the direction to the source of a footstep/knock from an accelerometer?

Here's a thought experiment for you.  If you know the volume of a brick, do you think it's possible come up with an algorithm to calculate the length, width and height of the brick? 
27  Topics / Interactive Art / Re: vacuum plate idea on: August 05, 2012, 05:05:57 pm
That's pretty cool!  I have not done any projects with high voltage yet, but when I do I may start with the bulb.

I work in the medical device industry where needles are common.  Not sure where to buy them retail.  Try calling your doctor, dentist, or veterinarian and tell him what you want it for. 

You may want to use a valve or stopcock on the vacuum line so you can disconnect it from the pump after the cavity is pumped down.  If you just pull out the needle, some air may leak in.
28  Using Arduino / LEDs and Multiplexing / Re: 8 Led's to show binary message on: August 05, 2012, 02:52:16 pm
A few weeks?  I think this is what you want.  Copy the code below and run the sketch.  Enter your text into the serial monitor.  Study this example until you can do it for yourself.

Code:
// LED binary display with 8 LEDs using serial monitor input
// Tom Fangrow, August 5, 2012

int i;                        // counter used to switch pins

void setup() {
  Serial.begin(9600);         // open serial port at 9600 baud
  for(i=2; i<10; i++) {       // for LEDs on pins 2 thru 9
    pinMode(i, OUTPUT);       // set each pin for output
  }
}

void loop() {
  if(Serial.available()) {    // if anything on port
    byte c = Serial.read();   // read character
    for(i=2; i<10; i++) {     // while there is data remaining
      digitalWrite(i, c%2);   // display the least significant bit
      c /= 2;                 // move to next significant bit
    }
    delay(1000);              // look at character for 1 second
  }
}

(code edited slightly a few minutes after posting)
29  Topics / Interactive Art / Re: vacuum plate idea on: August 05, 2012, 01:30:14 pm
Quote
...how would I get the air out in the first place if itch has a rubber ring around it?

Try poking a hypodermic needle right through the rubber ring, then stabilize it so it doesn't move around or fall out.  Not too small either or it will take forever to pump the air out - maybe a 20 or 22 gauge (green or yellow band). 

Quote
And I guess the thinnest possible would be the easiest to pump, but how small do you think is practical?

Actually the gap between the plates will not affect how hard it is to pump.  The bigger the gap, the LONGER it will take to remove the air.  You might have small leaks, and some air will go right through the silicone, so you will probably want to leave the pump running.

Now I have some questions.  The bulbs in the photos have no filaments?  What is a laptop fluorescent driver?  How is it modified?
30  Topics / Interactive Art / Re: vacuum plate idea on: August 04, 2012, 09:27:39 pm
There's a reason that vacuum tubes are tube-shaped.  It's so they can withstand the atmospheric pressure forces when the air is sucked out.  The curved shape of tubes and globes actually make those structures stronger as the external pressure increases. 

Your plate won't have any of that going for it.  If you use a high vacuum, each side of your your plate will feel a force as high as 12*12*14.7=2116.8 pounds.  I think 1 ton per side would be enough to break the glass, unless you use something thick like a telescope mirror blank or a porthole glass. 

Try a smaller plate first.  You don't have to use silicone rubber, and you probably won't need to glue it, either.  The good news is that as you lower the internal pressure, the increased force will squeeze the rubber more, actually improving the seal.  Use a stiff grade of rubber.  If the rubber is too soft, it may squeeze down too much leaving you no gap.

Good luck with your project! 
Pages: 1 [2] 3 4 ... 8