Loading...
  Show Posts
Pages: [1] 2 3 ... 16
1  Using Arduino / General Electronics / Anyone got a Keithley 6517B High Resistance meter? on: May 15, 2013, 05:01:58 am
Hi,

I have been searching high and low for someone with a Keithley 6517B High Resistance Meter who might be able to help out by taking 10 resistance measurements of some SMD resistors we have ranging up to 50G ohm?  If anyone has one or knows who has it would be great to hear :-)

Many thanks.
2  Using Arduino / Networking, Protocols, and Devices / Switching I2C power off to save battery? on: May 13, 2013, 04:19:31 pm
Hi,

I recenlty tried using the P82B715 http://www.nxp.com/documents/data_sheet/P82B715.pdf I2C extender chip to get cable lenghts of about 20 metres - worked great :-)

The problem I found was that the power drain for my battery operated device was just too high to be useful so wondering if anyone has experience of turning the power supply (in my case 3V3) to the I2C bus off between reading the sensors every 5 minutes?  I guess I can use a transistor switched by a digital pin to do this as the power comsumption is more than 20mA but I thought I might ask for some advice before heading down a dark alley :-)

The questions I have are:

- Is the P82B715 the best way of extending cable length for a low power application?
- If a transistor routes sounds sensible would I be best switching the low side or high side and with which transistor to really keep power consumption to a minimum?
- If I turn the power to the I2C sensors off will I need to re-initialise them after powering on again or may I just continue to call for data as I would have done without powering off?
- Anyting else I should keep in mind when doing this?
- I'm guessing this has been written about somehwere but cannot find anything - anyone have a nice link?

Thanks for any thoughts - cheers
3  Using Arduino / Programming Questions / Re: A more elegant way to read multiple TMP275 sensors via I2C on: May 08, 2013, 05:11:19 pm
4 sure :-) ... I'm slow learning how to speak NiceDuino rather ClunkDuino....
4  Using Arduino / Programming Questions / Re: A more elegant way to read multiple TMP275 sensors via I2C on: May 08, 2013, 05:05:37 pm
Thanks Rob,

I can see how that works - will give it a pop.

Now I just have to hope I got the I2C call on the TMP275 right :-)
5  Using Arduino / Programming Questions / Re: A more elegant way to read multiple TMP275 sensors via I2C on: May 08, 2013, 04:55:12 pm
Thanks Folks,

I have been trying to get the function below to work by passing the variables in on a function call like:
Code:
readTMP275(1,0x48);
and hopefully having it return a float as the variable temp1 etc.

I think this could work but I expect my code falls down a little, expecially when I try to join the variable 'temp' with 'tmpX' at the end of the function - if this looks like a good option how would I write this to actually work :-)

Code:
void readTMP275(int tmpX, int tmpADD)
{
  Wire.beginTransmission(tmpADD);
  Wire.write(1);
  Wire.write(B11100001);
  Wire.endTransmission();
  Wire.beginTransmission(tmpADD);
  Wire.write(0);
  Wire.endTransmission();
  Wire.requestFrom(tmpADD,2);
  delay(250);
  tempHighByte = Wire.read();
  tempLowByte  = Wire.read();
  int t = word(tempHighByte,tempLowByte)/16;
  temp[tmpX]=t/16.0;
}
6  Using Arduino / Programming Questions / A more elegant way to read multiple TMP275 sensors via I2C on: May 08, 2013, 01:03:00 pm
Hi,

Wondering if I might ask for some help making this code a bit less clumbsy :-)

Basically I have 8 TMP275 http://www.ti.com/lit/ds/symlink/tmp275.pdf Sensors each with its own I2C address (48 to 4F) and I am trying to read each in turn and then powering the arduino down to sleep for 5 mins before repeating - my function to read the TMPs is looking pretty bad so hoping there is a much nicer way....

The configuration register I am using hopfully sets ShutDown mode to save battery, 12 Bit mode for best resolution and one shot mode - ie 11100001

How would I best polish this bit of old rusty code into somrthing a bit less emabrassing?

Code:
#include <Wire.h>;

char tempHighByte;
char tempLowByte;
float temperature1;
float temperature2;

void setup()


Serial.begin(9600);
Wire.begin();

Serial.println("Starting.....");

}

void loop(){
 
Wire.beginTransmission(0x48);
  Wire.write(1);
  Wire.write(B11100001);
  Wire.endTransmission();
  Wire.beginTransmission(0x48);
  Wire.write(0);
  Wire.endTransmission();
  Wire.requestFrom(0x48,2);
  delay(250);
  tempHighByte = Wire.read();
  tempLowByte  = Wire.read();
  int t = word(tempHighByte,tempLowByte)/16;
  temperature1=t/16.0;
Serial.println(temperature11,4);
delay(1000);

Wire.beginTransmission(0x49);
  Wire.write(1);
  Wire.write(B11100001);
  Wire.endTransmission();
  Wire.beginTransmission(0x49);
  Wire.write(0);
  Wire.endTransmission();
  Wire.requestFrom(0x49,2);
  delay(250);
  tempHighByte = Wire.read();
  tempLowByte  = Wire.read();
  int t = word(tempHighByte,tempLowByte)/16;
  temperature2=t/16.0;
Serial.println(temperature2,4);
delay(1000);

//etc etc for all 8 I2C address


}
7  Using Arduino / Storage / Re: SD cards blanking during use? on: March 21, 2013, 10:50:12 am
Hi, I'm using the Arduino 3V3 so this could indeed be the issue - thanks for the tip, I will try some tests to see what happens.  I think it must be very close to being OK as failures are rarer than success :-)  I wonder if putting a capacitor in there somehwere would help as a revevoir and smooth out the write cycle consumption?
8  Using Arduino / Storage / SD cards blanking during use? on: March 21, 2013, 10:08:25 am
Hi,

