Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / unable to log data in SD card on: May 28, 2013, 12:55:36 am
hi experts
i am unable to log data in sd card arduino compiler shows no error but in real hardware running error /unable to log data


pls help me

2  Using Arduino / Project Guidance / arduino atmega32/16 on: April 17, 2013, 03:05:05 am
Dear sir
Can i burn hex file compiled for arduino leonardo to atmega 32 ? will this work ? if not what changes should i do ?
waiting for reply
3  Using Arduino / Sensors / Re: MQ-3 alcohol sensor on: October 09, 2012, 09:11:39 am
oh yes that was my mistake i will check now smiley
4  Using Arduino / Sensors / Re: MQ-3 alcohol sensor on: October 06, 2012, 11:19:26 am
yes 10k is connected to the ground and when the alcohol is present value varies from 200 to 1024 but when alcohol is not present shows value 200 my wiring is correct
5  Using Arduino / Sensors / Re: MQ-3 alcohol sensor on: October 06, 2012, 11:17:06 am
if i remove second line value is displayed always zero what is the problem then .
6  Using Arduino / Sensors / MQ-3 alcohol sensor on: October 06, 2012, 10:20:36 am
dear experts
i have purchased alcohol sensor from the sparfun.com and according to data sheet i have connected 10k ohm resistor accross it and switche on for one whole day and night after that i try to write code and when alchol is not detected 200 value shows in the lcd i it should have shown value o how to solve this problem any idea ?
here is the code
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int ledPin = 13;
int sensorPin = A0;
int value = 0;

const int threshold = 350;

void setup()
{

Serial.begin(9600);
lcd.begin(16,2);

}

