Loading...
  Show Posts
Pages: [1] 2 3 ... 8
1  Using Arduino / Project Guidance / Re: Chicken Coop project, which Arduino to start with? on: March 18, 2013, 11:06:04 pm
if(eggs<1);
digitalWrite(close the door and shut off the lights);
if(eggs>=1);
digitalWrite(RobotChicken, HIGH);

Serial.print(eggs);
2  Using Arduino / Project Guidance / Re: Which Resistors Would You Recommend on: March 18, 2013, 10:41:48 pm
if you put the leds in parallel you would need three 100ohm and one 150ohm i think.
or replace the 150ohm with this to adjust the brightness http://www.ebay.com/itm/250848525880
3  Using Arduino / Project Guidance / Re: setting digitalWrite with a time limit for HIGH and LOW on: March 18, 2013, 10:08:19 pm
{digitalWrite(SPUP, HIGH);delay(2000);}




delay(2);
}
4  Using Arduino / Project Guidance / Re: Suggestion how to monitor the level of propane/butane gas cylinder on: March 18, 2013, 09:55:18 pm
I think I'd go low tech with a limit switch. On my old gas grill the tank was set a little offset on an edge under the end of the grill with a little wire arm that stuck out the front (in an empty/full slot). A spring was attached to the top of the tank pulling it opposite to the natural full tank tilt to the offset side. As the tank empied the spring would gradually pull the tank back from the heavier offset side, moving the fuel indicater wire back toward the empty side of the slot it was in. The tall tank could be set on a piece of wood with a slightly offset ~ 1/8" dowel under it. The full heavy tank would slightly tilt to the offset side. Instead of a spring on the top of the tank pulling it in the opposite direction, an arm with a weight attached to the top of the tank could probably do the same. When the tank got empty the weighted arm would cause the tank to tilt to the weighted arm side, actuating a limit switch. teeter-totter tank.

but what if you are not home? go high tech dude.
5  Using Arduino / Project Guidance / Re: XBee Antenna on: March 18, 2013, 09:45:56 pm
i have this on my wish list to replace my 2W.
High Power 4W 2.4Ghz Wifi b/g/n booster Amplifier for Router AP Wifi Adapter
http://www.ebay.com/itm/310502802694
6  Using Arduino / Project Guidance / Re: Suggestion how to monitor the level of propane/butane gas cylinder on: March 18, 2013, 09:02:40 pm
i almost have my propane tank sketch done. im still waiting for china to send my parts. look thru my past posts and find the thread.
http://arduino.cc/forum/index.php/topic,152252.0.html
7  Using Arduino / Project Guidance / Re: control dc motor with a mic! on: March 18, 2013, 07:46:49 pm
3 Pin Sound Sensor Module ECM for Sound Detecting 5V DC DIY High Sensitivity
http://www.ebay.com/itm/130814345964
8  Topics / Home Automation and Networked Objects / Re: Capacitive wall switch on: March 13, 2013, 03:32:58 pm
i seen this the other day, Sonovox Lazy Light, Voice Recognition Wall Switch, New
http://www.ebay.com/itm/Sonovox-Lazy-Light-Voice-Recognition-Wall-Switch-New-/380596041958



9  Topics / Robotics / Re: Automatically adjust my solar panels on: March 12, 2013, 01:59:16 pm
just move it yourself every few weeks.

lmao, if thats the way you think then you probably dont belong in this forum.
like who would wanna go on their roof to move six of those?
automation is the future dude!
10  Topics / Robotics / Re: Automatically adjust my solar panels on: March 10, 2013, 12:49:14 pm
i bet 20 bucks there is a code already done for this on the internet.
11  Topics / Robotics / Re: Automatically adjust my solar panels on: March 10, 2013, 12:45:59 pm
The linear actuator idea is great but if you are fairly crafty you could custom make a linear actuator.  I have made one with threaded rod, rod coupler for the moving train, two bearings, and a gear head motor.  This doesn't have any position feedback but a rotary encoder could easily be implemented. 

