Show Posts
Pages: 1 ... 3 4 [5] 6
61  Forum 2005-2010 (read only) / Interfacing / Re: Wireless wall socket switching - home automati on: March 31, 2008, 11:57:17 am
You may also want to check out x10 stuff. Here is a controller for these devices: http://www.x10.com/automation/x10_pl513.htm

Here's how to connect it to an arduino: http://www.arduino.cc/en/Tutorial/X10
62  Forum 2005-2010 (read only) / Interfacing / Re: Protecting arduino from humidity on: January 15, 2008, 12:20:29 pm
Have you considered, keeping the arduino in a lower-humidity environment and running wire to your sensor(s) inside the high-humidity? I'm not sure if this applies to your case but I've had a similar issue. In my greenhouse controller, the controller box with outlets & an arduino, were placed outside the greenhouse, and sensors on a cable were run to the inside to monitor the readings.
63  Forum 2005-2010 (read only) / Interfacing / Re: Protecting arduino from humidity on: January 14, 2008, 08:06:27 pm
I would encase everything in a wax molding. This would of course require things like an external reset. But what you could do is place your humidity-sensitive electronics in a project box with one side missing, route all needed wires to outside the box, then pour hot liquid candlewax into the enclosure, covering everything, then letting the wax dry.

This is just a suggestion, I've done this before but you should consider that once it is enclosed you will not be able to add new wires or replace the microcontroller if you need to.

HTH
64  Forum 2005-2010 (read only) / Interfacing / Re: Protecting arduino from humidity on: January 14, 2008, 10:31:30 am
What kind of humidity are we talking about? Like, expressed in % relative humidity, it may help to know how high exactly you had in mind.
65  Forum 2005-2010 (read only) / Interfacing / Re: cheap rf tx and rx? on: January 18, 2008, 01:23:51 pm
On sending and receiving side, the data pins are connected directly to the respective arduino's data pins. On the receiving end if there are two pins marked "data" use the one closest to the edge of the device.

Note: I'm using 4800bps modules. The timing on the sending side should be halved for 2400bps modules.
66  Forum 2005-2010 (read only) / Interfacing / Re: cheap rf tx and rx? on: January 14, 2008, 08:11:21 pm


I'm having issues with the RF links. Currently each bit takes up 416 microseconds. So a string of 0's produces oscillations at, 208mics high, 208 low.

But as you can see, my 2400bps link is not outputting as expected. Both units have antennae, and are within close proximity. What is happening is "low" is being high for twice as long as it is "high". This is causing my receiving code to fail. If anyone could shed some light on the issue please do so.
67  Forum 2005-2010 (read only) / Interfacing / Re: cheap rf tx and rx? on: January 08, 2008, 03:36:51 pm
Yes, of course there is google. But having a 'search' button and search feature built into the forum software gives one the impression that it should be put to use. Also, many people do not know of specific search engine features ("site:"), or do not look further than the built-in search (or some not searching at all thus the acronym "UTSE"). Someone should fix that.
68  Forum 2005-2010 (read only) / Interfacing / Re: cheap rf tx and rx? on: January 08, 2008, 02:20:29 pm
Hello again,
First off, these forums do not have a very good search engine.

Secondly, I'm taking a crack at using arduinos with these transmitters & receivers using manchester encoding. Since there is another thread inquiring about development of a library, I'll add my findings there.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1199058664
69  Forum 2005-2010 (read only) / Interfacing / Re: cheap rf tx and rx? on: December 29, 2007, 03:52:52 pm
Hi,

Those modules will not work directly with a serial port. They require use of manchester encoding, which ensures the line is always changing (even when sending a bunch of repeated bits)

http://en.wikipedia.org/wiki/Manchester_encoding

I haven't taken a crack at this one yet, and I don't know how easy it would be to make an arduino use this encoding.

Another option is using a separate encoder/decoder, these work similar to keyfobs in that, when one of the input pins goes high, it transmits the corresponding pin, which in turn activates on the decoder attached to the receiver. This of course won't be good for sending complex data.
70  Forum 2005-2010 (read only) / Interfacing / Re: Arduino blueSmirf on: January 11, 2008, 11:01:30 am
Yes, it is completely possible.

There are many examples around, here are two pages of mine which may be of help:
http://dmgaming.com/arduino/bluetooth-arduino/

There is also a link from that page to a small example project which transmits temperature and humidity over the buesmirf.

HTH
71  Forum 2005-2010 (read only) / Interfacing / Self-reset on Arduino BT on: May 07, 2007, 06:13:55 pm
Hi. Please move this post if it is not in the proper forum.

I have an arduino bt and would like to have a piece of code that allows the remote computer to send a command to reset the microcontroller, so that a new program could be uploaded. I was hoping it would be possible to connect a pin to reset on the icsp header. Is this possible?
72  Forum 2005-2010 (read only) / Interfacing / Re: Sensirion SHT11 Temperature/Humidity Sensor on: February 11, 2007, 03:31:02 pm
Although this code is highly intertwined with the other aspects of my project, let me dig up excerpts of the core functionality. BTW, this works as it is but may not work reliably if you poll the sensor too quickly (>10x a second).

I put this together from parallax' sample code, datasheet, and oscilliscope.

In the end, I just had to add a small delay before the "Wait" function, as the SHT11 / pullup resistor has some delay going high.

Code:
// SHT11 interface code
// copyleft 2k7, hacked together by Derek Yerger