void loop()
{
int Value = analogRead(sensorPin);
value = analogRead(0);

if (Value > threshold)
{
    digitalWrite(ledPin, HIGH);
  }
  else {
    digitalWrite(ledPin,LOW);
  }

 
lcd.print("alcohollevel:");
lcd.println(value);
Serial.println(value,DEC);


if (Value > threshold)
{
    lcd.print("alert");
    Serial.print ("alert");
  }
  else {
    lcd.print("normal");
    Serial.print("normal");
   
  }
   
delay(1000);
lcd.clear();

}
7  Using Arduino / Programming Questions / how to display all lcd values to serial terminal on: September 29, 2012, 11:47:25 pm
dear experts i just want to display kwhr and its value  in serial terminal here is the code pls help me
#include <LiquidCrystal.h>
LiquidCrystal lcd(3, 5, 6, 7, 8, 9);
const int voltageSensor = A0;
const int currentSensor = A1;
const int numberOfSamples = 3000;
// Calibration constants
const float AC_WALL_VOLTAGE = 120.9;
const float AC_ADAPTER_VOLTAGE = 14.1;
const float AC_VOLTAGE_DIV_VOUT = 0.85;
const float CT_BURDEN_RESISTOR = 40.2;
const float CT_TURNS = 2280.0;
// Calibration coefficients
const float VCAL = 1.0;
const float ICAL = 1.0;
const float PHASECAL = 0.9;
// Calculated ratio constants, modified by VCAL/ICAL
const float AC_ADAPTER_RATIO = AC_WALL_VOLTAGE / AC_ADAPTER_VOLTAGE;
const float AC_VOLTAGE_DIV_RATIO = AC_ADAPTER_VOLTAGE / AC_VOLTAGE_DIV_VOUT;
const float V_RATIO = AC_ADAPTER_RATIO * AC_VOLTAGE_DIV_RATIO * 5 / 1024 * VCAL;
const float I_RATIO = CT_TURNS / CT_BURDEN_RESISTOR * 5 / 1024 * ICAL;
// Sample variables
int lastSampleV, lastSampleI, sampleV, sampleI;
// Filter variables
float lastFilteredV, lastFilteredI, filteredV, filteredI;
// Power sample totals
float sumI, sumV, sumP;
// Phase calibrated instantaneous voltage
float calibratedV;
// Calculated power variables
float realPower, apparentPower, powerFactor, voltageRMS, currentRMS;
unsigned long last_kWhTime, kWhTime;
float kilowattHour = 0.0;
void setup() {
lcd.begin(16,2);
}
void loop() {
calculatePower();
displayPower();
}
void calculatePower() {
for (int i = 0; i < numberOfSamples; i++) {
// Used for voltage offset removal
lastSampleV = sampleV;
lastSampleI = sampleI;
// Read voltage and current values
sampleV = analogRead(voltageSensor);
sampleI = analogRead(currentSensor);
// Used for voltage offset removal
lastFilteredV = filteredV;
lastFilteredI = filteredI;
// Digital high pass filters to remove 2.5V DC offset
filteredV = 0.996 * (lastFilteredV + sampleV - lastSampleV);
filteredI = 0.996 * (lastFilteredI + sampleI - lastSampleI);
// Phase calibration
calibratedV = lastFilteredV + PHASECAL * (filteredV - lastFilteredV);
// Root-mean-square voltage
sumV += calibratedV * calibratedV;
// Root-mean-square current
sumI += filteredI * filteredI;
// Instantaneous Power
sumP += abs(calibratedV * filteredI);
}
// Calculation of the root of the mean of the voltage and current squared (rms)
// Calibration coeficients applied
voltageRMS = V_RATIO * sqrt(sumV / numberOfSamples);
currentRMS = I_RATIO * sqrt(sumI / numberOfSamples);
// Calculate power values
realPower = V_RATIO * I_RATIO * sumP / numberOfSamples;
apparentPower = voltageRMS * currentRMS;
powerFactor = realPower / apparentPower;
// Calculate running total kilowatt hours
// This value will reset in 50 days
last_kWhTime = kWhTime;
kWhTime = millis();
// Convert watts into kilowatts and multiply by the time since the last reading in ms
kilowattHour += (realPower / 1000) * ((kWhTime - last_kWhTime) / 3600000.0);
// Reset sample totals
sumV = 0;
sumI = 0;
sumP = 0;
}
void displayPower() {
lcd.clear();
lcd.print(realPower, 0);
lcd.print("w ");
lcd.print(apparentPower, 0);
lcd.print("va ");
lcd.print(powerFactor * 100, 0);
lcd.print("%");
lcd.setCursor(0,1);
lcd.print(voltageRMS, 0);
lcd.print("v ");
lcd.print(currentRMS, 1);
lcd.print("a ");
lcd.print(kilowattHour, 4);
}
how???
8  Using Arduino / Project Guidance / Re: how to make real time clock ds1307 with arduino uno temp ds18s20 and multiplex s on: July 11, 2012, 10:31:12 am
i have all components that i need but help me on circuit diagram and coding
 
9  Using Arduino / Project Guidance / how to make real time clock ds1307 with arduino uno temp ds18s20 and multiplex s on: July 07, 2012, 07:21:26 pm
dear experts
i am very interested to build  Arduino +ds1307+temperature sensor+four digit seven segment display any one help me ...
10  Development / Other Software Development / Re: Updated DS1307 simple library for arduino 1.0 and older on: March 25, 2012, 11:56:07 am
i am getting errors like error wconstants.h: no such file or directory what is my problem pls help me
11  Community / Exhibition / Gallery / Re: arduino +cmp03+lcd digital compass on: March 02, 2012, 01:57:52 am
i have purchased parts from http://www.robot-electronics.co.uk/ sensor is cmp03 .
12  Community / Exhibition / Gallery / arduino +cmp03+lcd digital compass on: February 28, 2012, 09:29:19 pm
 arduino +cmp03+lcd digital compass
13  Using Arduino / Project Guidance / how to make humidity and temperature data logger using sd card ? on: February 25, 2012, 08:26:53 am
dear experts
i want to make  humidity and temperature data logger using sd card ? which sensor is best ?pls help me !
Pages: [1]