Do you have a plan on how to orient the panels?  I have had good small scale luck with a 30 degree pyramid with 4 photo-resistors in the middle of each face.  Biggest downfall to photo-resistors is that they aren't that great for reading direct light levels as they have a logrithmic curve.  They have more resolution reading "darkness" than vise versa.  This is where the pyramid comes in, it will cast a shadow on one side giving a better difference in values to read with and Arduino.
i will buy cheap low rpm 12v motor.
then instead of using the photo-resistors i will program them from the aduino to goto the correct angle determined by the tilt table at http://www.macslab.com/optsolar.html
If your latitude is between 25° and 50°, then the best tilt angles are:
For summer, take the latitude, multiply by 0.92, and subtract 24.3 degrees.
For spring and autumn, take the latitude, multiply by 0.98, and subtract 2.3 degrees.
For winter, take the latitude, multiply by 0.89, and add 24 degrees.

so something like this

int Angle = 42;
int Day = ?
pinMode(Day, INPUT);
pinMode(Angle, OUTPUT);
(Spring= March, April, May);
if(Day=March) {digitalWrite(Angle=41.7x0.98-2.3);}
yadda yudda yadda
12  Topics / Robotics / Re: Automatically adjust my solar panels on: March 09, 2013, 02:08:46 pm
You will need to more detail on what "open and close" is in reguards to this panel bracket.

well the pic shows it open.
laying flat on my flat roof would be closed
13  Topics / Robotics / Automatically adjust my solar panels on: March 09, 2013, 11:54:45 am
Please how would i go about making this open and close with my droid plus automatically adjust to the correct angle?  http://www.harborfreight.com/solar-panel-frame-mounting-kit-68698.html



14  Using Arduino / Programming Questions / Re: Sketch help? Several sensor inputs and outputs, use analog or digital pins? on: March 07, 2013, 06:09:18 pm
Code:
int val = 0; //not sure what this does but its needed.
What for ?

i deleted it and it verified, musta been used in my old code. now i have the warning LEDs for the DS18B20 and Electret1 working! now i wait for china to send my INA122 Precision Instrumentation Amp and resistors to get my load sensor working. i will post back here next week. thanks everybody
15  Using Arduino / Programming Questions / Re: Sketch help? Several sensor inputs and outputs, use analog or digital pins? on: March 07, 2013, 04:18:58 pm
i finally got the DS18B20 to light up led

Code:
#include <OneWire.h>
//This is my first ever sketch i am writing for my 2650. i might need help.
//This sketch will eventually control my camper with my droid or voice.
//I will worry less about things going wrong with my off grid trailer.

//Start of my pins
int Water = A0; //Voltage sensor for SeeLevel II water tank sensor strip
int Electret1 = A1;//amplifier output connected to analog pin 1
int Temp1 = A2; //DS18B20 temperature sensor under camper
int Temp2 = A3; //DS18B20 temperature inside camper
int Smoke = A4; //Smoke sensor
int Gas = A5; //Flammable gas sensor
int CMD = A6; //Carbon Monoxide Detector
int Cat = A7; //Arduino Motion Sensor Detector
int Tank1 = A8; //load sensor pin for propane tank 1 blue wire
int Tank2 = A9; //load sensor pin for propane tank 2 blue wire
int Humid1 = A12; //pin for humidity sensor inside
int Humid2 = A13; //pin for humidity sensor inside
int Volts = A14; //battery bank voltage
int Amps = A15; //amps being used
int ElectretLED1 = 22; // led will light up when i talk
int RB1 = 24; //red and blue warning led for Temp1
int RB2 = 26; //red and blue warning led for Tank1
int RB3 = 28; //red and blue warning led for Tank2
int RB4 = 30; //red and blue warning led for low Water
int Relay1 = 32; //turns on relay switch when Temp1 goes below 32degrees.
int RB5 = 34; //red and blue warning led for motion sensor
int Buzz1 = 36; //piezo alarm for smoke Detector
int Buzz2 = 38; //piezo alarm for Flammable gas sensor
int Buzz3 = 36; //piezo alarm for Carbon Monoxide Detector
int Light1 = 23; //Will control 1156 bulbs inside camper.
int Light2 = 25; //Will control 1156 bulbs inside camper.
int Light3 = 27; //Will control 1156 bulbs inside bathroom.
int Light4 = 29; //Will control 1156 bulb outside camper.
int val = 0; //not sure what this does but its needed.
//end of my pins

