Show Posts
Pages: 1 [2] 3 4 ... 6
16  Using Arduino / Programming Questions / Question on Switch case statement on: February 16, 2014, 10:09:33 am
Is it possible to use Boolean operators with case?  something like below...

case 1 || 2:
do this;
break;

and

case > 5 && < 10:
do this;
break;
 
17  Using Arduino / Sensors / Re: Help needed with codes for arduino uno with LCD display and Mp motion sensor on: January 29, 2014, 12:19:38 pm
Ok.  Go through this link http://arduino.cc/en/Tutorial/Button.

Replace switch with your motion sensor in the above example.  i.e., connect arudino +5V to your sensor +5V and arduino GND to your sensor GND.  Connect you output of your sensor to digital pin 2.  Upload the same code.  When motion is detected by your sensor, LED on the on your arduino(on pin 13) goes high.   (Also refer the datasheet of the sensor, if there is a need for pull-up/down resistor)

Once you achieve this, second step is add LCD and add the hello world code.. You need to do some modifications to the code as per your requirement.  Also you need to move the output of your motion sensor to some other unused pin and modify the code accordingly.
18  Using Arduino / Sensors / Re: Help needed with codes for arduino uno with LCD display and Mp motion sensor on: January 27, 2014, 11:16:21 pm
Not sure what motion sensor you have, guessing it works on 5V.  When motion is detected, output of the sensor goes high.  Connect the output of the sensor to a digital pin and start from there.  Refer examples Button & Hello World!
19  Using Arduino / Sensors / Re: MPX2050DP Pressure Sensor on: January 22, 2014, 11:31:53 am
Not sure how much of fluctuation you are seeing.. but there always be some fluctuation.  Adding some capacitors across the sensor power supply may help in reducing the fluctuation.  Have you tried using smoothing example?
20  Using Arduino / Sensors / Re: Pressure Sensor MPX2050 DP - Need help on: December 30, 2013, 11:13:16 am
I could test it on full level and I see the output voltage is pretty linear.  Per feet, I am getting a raise of .4 volts  and I am getting the desired values as expected.  Now the next step is to have this project build on stand alone with LCD and have it installed.  My arduino is going to be 8 meters away from the sensor.  If I use 8 meters shield wire between instrumentation amplifier and arduino,  is it ok or is it going to pickup some noise? Any suggestions are welcome.  Thanks in advance.




21  Using Arduino / Sensors / Why analog read value is fluctuating? on: December 29, 2013, 02:16:38 pm
I noticed analog read value is fluctuating when I am trying the analoginoutserial example .  I have tried with the external power source as well, but no change in the result.  I am seeing +/- 3 fluctuations in the analog read value.  I have placed the capacitors across the pot and analog input pin and GND, I can see the fluctuations reduced, but I am still seeing +/- 1.  When I placed the DMM across the analog pin and GND on 2000mV range, I can see a voltage fluctuation of +/- 2.  Why the voltage is fluctuating? I guess this voltage fluctuation is affecting the analog read value. Is there a way to stop these fluctuations?
22  Using Arduino / Sensors / Re: Pressure Sensor MPX2050 DP - Need help on: December 27, 2013, 03:41:11 pm
Thank you jremington,

I was able to test my sensor out put on full tank today.  But I am facing a small problem.  When there is no pressure, i.e., tank is empty, I am not getting  0 volts at the output of the instrumentation amplifier.  I am getting around 0.7 volts.  I can round it to 1 volt by adding a voltage divider to ref pin on AD623.  I did not find a way to make the output to 0 volt.  If I make the output to 1 volt, my reading is going to be 1 volt when tank is empty and 3.70 volts when tank is full(voltage readings are liner to the water level).  If I go with this range and use map function for analogread, will I compromise the accuracy?  please shed some light on this situation. 

Thanks in advance.
23  Using Arduino / Sensors / Re: Pressure Sensor MPX2050 DP - Need help on: December 26, 2013, 02:09:28 pm
Thanks for your inputs.  I was able to get AD623 and tested my sensor with AD623 and I am getting .34 volts per feet@ gain 500.  So I am guessing ~2.4 volts for 7 feet, yet to be tested on full tank(7 feet).  If my guess is correct, I will have a variation of 0 volts to  2.4 volts between empty and full tank.  Now my question is what will be the minimum voltage increments that arduino analog pin can measure?



24  Using Arduino / Sensors / Pressure Sensor MPX2050 DP - Need help on: December 24, 2013, 01:23:41 pm
Hello Friends..

I am building a water level meter using arduino to measure water level in a underground tank about 7 feet.  I will be using MPX2050 DP pressure transducer which is capable of measuring 50kpa.  I believe the pressure is going to be around 20kpa for the full tank (7 feet).  My question is what is the best easily available instrumentation amplifier I can use here to amplify the output of the sensor so that my arduino analog pins can read and what will be the output voltage range of instrumentation amplifier for the pressure between 0 and 20 kpa

PS:  I will be using a single power supply of 5V for the sensor

25  Using Arduino / Programming Questions / Why this sketch is not working? on: June 07, 2013, 08:24:35 am
Hi There!  I want to scroll the text on the LCD.  I am using the below sketch but its giving error "cannot convert 'String' to 'char*' for argument '1' to 'void marquee(char*)". What I have to do to get this worked?

Thanks.

Code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int numRows = 2;
const int numCols = 16;
String stringOne;
String stringTwo;
String stringThree;
void setup()
{
  // set up the LCD's number of columns and rows:
  lcd.begin(numCols, numRows);
}
void loop()
{

  stringOne = "HELLO WORLD!!";
  stringTwo = "hello world!!";
  stringThree = stringOne + stringTwo;
  marquee(stringThree);
  delay(1000);
  lcd.clear();
}

// this function uses scrolling to display a message up to 32 bytes long
void marquee(char  *text )
{
  int length = strlen(text); // the number of characters in the text
  if(length < numCols)
    lcd.print(text);
  else
  {
    int pos;
    for( pos = 0; pos < numCols; pos++)
      lcd.print(text[pos]);
    delay(1000); // allow time to read the first line before scrolling
    while(pos < length)
    {
      lcd.scrollDisplayLeft();
      lcd.print(text[pos]);
      pos = pos + 1;
      delay(300);
    }
  }
}
26  Using Arduino / Programming Questions / Bootloader delay on: May 28, 2013, 09:57:45 am
Hi There!

I have moved my project to standalone board of Atmega 8.  During this process, I had to load boot loader on the atmega 8.  Everything works as expected except the 10 seconds delay at start up when powered on.   Is there a way to minimize this delay?  I don’t need in system programming option.  While googleing I have found opti boot may fix this issue, is that an option?

Thanks in advance,
27  Using Arduino / General Electronics / Re: BT-138 and inductive loads on: April 25, 2013, 01:08:42 am
No.. No.. What I meant was the RC  circuit ( .01 mfd and 39R in series) in the link you mentioned is a snubber. So you no need to add anything if you are using the same circuit.
28  Using Arduino / General Electronics / Re: BT-138 and inductive loads on: April 25, 2013, 12:19:14 am
You need to add a snubber circuit if you dealing with inductive load.  The resister and capacitor in series across the load in the first circuit is nothing but the RC snubber.
29  Using Arduino / General Electronics / Re: How to calculate AC Watts on: April 05, 2013, 03:27:52 pm
Thank you!
30  Using Arduino / General Electronics / Re: How to calculate AC Watts on: April 05, 2013, 03:14:45 pm
Thank you very much for your quick reply.  So a 150 Watt 220 V to 110 V converter is best bet?

Pages: 1 [2] 3 4 ... 6