Show Posts
Pages: 1 2 [3] 4 5 ... 19
31  Using Arduino / Storage / Re: SD Card - how to reduce the power consumption? on: September 19, 2013, 03:47:55 pm
Evenin' all,

I'm just trying to do the same - that is get the power right down in between my data logs which occur every 5 mins.

The best I can do at the mo is about 500uA in sleep mode (the arduino bit accounts for 22uA) so I'm wondering if I need to do anything more than close the SD file to get the SD card to sleep?... or perhaps its my SD card - any recommendations for nice sleepy SD cards and any difference between micro SD and full size?

Any code snippets to illustrate would be great :-)
32  Using Arduino / Networking, Protocols, and Devices / Re: Simple ACK & CRC over Serial - HOW TO? on: September 15, 2013, 12:05:27 pm
FAB, thanks Paul,

.... just need to find out how to calculate a CRC values based on the contents of the STRUCT data packet and I think I have enough to try some tests :-)
33  Using Arduino / Networking, Protocols, and Devices / Re: Simple ACK & CRC over Serial - HOW TO? on: September 15, 2013, 11:06:52 am
Thanks Paul,

So in my data packet I would add 1 value for CRC.... :

struct DATA{
  int sensor1;
  int sensor2;
  int CRC;
};

Then the logic would go something like if CRC=CRC then SEND ACK else RESEND?

How would I best calculate a CRC value?  Is there a nice code snippet/library I can dip into?
34  Using Arduino / Networking, Protocols, and Devices / Simple ACK & CRC over Serial - HOW TO? on: September 15, 2013, 10:31:31 am
Hi all,

I am just looking to understand ACK and CRC over a Serial connection and wondering if anyone can explain what I need to make happen in each case and maybe even show how it might be done?

The aim is for a data package built with STRUCT to be checked for correctness with CRC and then Acknowledged as recieved successfully.

Sorry for the simple question, just dupping my toe into this stuff :-)
35  Using Arduino / General Electronics / Re: High side & Low side swiching? on: June 21, 2013, 08:52:23 am
FAB - I will get some on order and give it a try - thanks for helping me out with this basic question :-)
36  Using Arduino / General Electronics / Re: High side & Low side swiching? on: June 21, 2013, 04:02:27 am
Thanks again - as I would like to move this to PCB eventually an SOT23 package option would be ideal, may I ask if this one is suitable for the schematic in question too?

http://www.nxp.com/documents/data_sheet/BC807_BC807W_BC327.pdf

..... or perhaps this one which seems to be a replacement for the above:

http://www.nxp.com/documents/data_sheet/BCW29_BCW30.pdf

37  Using Arduino / General Electronics / Re: High side & Low side swiching? on: June 20, 2013, 02:52:41 pm
Wow, that was quick, thanks CrossRoads.

The current in question is only 45mA... 60mA MAX.  So it look like this circuit will work if I swap out the resistor to 1K and change the transistor to a PNP?  Would you be able to recommend a part number - I will need to go out and buy some :-)
38  Using Arduino / General Electronics / High side & Low side swiching? on: June 20, 2013, 02:37:50 pm
Hi,

May I run this by you good folks before I connect up and fry something :-)

Baiscally I would like to switch the backlight LED on an LCD on and off via a transistor and I'm not to sure about the high/low side switching thing.  The LCD LED in question shares the GND with the rest of the display so the only option open is high side switching - below is the circuit I propose but not sure it its correct?  The transistor in there at the mo is a BC817 NPN : http://www.nxp.com/documents/data_sheet/BC817_BC817W_BC337.pdf (the symbol I have used if for a PNP - sorry about that).
39  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.
40  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
41  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....
42  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 :-)
43  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;
}
44  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


}
45  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?
Pages: 1 2 [3] 4 5 ... 19