Show Posts
Pages: [1]
1  Using Arduino / Installation & Troubleshooting / Arduino uno not found on windows xp on: March 29, 2012, 11:05:34 am
Now this has probably been done to death but....

Had an arduino deumalinove on my old lap top during my PhD and loved it. Now at work and we need to put together a platfomr for testing some stuff and I suggested arduino. So I now have an Uno and downloaded the new wiring environment.

When trying to find the Uno in device manager all I ever see is COM1. UNo is powered and blink program running. Nor can I find the Uno driver in the driver directory in the wiring folder.

I have now tried this on two different PCs and the same issue.

Any help greatly appreciated
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Can't upload sketch! on: January 26, 2009, 05:45:58 am
Hi All

I recently got my hands on two arduino boards, one is the 'official' Arduino duemilanove (Decimilia), on is the Seeeduino (decimila with SMD components).

Having started using the Seeeduino, I had the same problem as others on this thread, namely:

avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

However, when flipping over to the Duemilanove, the board worked first time.

The Seeeduino was billed as beign totally compatible to the original Decimilia... so just putting this out there in case there is a bug in that particular version of the board.....
3  Forum 2005-2010 (read only) / Interfacing / Re: LIS302DL 3Axis Accelerometer I2C on: July 19, 2010, 09:29:44 am
Hi guys, sorry for the thread necromany on this topic, however I'm encountering the exact same problem as the poster above me.

Status register is reading as 0x00, implying that there is no new data available and the three output registers for the x:y:z axes read 65:15:0

I'm assuming there is a fault condition somewhere, that the data is reading implies this fault is outwith the communication protocol itself.

any help would be greatly appreciated

edited to add: infact, no matter what register I try to read, the serial monitor always displays 65:15:0....

Infact, I further tested this device by changing the device adress to something random, the idea being that if were the incorrect address, it would at least be easy to spot, since logically the devices shouldn't communicate. What I got? still 65:15:0

update: well, there was one fault in my code, in so much as I'd put the line regarding readGood outside of the last if loop for the z axis read, when put in the proper place I am reading as getting no data.

Got access to an oscilloscope and found my SCL line reading a constant high. This is obviously something of a bummer to me.

Any general hints on why this might be?
4  Forum 2005-2010 (read only) / Interfacing / Re: CMA3000-A01 accelorometer on: June 22, 2010, 09:50:30 am
missed that! Not sure if it's got a stack pointer that automatically moves on to the next register to be read, but will play about with this and see how easy it is - will let you all know!
5  Forum 2005-2010 (read only) / Interfacing / CMA3000-A01 accelorometer on: June 22, 2010, 09:02:19 am
Hi guys,

Just wondering if anyone had uses the CMA3000-A01 accelorometer from vti technology:

http://www.vti.fi/midcom-serveattachmentguid-1df5c00f2c48b705c0011df90f6fbf9599777447744/cma3000_d01_datasheet_8277800a.02.pdf

It's an SPI/i2c controlled device and three axes. I want to marry it to an arduino device for measuring tilt angles on a work surface. I can't seem to find a register map for the device, so i have no idea where to locate the device data, or where to write control data to.

can anyone help?
6  Forum 2005-2010 (read only) / Interfacing / i2c bugs. on: April 22, 2009, 09:36:14 am
hi guys. A couple of months back I made an enquiry around these parts describing the connection of an AD7747 to an arduino, I got some good advice and constructed a simple code that simply polled the register sof the device and stuck them on the serial port:

Code:
#include <wire.h>
#define SLAVEWRT 0x48
#define SLAVERD 0x48
void setup()
{
Wire.begin();
Serial.begin(115200);
Wire.beginTransmission(SLAVEWRT);
Wire.send(0x07);
Wire.send(0xA0);
Wire.endTransmission();
delay(4);
Wire.beginTransmission(SLAVEWRT);
Wire.send(0x08);
Wire.send(0x00);
Wire.endTransmission();
delay(4);
Wire.beginTransmission(SLAVEWRT);
Wire.send(0x09);
Wire.send(0x0E);
Wire.endTransmission();
delay(4);
Wire.beginTransmission(SLAVEWRT);
Wire.send(0x0A);
Wire.send(0xB9);
Wire.endTransmission();
delay(4);
Wire.beginTransmission(SLAVEWRT);
Wire.send(0x0B);
Wire.send(0x3F);
Wire.endTransmission();
delay(4);
void loop()
{
Wire.beginTransmission(SLAVERD)
Wire.send(0x00);
Wire.endTransmission();
Wire.requestFrom(SLAVERD,12);
while(Wire.available()){
char c = Wire.receive();
Serial.print(c, DEC);
Serial.print(",");
}
}
Serial.println();
}