//Start Electret1 mini condenser microphone. these variables will change
int sensorReading = 0;// variable to store the value read from the sensor pin
int sensorMax = 0;
int sensorMin = 1023;
int threshold = 100;
//End electret microphone
//Start DS18B20
int SensorPin = A2;
OneWire ds(SensorPin);
//End DS18B20
int HighByte, LowByte, TReading, SignBit, Tc_100, Whole, Fract;
void setup() {
  Serial.begin(9600);
  pinMode(SensorPin, INPUT);
  pinMode(Temp1, INPUT);
  pinMode(Temp2, INPUT);
  pinMode(Tank1, INPUT);
  pinMode(Tank2, INPUT);
  pinMode(Humid1, INPUT);
  pinMode(Humid2, INPUT);
  pinMode(Electret1, INPUT);
  pinMode(Water, INPUT);
  pinMode(Volts, INPUT);
  pinMode(Amps, INPUT);
  pinMode(RB1, OUTPUT);
  pinMode(RB2, OUTPUT);
  pinMode(RB3, OUTPUT);
  pinMode(RB4, OUTPUT);
  pinMode(Relay1, OUTPUT);
  pinMode(Light1, OUTPUT);
  pinMode(Light2, OUTPUT);
  pinMode(Light3, OUTPUT);
  pinMode(Light4, OUTPUT);
  pinMode(ElectretLED1, OUTPUT);
  //end my pinmode code

  //Start Electret1 microphone
  digitalWrite(ElectretLED1, HIGH);
  while (millis() < 3000) {threshold = analogRead(Electret1);
    // record the maximum sensor value
    if (threshold > sensorMax) {sensorMax = threshold;}
  }  // signal the end of the calibration period
  digitalWrite(ElectretLED1, LOW);
  threshold = sensorMax;
  //End Electret1 microphone
 
}//end setup

