Show Posts
|
|
Pages: 1 ... 3 4 [5] 6 7 ... 12
|
|
62
|
Using Arduino / Sensors / Re: does anyone own this temperature sensor?
|
on: June 11, 2012, 02:47:05 pm
|
|
I don't have this one, but you can easily get 3 data points.
1st you have your fever thermometer. These are usually quite good, because it's important to know if somebody might die (or not) of a fever smiley-eek:
2nd get some ice and cold water. The triple point of water is 0 deg C (it's the point at which all three states of water exist, not the freezing point of water). So if ice and water (and the water vapor you can't see) exist at low altitude, after some time to allow equilibrium , you have 0 deg C. Could check wikipedia for effect of altitude etc.
I'm sure you know that water boils around 100 deg C. There is your 3rd data point.
OK there will be some error - you may not be at STP and the water may not be pure.
Hope it helps. That's how I check mine anyway, assuming the response is linear (ish) over the range.
The other factor I found was the supply voltage to the temperature sensor device. So you can get different scaling factors at different voltages eg 3.3 vs 5v. But you can check that using the constants above.
Sensors can be sensitive to RF interference. I was using one of mine near my computer and it's WiFi router = lots of noise. Ok, I switched off the router, shortened the cables and wrapped the sensor cable in aluminum foil = much less noise.
Cheers
|
|
|
|
|
63
|
Topics / Device Hacking / Whistle and Wag! Fun hack for whistle and find device.
|
on: June 10, 2012, 11:54:10 am
|
These devices have a small led that flashes and a beep when you whistle. I had one left over knocking about the house, so I wanted to find a use for it. They are about 3 x 3 x 1.5 cm and run off a couple of button cells. You don't need to use the plastic whistle to work it, you can use purse your lips and do it yourself - needs to be loud though. http://www.amazon.com/Whistle-Locator-Stereo-Remote-Control/dp/B000ODQ7EQI hooked one up to flash onto an LDR so when you whistle a signal goes via analogue pin to start a servo and wag a piece of wire. Easy way to add an interactive wagging tail to your robot! The LED is placed right next to the LDR and the whole lot is shaded from ambient light. Video: http://youtu.be/IUX5InVw5aUCode: Servo myservo; int wag = 0; int pos; //PhotoResistor Pin int lightPin = 0;
int servopin = 7; //the pin the servo is connected to void setup() { pinMode(servopin, OUTPUT); //sets the servo pin to output digitalWrite(servopin, LOW); //servo OFF myservo.attach(7); myservo.write(90); Serial.begin(9600); } void loop() { int lightLevel = analogRead(lightPin); //Read the // lightlevel
if (lightLevel > 450) { wag = 1; } if (wag == 1) { for (pos = 0; pos < 180 ; pos +=2) { myservo.write(pos); Serial.println(lightLevel); } }
} I put in serial for debugging. You need to play around with what light level you need to trigger the wagging. Also your LDR may vary from mine. See video. Would welcome some feedback for improvements, additional actions etc.. Cheers
|
|
|
|
|
65
|
Topics / Robotics / Re: Airsoft turret - Arduino controlled - demo
|
on: June 08, 2012, 05:44:13 am
|
I would like to build a similar camera and BB gun combo. So it's a great help you posted this! Thanks  You say you are using hobby servos, which ones specifically so I can look up datasheet? I plan to put mine on a robot rover controlled by a Dell mini web-book. To save on costs I'm using jeelabs RF12 modules which have a 100m range for rover control, however the IP camera can be operated over the Internet wherever there is a wireless connection. I'm using storageoptions day-night IP camera with motion sensor and a low power laser to aid sighting remotely. The bb gun will be a an UZI style electric SMG for remote mobile-mayhem! Thanks again
|
|
|
|
|
66
|
Using Arduino / Sensors / storage options day-night IP camera
|
on: June 08, 2012, 05:14:28 am
|
Following on from this thread:- http://arduino.cc/forum/index.php/topic,53498.0.html I bought a storage options day-night IP camera from Maplin (UK) for £56. Excellent value. Lots of functionality see:- http://www.storageoptions.com/products/ip-cameras/indoor/ip-camera Including motion alarm and night vision! My only criticism is that support a bit poor especially zero support for so called advanced use of the motion sensing alarm output, which I guess is the one some arduino users would want to use. I know I did. However they do say up-front they don't support advanced use. But I though at least they could tell us what each of those terminal on the back are for! Anyway after contacting storageoptions and getting nothing. I went on and worked it out so I thought to post an example in case anyone else wants a go!. Please see picture (IPcam.jpg) and sketch below. IPcam.jpg is a drawing of the green I/O screw terminals on the back of IP camera. Wire up according to that and just follow the camera's manual for setup of alarms in the camera software. const int IPalarm = 6; // the number of the IP camera INPUT pin const int ledPin = 4; // the number of the LED pin to attach led with 560 ohm resitor char flag1 = ' '; // char to store alarm data
void setup () { // setup the arduino pins pinMode(IPalarm, INPUT); digitalWrite(IPalarm, LOW);
pinMode(ledPin, OUTPUT); digitalWrite(ledPin, LOW);
}
void loop () { if (digitalRead (IPalarm) == HIGH) // if IP camera alarm activated set flag1 to 'i' { flag1 = 'i'; } switch (flag1) { // action according to flag1 (using switch case because I am using lots of different values of flag1 in a bigger project) // could just use if... else
case 'i': //IP motion alarm was triggered digitalWrite(ledPin, HIGH); break; default: // No alarm digitalWrite(ledPin, LOW);
}// end of switch case
} I hope it's useful to others. Cheers
|
|
|
|
|
67
|
Topics / Robotics / Re: Arduino Rover Rocket Launcher
|
on: June 04, 2012, 05:12:43 am
|
Hi Great project. I am just starting something similar and will definitely use your website for guidance. Due note also taken about safety when arming rockets from cyberteque. I am using ROBOT BASIC running on an old DELL inspiron mini web-book. I found it really easy to get ROBOT BASIC (RB) to communicate commands to the arduino and then send-and-recieve commands using RF12 modules from jeelabs. RB makes it really easy to make a GUI on the DELL for the Robot control. I am using an IP camera with the cams software running on the Dell too via a small portable WiFi router -gaffer-taped to the dell  . That makes the video system self-contained and I don't need to worry about it. I'm getting ~120m range in line of sight with RF12 control. The IP camera spec says about 100m range is possible @2.4GHz. RF12 @868MHz. Not getting any interference. I'll post it up when I get a good working version. What do people think of ROBOT BASIC for people starting out in this arena anyway? cheers
|
|
|
|
|
70
|
Topics / Science and Measurement / Re: pH controller unstable in field measurements
|
on: May 16, 2012, 09:03:20 am
|
Don't put any wire into this thing if there are animals in it. Copper is poisonous to marine life. But it is an essential micro-nutrient also. Probably OK to use stainless steel though or gold plated electrodes. Since the pH value should not vary quickly Seawater pH should not vary much second to second, unless exposed to extreme pollution - it has it's own buffering capacity. Freshwater (eg river) has little buffering capacity compared to seawater and pH can vary dramatically with pollutant loads. Aquatic plants can alter pH even on a day/night cycle.
|
|
|
|
|
71
|
Using Arduino / Networking, Protocols, and Devices / Like the look of Jeenodes
|
on: May 16, 2012, 05:30:33 am
|
|
I might like to use Jeenodes in an outdoor wireless sensor network.
My requirement however is that the remote sensor nodes must be low power to save batteries (the main receiver will be ok). Am I correct in the assumption that because they are based on the atmel328p I can use the avr sleep and interrupt methods to save power? The jeenode spec says 12mA consumption with radio off - this would be too high, but I think I can put the avr to sleep and use the WDT as a clock to then interrupt sleep, switch on the radio send data then go back to sleep. I've done this successfully with atmel328p and got less than 7uA in sleep by setting fuses appropriately also.
I just wonder if I can achieve this with jeenodes?
cheers
|
|
|
|
|
72
|
Using Arduino / Networking, Protocols, and Devices / Re: Sleeping GSM alarm - saves power.
|
on: May 14, 2012, 09:06:13 am
|
|
I settled for a mosfet to switch the gsm shield due to high current needs, rather than make mods to the shield itself.
Circuit attached. The IC is just to represent the GSM (I know they have a lot more pins) pin1 represents Vin and 4 represents ground, although they are probably not those on the actual GSM module.
Thanks for the help.
|
|
|
|
|
73
|
Using Arduino / Networking, Protocols, and Devices / Re: Sleeping GSM alarm - saves power.
|
on: May 10, 2012, 03:00:50 am
|
Hi hideout, thanks for the tip. The data sheet shows that on the GSM. But I don't think it's wired up on the shield on the schematic. How would I access the right pin on the GSM module itself? Cheers Edit: actually on closer examination I note the Shield uses a SPX29302 voltage regulator. This has an enable pin which when made HIGH enables the regulator. I think the data sheet is saying that when disabled (enable PIN LOW) the power consumption is a few uA. But I'm not sure, I'm lacking confidence here just reading the data sheet, and possibly going ahead a slight mod (or possible terminal mutilation) of my expensive GSM shield  I could carefully solder the pin off and hook it up to one of the shield pins. Very wary though it case I'm totally off track. Anyone got any experience to offer? many thanks.
|
|
|
|
|
74
|
Using Arduino / Networking, Protocols, and Devices / Re: Sleeping GSM alarm - saves power.
|
on: May 06, 2012, 11:23:40 am
|
Now working with: /*Avr atmega328p on minimal board (Cisesco Xino) Fuses set using avr studio 4 to save power before Arduino code loaded. Brown-out detect off | Use internal 8MHz crystal etc. See http://www.gammon.com.au/forum/?id=11497 GSM shield: Spark-fun Cellular Shield with SM5100B. See http://www.coolcomponents.co.uk/catalog/cellular-shield-with-sm5100b-p-490.html GSM shield Tutorial here: http://tronixstuff.wordpress.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/ GSM shield is powered by a separate 5v supply due to high current needed when transmitting. Arduino goes to sleep after initial setup. Interrupt attached to PIN2 (Arduino interrupt 0). grnd pin with 22K resistor. When pin goes HIGH sleep is interrupted and a GSM alarm is activated. LED lights up and txt message sent. NB I used PINS 7 and 8 on the arduino, for the serial cell to communicate with the GSM shield, but wire them to the GSM shield PINS 2 and 3. This is so the interrupts don't conflict with the serial cell. So the shield is not piggy-backed on the Arduino but is plugged into breadboard. */ #include <avr/sleep.h>
#define PIN 2 // external interrupt pin byte awakeFlag = 0; const byte LED = 11; const byte GSMpwr = 10; int count = 0;
#include <NewSoftSerial.h>
NewSoftSerial cell(7,8); // We need to create a serial port to talk to the GSM module. Use pins other than 2 or 3 as we need these for interrupts //7 and 8 worked ok
char mobilenumber[] = "**********"; // recipient's mobile number
void setup() { pinMode (GSMpwr, OUTPUT); digitalWrite(GSMpwr, LOW); //alarm GSM pwr ON
pinMode (LED, OUTPUT); // so we can update the LED digitalWrite (LED, HIGH); //test ON /OFF delay(200); digitalWrite (LED, LOW);
pinMode(PIN, INPUT); //set the iterrupt pin to input digitalWrite(PIN, LOW); //set it low
attachInterrupt(0, awake, CHANGE); // attach an Interrupt to our pin and grnd it with 22K resistor
//=============SLEEP to save power======================================================================== set_sleep_mode (SLEEP_MODE_PWR_DOWN); sleep_enable(); sleep_cpu (); }
void loop() {
if (awakeFlag > 0) { alarm(); //trigger alarm } }//end of void loop()
void alarm() {
digitalWrite(LED, HIGH); //alarm LED ON
//**** power up GSM here BC546B tranistor switches GSM power on //NOTE must get a higher power one for final circuit**************************************************************
digitalWrite(GSMpwr, HIGH); //alarm GSM pwr ON GSMpwr [pin10] is connected to base of transistor via a 220ohm resistor, // +5v to GSM Vin and collector to GSM Vout, emmiter to GRND
cell.begin(9600);
delay(35000); // give the GSM module time to initialise, locate network etc. cell.println("AT+CMGF=1"); // set SMS mode to text
cell.print("AT+CMGS="); // now send message...
cell.print(34,BYTE); // ASCII equivalent of "
cell.print(mobilenumber);
cell.println(34,BYTE); // ASCII equivalent of "
delay(500); // give the module some thinking time
cell.print("Shed Alarm"); // our message to send
cell.println(26,BYTE); // ASCII equivalent of Ctrl-Z
delay(15000); // the SMS module needs time to return to OK status
{ delay(1); } while (1 > 0); } //end of void alarm()
void awake() { sleep_disable(); awakeFlag = 1; }
I've attached a circuit to show the connections Q1 is a BC546B tranistor - must get a higher power one for final circuit . The bulb in the circuit symbol represents the GSM module. I didn't have a GSM module in my circuit simulator. Cheers
|
|
|
|
|
75
|
Using Arduino / Networking, Protocols, and Devices / Re: Sleeping GSM alarm - saves power.
|
on: May 06, 2012, 10:55:45 am
|
Interrupt 0, on pin 2, is not a pin change interrupt. It is an external interrupt. I'm using it as an external interrupt that's a rubbish code comment. should read attachInterrupt(0, awake, CHANGE); // attach an Interrupt to our pin [pin2] and pull it down to grnd with 22K resistor What, exactly, is connected to pin 2? A 22k resistor then to grnd. I have this code in to switch a transistor using arduino pin ... const byte GSMpwr = 10; ....
void alarm() {
digitalWrite(LED, HIGH); //alarm LED ON
//**** power up GSM here BC546B tranistor switches GSM power on ************************************************************** digitalWrite(GSMpwr, HIGH); //alarm GSM pwr ON GSMpwr [pin10] is connected to base of transistor via a 220ohm resistor
So when I pull out the wire on PIN 2 (ext interrupt 0) the sleep is interrupted Next the power is switched to the GSM wait 35 secs to allow connections etc.. then send text. Now I got all that working. Thanks for pointing me in the right direction. I'll tidy up the full code and post it. Thanks again
|
|
|
|
|