Now that works, it sets up all the internal registers to allow the device to run free and spits out values for the serial interface. I came back to thsi quite recently with the intention of changing some of the code, and I discovered that, within the void loop() - after I begin transmission to the device, when I try to change the address of the register that I intend to read from, the device ignores this and simply startd form the first pointer adress, 0x00.

I find this odd, since in the void setup, the code has no problem adressing different internal registers in order to write data to them.

Anyone shed any light on this?

Also, I was hoping to be able to modify the code so that instead of constantly polling the AD7747, that rather when the first status register changes value (to indicate a completed conversion) that this is the only time the device will read data.

I tried writing one read loop in to check for a change in value in this register, followed by an if statement that would check to see if the test case (a change in value) had come true, at which point I'd initiate a second read loop to get the data. However since the whole thing seems to be exhibiting the strnage behaviour I described above it's not working.

Any help guys, sorry if it sounds dumb.
7  Forum 2005-2010 (read only) / Interfacing / Re: AD7747 capacitive to digital converters (i2c) on: February 06, 2009, 08:25:53 am
To answer my own dumbass question.... there was a default value in one of the configuration registers, set as 0xA0 which should ahve been 0xA1 - the difference between sitting in idle and doing continuous conversion.

Kids: read your datasheets ;D
8  Forum 2005-2010 (read only) / Interfacing / AD7747 capacitive to digital converters (i2c) on: February 06, 2009, 07:01:47 am
Hi guys,

Just wondering if any of you have tried using these Analogue devices CDC chips.

The datasheet is here:

ftp://http://www.analog.com/static/imported-files/data_sheets/AD7747.pdf

Basically it uses a sgima-delta modulator to measure single ended capacitance, quite sueful for proximity detection.

Anyway, it uses a i2c interface, you have to write to several registers first to set the device up for operation, followed by a sequential read of the 3 1 byte registers that store the converted digital data (adresses 0x01, 0x02 and 0x03). There is a pin on the chip, an active low output called RDY, when this goes low the conversion is complete and the master is free to read the device - another way of checking the status of the conversion may also be observed by reading the status register at adress 0x00

I thought using the arduino for this would be a neat and quick method. My code is below:

n.b. the datasheet gives the device adress as 0x90 for read and 0x91 for write, from what I understand from the arduino, I drop the last bit and shift to the left, giving an adress of 0x48.....

Code:
#include <Wire.h>
#define SLAVEWRT 0x48 // adress of device during write cycle
#define SLAVERD  0x48 // adress of device during read cycle

int flagpin = 2; //sets up an analogue pin


void setup()
{
  pinMode(flagpin, INPUT); // sets up analogue pin as input
  Wire.begin(); // sets up i2c for operation
  Serial.begin(115200); // set up baud rate for serial USB
  Wire.beginTransmission(SLAVEWRT); // begins write cycle
  Wire.send(0x07); // sets memory pointer to CAP setup register
  Wire.send(0xA0); // sends data to cap setup enabling correct function of chip
  Wire.endTransmission(); // ends i2c cycle
  delay(4);
  Wire.beginTransmission(SLAVEWRT); // begin write cycle
  Wire.send(0x09); // sends memory pointer to excitation set up register
  Wire.send(0x06); // sends data to exc setup register
  Wire.endTransmission(); // ends cycle
}

void loop() // main program begins
{
  int ready = digitalRead(flagpin);// sets up integer 'ready' as data from pin 2
  
      while (ready ==HIGH)// until pin 2 transitions high to low, do nothing
      {
      };
      Wire.beginTransmission(SLAVERD); // begin read cycle
      Wire.send(0x01); // send memory pointer to first cap data register
      Wire.endTransmission(); // end cycle
      Wire.requestFrom(SLAVERD,3); // reads 3 bytes starting from 0x01
      while(Wire.available())
     {
      char c = Wire.receive();
      Serial.print(c, DEC); // reads the 3 bytes onto serial monitor in decimal form
      Serial.print(",");
     }
      Serial.println();
}

Now from what I can see, on my chip the data conversion never completes, i.e. there is no transtion form high to low on the RDY pin of the AD 7747 chip. Thus I never read anything on the serial monitor.

In terms of my own trouble shooting, I decided to modify the code, removing the while loop for the ready function and simply reading the first memory adress 0x00, to check on the conversion:

Code:
#include <Wire.h>
#define SLAVEWRT 0x48
#define SLAVERD  0x48

int flagpin = 2;