int adcCount;
int shtData = 2;
int shtClk = 3;
const int shtTemp = 3;
const int shtHumi = 5;
const int shtStatW = 6;
const int shtStatR = 7;
const int shtReset = 30;
int ioByte;
int ackBit;
long unsigned retVal;
uint8_t bitmask;

void SHT_Write_Byte(void) {
  pinMode(shtData, OUTPUT);
  shiftOut(shtData, shtClk, MSBFIRST, ioByte);
  pinMode(shtData, INPUT);
  digitalWrite(shtData, LOW);
  digitalWrite(shtClk, LOW);
  digitalWrite(shtClk, HIGH);
  ackBit = digitalRead(shtData);
  digitalWrite(shtClk, LOW);
}

int shiftIn() {
  int cwt;
  cwt=0;
  bitmask=128;
  while (bitmask >= 1) {
    digitalWrite(shtClk, HIGH);
    cwt = cwt + bitmask * digitalRead(shtData);
    digitalWrite(shtClk, LOW);
    bitmask=bitmask/2;
  }
  return(cwt);
}

void SHT_Read_Byte(void) {
  ioByte = shiftIn();
  digitalWrite(shtData, ackBit);
  pinMode(shtData, OUTPUT);
  digitalWrite(shtClk, HIGH);
  digitalWrite(shtClk, LOW);
  pinMode(shtData, INPUT);
  digitalWrite(shtData, LOW);
}

void SHT_Connection_Reset(void) {
  shiftOut(shtData, shtClk, LSBFIRST, 255);
  shiftOut(shtData, shtClk, LSBFIRST, 255);
}

void SHT_Soft_Reset(void) {
  SHT_Connection_Reset();
  ioByte = shtReset;
  ackBit = 1;
  SHT_Write_Byte();
  delay(15);
}

void SHT_Wait(void) {
  delay(5);  // this is where I ran into trouble. Ok now.
  dly = 0;
  while (dly < 400) {
    if (digitalRead(shtData) == 0) dly=2600;
    delay(1);
    dly=dly+1;
  }
}

void SHT_Start(void) {
  digitalWrite(shtData, HIGH);
  pinMode(shtData, OUTPUT);
  digitalWrite(shtClk, HIGH);
  digitalWrite(shtData, LOW);
  digitalWrite(shtClk, LOW);
  digitalWrite(shtClk, HIGH);
  digitalWrite(shtData, HIGH);
  digitalWrite(shtClk, LOW);
}

void SHT_Measure(int vSvc) {
  SHT_Soft_Reset();
  SHT_Start();
  ioByte = vSvc;
  // digitalWrite(dbp, HIGH);   // this is for triggering a scope
  // digitalWrite(dbp, LOW);
  SHT_Write_Byte();
  SHT_Wait();
  ackBit = 0;
  // digitalWrite(dbp2, HIGH);   // again, for triggering a sweep
  // digitalWrite(dbp2, LOW);    // this time, right before reading data
  SHT_Read_Byte();
  int msby;
  msby = ioByte;
  ackBit = 1;
  SHT_Read_Byte();
  retVal = msby;
  retVal = retVal * 0x100;
  retVal=retVal+ioByte;
  if (retVal<=0) retVal = 1;
}

int SHT_Get_Status(void) {
  SHT_Soft_Reset();
  SHT_Start();
  ioByte = shtStatR;
  SHT_Write_Byte();
  SHT_Wait();
  ackBit = 1;
  SHT_Read_Byte();
  return(ioByte);
}


There are separate routines for measurement and status due to differing amounts of data returned.

For completeness' sake, heres a routine to set the status register:

Code:
int SHT_WriteStat(void) {
  SHT_Soft_Reset();
  SHT_Start();
  ioByte = shtStatW;
  SHT_Write_Byte();
  int tmp;
  ioByte = 4; // turn heater on. 0 would be "off"
  SHT_Write_Byte();
  ackBit = 1;
  SHT_Read_Byte();
  return(ioByte);
}

Maybe some day I'll library-ize this, but I've demonstrated how inept I am at seeing these through, as I still haven't completed the bit under the playground for Dallas One-Wire stuff.

Good luck! If you use this and improve it, please share your results with us. That code above was ~3 days or total 8 hours of "wtf?" until I figured out the timing.

Once the project this is part of is completed, I'll certainly volunteer to do a write-up in the playground. Till then... hope this helps.

Derek
73  Forum 2005-2010 (read only) / Interfacing / Re: Sensirion SHT11 Temperature/Humidity Sensor on: February 06, 2007, 05:13:48 pm
I'm having difficulty getting this one to work, I've had it for 24 hours and still haven't gotten temperature conversion to work.

Humidity and status registers work, though!

I'll put up some code if anyone is interested.
74  Forum 2005-2010 (read only) / Exhibition / Bluetooth wireless temperature/humidity sensor on: March 31, 2007, 06:09:52 pm
This time I just had a few spare parts and a day off from my usual work.

Ingredients:
(1) Arduino mini,
(1) Parallax 28018 (an SHT15 I believe), and
(1) BlueSMiRF radio.

The wiring was pretty simple, involving hooking up power to everything, connecting the sensor's clock and data lines, and of course the tx/rx pins for the modem.



For more information and code:
http://dmgaming.com/arduino/the-mashup-arduino-mini-sht11-bluesmirf/
75  Forum 2005-2010 (read only) / Exhibition / Re: Ardwiino: bluetooth + accelerometer for 40 USD on: March 10, 2007, 01:24:52 am
I figured such. Sounds like a nice class, arduino is a great learning platform, I find it much more straightforward than doing assembler, plus it has all the mcu's support hardware built in.
Pages: 1 ... 3 4 [5] 6