void loop() {

//two 4wire load sensors outside to measure how much propane i have in each 20lb tank
if (analogRead(Tank1) <= 17)  {digitalWrite(RB2, HIGH);}//led alerts me when 20lb propane tank 1 is low
if (analogRead(Tank1) >= 18)  {digitalWrite(RB2, LOW);}//led is off for propane tank 1
if (analogRead(Tank2) <= 17)  {digitalWrite(RB3, HIGH);}//led alerts me when 20lb propane tank 2 is low
if (analogRead(Tank2) >= 18)  {digitalWrite(RB3, LOW);}//led is off for propane tank 2
//end two load sensors outside

//start DS18B20 digital temperature sensor under camper.
  byte i;
  byte present = 0;
  byte data[12];
  byte addr[8];
  if ( !ds.search(addr)) {Serial.print("No more addresses.\n");
      ds.reset_search();
      return;}
  Serial.print("R=");
  for( i = 0; i < 8; i++) {Serial.print(addr[i], HEX);
    Serial.print(" ");}
  if ( OneWire::crc8( addr, 7) != addr[7]) {Serial.print("CRC is not valid!\n");
      return;}
  if ( addr[0] == 0x10) {Serial.print("Device is a DS18S20 family device.\n");}
  else if ( addr[0] == 0x28) {Serial.print("Device is a DS18B20 family device.\n");}
  else {Serial.print("Device family is not recognized: 0x");
      Serial.println(addr[0],HEX);
      return;}
  ds.reset();
  ds.select(addr);
  ds.write(0x44,1);// start conversion, with parasite power on at the end
  delay(1000);     // maybe 750ms is enough, maybe not
  // we might do a ds.depower() here, but the reset will take care of it.
  present = ds.reset();
  ds.select(addr);   
  ds.write(0xBE);         // Read Scratchpad
  Serial.print("P=");
  Serial.print(present,HEX);
  Serial.print(" ");
  for ( i = 0; i < 9; i++) {data[i] = ds.read(); //we need 9 bytes
  Serial.print(data[i], HEX);
  Serial.print(" ");}
  Serial.print(" CRC=");
  Serial.print( OneWire::crc8( data, 8), HEX);
  Serial.println();
//End DS18B20 digital temperature sensor under camper.
  LowByte = data[0];
  HighByte = data[1];
  TReading = (HighByte << 8) + LowByte;
  SignBit = TReading & 0x8000;  // test most sig bit
  if (SignBit) // negative
  {
    TReading = (TReading ^ 0xffff) + 1; // 2's comp
  }
  Tc_100 = (6 * TReading) + TReading / 4;    // multiply by (100 * 0.0625) or 6.25

  Whole = Tc_100 / 100;  // separate off the whole and fractional portions
  Fract = Tc_100 % 100;


  if (SignBit) // If its negative
  {
     Serial.print("-");
  }
  Serial.print("Temp1: ");
  Serial.print(Whole);
  Serial.print(".");
  if (Fract < 10)
  {
     Serial.print("0");
  }
  Serial.print(Fract);

  Serial.print("\n");



   
  //Start heat tape and leds for DS18B20 temperature sensor
  if ((Whole) < 4)  {digitalWrite(Relay1, HIGH);}//turns on heat tape or something
  //to warm up an outside pipe while using the least amount of power at night.
  if ((Whole) > 4)  {digitalWrite(Relay1, LOW);}//and then shuts heat tape off.
  if ((Whole) < 4)  {digitalWrite(RB1, HIGH);}//turns on warning LED inside
  if ((Whole) > 4)  {digitalWrite(RB1, LOW);}//and shuts LED off 
  //end flashing warning led for DS18B20 temperature sensor

  //Start reading the voltage sensor for SeeLevel II water tank sensor strip that i will need help with please
  int sensorValue = analogRead(A0);
  // Convert the digital voltage reading from (11V - 15V) to a percent (0% - 100%)
  float voltage = sensorValue * (11.0 / 15.0);
  if (analogRead(Water) > 5)  {digitalWrite(RB4, LOW);}//Shuts off red and blue LED
  if (analogRead(Water) < 5)  {digitalWrite(RB4, HIGH);}//Activates red and blue warning LED
  Serial.print("Water Level: ");
  Serial.println(voltage); // seriel print out the value you read:
  //End reading the water voltage sensor

  //start analog electret code
  sensorReading = analogRead(Electret1); //read sensor & store it in variable sensorReading   
  // if the sensor reading is greater than the threshold:
  if (sensorReading > threshold) {digitalWrite(ElectretLED1, HIGH);}
  if (sensorReading < threshold) {digitalWrite(ElectretLED1, LOW);}
  //end electret code
 
  //display all sensors onto the arduino serial monitor.
  //in future displayed on droid app, a webpage and laptop with wifishield. Help?
  Serial.print("Water: ");
  Serial.print(Water);
  Serial.println("");
  Serial.print("Tank1: ");
  Serial.print(Tank1);
  Serial.println("");
  Serial.print("Tank2: ");
  Serial.print(Tank2);
  Serial.println("");
  Serial.print("Temp1: ");
  Serial.print(Temp1);
  Serial.println("");
  Serial.print("Temp2: ");
  Serial.print(Temp2);
  Serial.println("");
  Serial.print("Humidity: ");
  Serial.print(Humid1);
  Serial.println("");
  Serial.print("Volts: ");
  Serial.print(Volts);
  Serial.println("");
  Serial.print("Amps: ");
  Serial.print(Amps);
  Serial.println("");
  Serial.print("Sound: ");
  Serial.println(sensorReading);
  Serial.println("");
  //end serial monitor

  delay(1000); //this rechecks every 1 second?
}
Pages: [1] 2 3 ... 8