I have an increasing experience of SD cards blanking themeselves, and causing an error, during use - wonder if anyone else has had the same or similar?

The (3V3) Arduino is logging every 5 minutes and has the SD card mounted about 10cm from the Arduino itself - this is simply a card holder with the 6 important pins connected back to Arduino - 3V3, GND, MOSI, MISO, CS & SCK.

Everyting works fine, file creates, data is written etc but sometimes when coming back to it the card is completely blank and Arduino reports a write error - the data can be recovered with recovery software up to the point when the card caused an error..... hmmmm very puzzled - hopefully I have made a simple electonics mistake but look forward to thoughts.
9  Using Arduino / Networking, Protocols, and Devices / Check for Ethernet/Internet connection & re-establish if lost? on: February 16, 2013, 06:13:04 am
Hi,

Wonder what would be the best/most reliable way to check an Ethernet/Internet connection during the loop so that it can be restablished if it has failed?  For example, if Arduino has remained powered but the router has been reset the network connection is lost so needs to be renewed - This would be using the Arduino WizNet shield and Library.

Thanks for any piinters.
10  Using Arduino / Interfacing w/ Software on the Computer / Re: Computer program to set RTC to system time. on: December 13, 2012, 04:51:16 pm
Hi, Yes - thanks for the input :-)  I have since found an example of some nice code to do this via the serial window - I wasn't sure if I could post it here to start with but have since found it in the public domain so I guess its OK.

It is written for the DS3231 RTC but could be adapted for the DS1307 - the trick is that it is written for WaspMote which is Arduino-esq but needs a bit of translating as they have their own bespoke functions like USB.print which is Serial.print - I made a start but soon ran out of ability.... take a look here if you are interested - you basically use the serial window to predefine a time and date which is stored until a set command is sent to serial which sets the time specified in an instant.... so pretty accurate.

http://www.libelium.com/development/waspmote/example024
11  Using Arduino / Interfacing w/ Software on the Computer / Computer program to set RTC to system time. on: December 12, 2012, 04:13:25 pm
Hi,

I have been wondering if a computer program or sketch exists to make syncing an I2C RTC with the computer system time easy and precise?  At the moment I either use

Code:
RTC.adjust(DateTime(__DATE__, __TIME__)

which is great but always out by the time it takes to compile etc.... or trying to set the time to account for these delays which is a bit hit and miss - but obviously not ideal.

I'm guessing that this nut has already been cracked so wondering if anyone can point me in the right direction - the RTC I am using is the great DS3231 but suspect code for other I2C RTCs wouldn't be too bad to recycle?

Thanks for any thoughts.
12  Using Arduino / General Electronics / Re: Increasing I2C pull-ups via additional resistor? on: December 12, 2012, 04:01:18 pm
Thanks for your help folks - from what you have said it is most likely not the pullups so the hunt goes on.
13  Using Arduino / General Electronics / Re: Increasing I2C pull-ups via additional resistor? on: December 11, 2012, 03:31:18 pm
Ah - that would be my lack of understanding of what exactly a pull up resistor is doing  smiley-red  Thanks for clarifying, I need to go a read some more reading I think.

I guess I'm expecting the pull up value needs to be closer to 4K7 rather than 1K - heance the pondering on how to make it so.
14  Using Arduino / General Electronics / Increasing I2C pull-ups via additional resistor? on: December 11, 2012, 01:44:55 pm
Hi, I am working on an old project at the moment that had some issues and I think I have found that the reason is weak pull up resistors on the SCL & SDA lines.  Now, one I2C sensor is not accessible and has 1K pull ups on the board that I cannot get at to change.  Am I right in thinking that I cannot simply add a couple more pull up resistors, even higher value ones, where I can get at the circuit as this will simply reduce the resistance as they would be in parallel?
15  Using Arduino / Sensors / [SOLVED] Stumped reading mulitple DS18B20's on: December 11, 2012, 03:46:11 am
FAB - thanks folks, you got it.

This seems to work - hadn't twiggged the sensor indexing - I can see it clearly now you have pointed it out :-)

Code:
     if (!sensors.getAddress(Sensor1, 0)) error();
     if (!sensors.getAddress(Sensor2, 1)) error();
     if (!sensors.getAddress(Sensor3, 2)) error();
     if (!sensors.getAddress(Sensor4, 3)) error();
     if (!sensors.getAddress(Sensor5, 4)) error();

Pages: [1] 2 3 ... 16