void setup()
{
  pinMode(flagpin, INPUT);
  Wire.begin();
  Serial.begin(115200);
  Wire.beginTransmission(SLAVEWRT);
  Wire.send(0x07);
  Wire.send(0xA0);
  Wire.endTransmission();
  delay(4);
  Wire.beginTransmission(SLAVEWRT);
  Wire.send(0x09);
  Wire.send(0x06);
  Wire.endTransmission();



  
    
      Wire.beginTransmission(SLAVERD);
      Wire.send(0x00);
      Wire.endTransmission();
      Wire.requestFrom(SLAVERD,4);
      while(Wire.available())
     {
      char c = Wire.receive();
      Serial.print(c, HEX);
      Serial.print(",");
     }
      Serial.println();
}

void loop()
{
}


When I did this the serial monitor showed up 4 values: 7,0,0,0. The first memory adress 0x00 (the status register) therefore shows that no conversion is ready and the next three adresses (i.e. the capacitive data registers) are all zero (as would be expected). Having said that, it would seem to prove to me that the master is reading the slave.

Anyone who read the other topic I started about interfacing the arduino to some i2c EEPROM will see that my overall aims are heavily involved with conquering the two wire bus, as such, with this device I would greatly appreciate any help in debugging my software in order to narrow down where the fault lies, i.e. is it my crap programming skills or is there something amiss with the chip itself...
9  Forum 2005-2010 (read only) / Interfacing / Re: interfacing arduino to 24C65 on: February 06, 2009, 06:18:07 am
Thanks guys, got it working.

Cheers
10  Forum 2005-2010 (read only) / Interfacing / interfacing arduino to 24C65 on: January 29, 2009, 09:55:25 am
Hi guys.

I'm new to arduino, and am working on a project which will heavily involve using i2c protocals. As such I wanted to work out the basic read/write functions. So I connected it to a 24C65 EEPROM chip, and using an example I found on this forum, tried to write to and then read from the external memory chip. My code is below:

Code:
#include <Wire.h>
#define CHIP B1010000

void setup()
{
  Wire.begin();
  Serial.begin(115200);
  
  Wire.beginTransmission(CHIP);
  Wire.send(0); //sets memory pointer to 0
  Wire.send(2); // sends value 2 to that location
  Wire.endTransmission();
  delay(1000);
  Wire.beginTransmission(CHIP);
  Wire.send(0x02); // moves pointer to memory location 02
  Wire.send(2);      // sends value two to that location
  Wire.endTransmission();
  delay(1000);
  Wire.beginTransmission(CHIP);
  Wire.send(0x03);
  Wire.send(2);
  Wire.endTransmission();
  delay(1000);
  
  Wire.beginTransmission(CHIP);
  Wire.send(0);
  Wire.endTransmission();
  Wire.requestFrom(CHIP,8);
  while(Wire.available())
  {
    char c = Wire.receive();
    Serial.print(c,HEX);
    Serial.print(", ");
  }


  
  
}

Now, I've got some partial success on the read side, in so much as it does read the required amount of bytes, if I ask it to read 8 bytes, I get 8 values in the serial window, if I ask it to read 16 bytes I get 16 values in the serial monitor etc, etc.

The problem I have is that it always reads the same value, -1 (in DEC), despite what else I try to write to those memory locations.

Can anyone help as to what I am doing wrong?

Cheer sfor any help.
11  Forum 2005-2010 (read only) / Exhibition / Re: Arduino as Capacitive Sensor on: April 28, 2009, 05:08:30 am
I'm currently building a capactive measurement system as part of my PHd, I've found, depending on what accuracy you want, that the best way is to use a sigma delta modulation technique. You can find this in Analog Devices AD774x series of Capacitive to Digital Converters. These chips go from one channel to 12 channels for mounting capacitive electrodes and have resolutions between 8 and 24 bits over full scale ranges of around 25pF with a bit of calibration, obviously, that gives a lot of sensitivity.

The chips communicate with a host through the i2c bus, so you ca use Arduino's wire library to get the data out of the slave chip (I sweated over a prototype function for a PIC i2c protocol for months when I found arduino!) and use that to manipulate the data anyway you want.

the only thing is that these chips are only available in TSSOP form so can be a bit of a pain in the arse to solder, however it's quite a nice solution as I am finding out.
12  Forum 2005-2010 (read only) / Bar Sport / Re: Circuit Design Aesthetics on: February 09, 2009, 06:57:18 am
Melka. Your second picture is of a MEMS device, a lab on a chip. the device is a form of plastic and the pattern describes a network of microfluidic channels used for transport and mixing of fluid. There are some good applications for these devices in bio-MEMS, as a form of blood seperation and using more exotic techniques whcih use the polarisability of different cell types at certian frequencies to identify errant cells quickly.
Pages: [1]