Show Posts
Pages: 1 ... 119 120 [121] 122 123 ... 343
1801  Using Arduino / Project Guidance / Re: Project with mp3 and gps shield on: June 05, 2013, 10:45:50 am
how will be the durability of this battery if have to suply the lcd, arduino, gps and mp3 shield?

If you connect it the simple way (using the linear voltage regulator of the Arduino), I would expect about 4-5 hours. With a switchting DC-DC converter my expectation epands to about 6-8 hours. That's a rough estimation with just the datasheet values, maybe the measured currents are different than what the datasheet promised, than these values may change significantly.
1802  Using Arduino / Sensors / Re: how to use the first read of a sensor to compare with the other reads on: June 05, 2013, 10:40:36 am
well... that's the problem. i don't know how. i'm new to programming.

Make a try and we correct you if you're wrong. That's the way you learn something.

and i want to assign only the first read of the sensor to a variable and not the read of the sensor, which is changing

Assign the value to the variable in the setup() routine as this is run only once at startup.
1803  Using Arduino / Sensors / Re: ADC LTC2433-1 on Leonardo on: June 05, 2013, 10:01:04 am
We need to mask out the flag bits in the first byte:

int32_t v = byte1 & 0x1F;
  v <<= 11;
  v |= ((int) byte2) << 3;
  v |= byte3 >> 5;
1804  Using Arduino / Sensors / Re: Issues with Reading and Writing Configuration Registers for LTC6803-3 on: June 05, 2013, 09:57:26 am
I didn't really understand the clock divider at the time, as this is my first circuit project. I now have the clock divider set to SPI_CLOCK_DIV64, though I'm still getting incorrect reads. Any clock divider settings below this result in a read which consists of all 0's :/

The clock divider is responsible for the speed of the SPI interface. Default is SPI_CLOCK_DIV4 which means that the 16MHz clock of the Arduino is divided by 4 resulting in a speed of 4Mb/s for the SPI interface.

You chip has a max. data rate of 1Mb/s so I would use the next rate below it, which results in SPI_CLOCK_DIV32.


This datasheet is for several type. A ADuM340xARW is not fast enough for your project. Which one do you have exactly?

CS0, CS1, CS2, and DECODER_EN are pins needed to use the chip select decoder on the board, as there are five other ADCs to read on this board. The decoder works fine, as I have tested it individually and have also been able to read from the other ADCs on the board.

Do you have schematics of that board? You are only using CS1 in your sketch so I'm curious what the other may be for.

BTW: the datasheet for the LTC is available here:

I would interpret figure 7 of the datasheet so that the device is using mode 0 and not 3.

Try this code:
  for(int i=0; i<6; i++){
    rconfig[i] = SPI.transfer(RDCFG);

I removed all irritating delay()s (waiting 10ms, which is an eternity when communicating with such high speeds, is not a good idea) and moved all serial code (which also may disturb the SPI as it's quite slow but at least done by the hardware just using some interrupt calls) out of the SPI code.

Please post the output of the first 3-4 seconds of this code.
1805  Using Arduino / Sensors / Re: how to use the first read of a sensor to compare with the other reads on: June 04, 2013, 09:33:18 am
-check sensor value
-save sensor value(value1)

void loop:

-if (sensor value< value1) than.....

Why don't you just implement that? You just have to transform that into C code. You haven't specified where your problem is.

the problem is how can i store the first value of the sensor.

What do you mean by "store"? Assign it to a variable, if your description of the intended functionality applies, you don't have to store that over a power interruption.
1806  Using Arduino / Sensors / Re: Strange readings from GadgetShield accelerometer on: June 04, 2013, 07:30:45 am
When the robot is physically still, the above code returns ResultX=31, ResultY=36 and ResultZ=54. I expected ResultX and ResultY to both be 32 (zero acceleration).
Question 1: Why are they not 32? Why are they not the same?

I guess because the accelerometer chip is not mounted as exactly as you expected it or the roboter is on a ground not completely flat, so it has some leaning.

Is this the right approach?

If you need absolute values: yes.
1807  Using Arduino / Sensors / Re: Issues with Reading and Writing Configuration Registers for LTC6803-3 on: June 04, 2013, 05:15:55 am
Why do you have the SPI clock divider line commented out? Default speed is 4MHz which is too fast for the chip according to the datasheet.

What kind of SPI isolator (link to the datasheet) are you using? Have you checked that it supports the chosen speed?
How have you connected the Chips to the Arduino? What's CS0, CS1, CS2 and DECODER_EN?
1808  Using Arduino / Sensors / Re: Do I need the sensor shield for the gy-521 MPU 6050? on: June 04, 2013, 04:00:12 am
Sparkfun has the same sensor on a board (MPU6050):

Both are doing more or less the same, the second one is just tiny and includes everything in one chip.

But one tip: never buy from a supplier that don't offer datasheets and if necessary schematics for it's products or you'll have a hard time getting your projects finished. Sparkfun is more expensive but is model in this regard. They even have a comparison page for the orientation sensors:
1809  Using Arduino / Sensors / Re: MMA8452 Accelerometer Shield Module and Arduino Uno on: June 04, 2013, 03:40:43 am
Connect the module's Vcc to the Arduino's 5V pin, SDA to Arduino's SDA (or A4 in the UNO case), SCL to Arduino's SCL (or A5 in the UNO case) and GND to GND on the Arduino. SA0 goes to GND too (if you don't have an address clash, which cannot be if this is the only device). The rest isn't needed. The module has already pull-ups installed so you don't need bus pull-ups anymore. The INTx pins are optional, just if you need them and then it's application dependent where to connect them.

A tip for your next buy: never buy anything from a supplier that don't provide documentation for the material!
1810  Using Arduino / Sensors / Re: how to use the first read of a sensor to compare with the other reads on: June 03, 2013, 06:32:48 am
And where exactly do you have your problem? Checking if the value is below 190cm shouldn't be the killer, should it?
1811  Using Arduino / Project Guidance / Re: Project with mp3 and gps shield on: June 03, 2013, 06:23:59 am
The display adds another ~75mA to the calculation. So according to the datasheets you have about 230-370mA (specification sum up) of current consumption. Putting this battery to the power connector of the Arduino you'll loose at least the voltage drop on the linear voltage regulator, heating the board with about 550mW, so it might get quite hot.

But to answer your question: yes, it should be possible.
1812  Using Arduino / Sensors / Re: how to use the first read of a sensor to compare with the other reads on: June 03, 2013, 05:41:08 am
I seriously hope you don't construct a real gun with this setup.

Your description sounds to me that you just have to compare the returned value to an upper and a lower limit. If that's not correct you might have to describe in more detail what you want to achieve.
1813  Using Arduino / Sensors / Re: ADC LTC2433-1 on Leonardo on: June 03, 2013, 05:33:24 am
If you want to have 16bits of integer information and the sign information you need to change to the 32bit variant:

void loop() {
  digitalWrite(CSPin, LOW);

  byte1 = SPI.transfer(0);
  byte2 = SPI.transfer(0);
  byte3 = SPI.transfer(0);
  digitalWrite(CSPin, HIGH);

  int32_t v = byte1;
  v <<= 11;
  v |= ((int) byte2) << 3;
  v |= byte3 >> 5;
  if (byte1 & 0x20) {
    v = -v;
1814  International / Deutsch / Re: 6-Achsen Roboter (Schrittmotoren) on: June 03, 2013, 04:54:48 am
Ja wenn es nicht über das Arduino ide geht dann kann ich ja auch einfach über das bestehende Interface die Behfehle an den Arduino weitergeben und allenfals zurücklesen^^

Ich habe keine Ahnung, worauf sich dieser Satz bezieht ("es"), somit kann ich auch keine sinnvolle Aussage daraus ziehen.

Laut aussagen von einem Elektroingenieur der Firma Siemens ist USB nicht industrietauglich und darüber könnte man noch lange diskutieren aber ich suche eine Lösung für mein Problem.

Sollte die Nennung von Siemens Eindruck machen? Eine solche Aussage zeugt nicht gerade von grossem Verständnis der Sache, sondern eher von einer gewissen Borniertheit. Ohne eine Definition was denn "industrietauglich" heissen soll, ist sie auch nichts wert. In der Computer-Industrie ist USB ein Standard und wird industrie-weit eingesetzt. Dass USB in gewissen rauhen Umgebungen nicht sinnvoll ist, streitet niemand ab, aber es deswegen aus jeder Anwendung ausserhalb des Büros zu verbannen ist engstirnig.

-Es muss eine Frequenz mit verschiedenen Periodendauer(>2 Mikrosekunden) generiert werden können bei der klar ist wieviele Perioden gemacht werden.
-Man braucht mindestens 12 Digitaleausgänge von denen 6 diese Frequenzen ausgeben müssen.
-Man braucht eine Anzeige mit der Ist-Position der 6 Achsen.
-Man muss in einem Editor oder dergleichen ein Programm schreiben können das dann im ''Hauptprogramm'' abgespielt werden kann.

Das sollte bereits mit einem UNO und einem 16x2-Display mit I2C-Ansteuerung machbar sein. Das "Programm" muss evtl. nach dem Editor noch "compiliert" werden, damit es nicht zuviel Speicher verbraucht und effizient abgearbeitet werden kann. Auf einem Arduino hast Du neben dem Programm-Flash (dort wird der compilierte Sketch gespeichert) und dem RAM (Arbeitsspeicher) auch noch ein EEPROM zur Verfügung, welches Dein "Programm" nicht-flüchtig speichern könnte. Die Updates könntest Du dann per USB (Seriell) einspielen.

Willst Du denn Deine Pololu-Treiber weiterhin verwenden? Falls ja, solltest Du einen Link zu diesem Produkt posten, damit wir überprüfen können, dass es mit dem Arduino auch zusammenarbeitet.
1815  Using Arduino / Project Guidance / Re: Help with LeoJoy code on: May 31, 2013, 11:03:15 am
Have you changed these lines in the example code? (Remove the "128; //")

  // Set the analog sticks
  //  Since analogRead(pin) returns a 10 bit value,
  //  we need to perform a bit shift operation to
  //  lose the 2 least significant bits and get an
  //  8 bit number that we can use 
  controllerData.leftStickX = 128;// analogRead(A0) >> 2;
  controllerData.leftStickY = 128;//analogRead(A1) >> 2;
  controllerData.rightStickX = 128;//analogRead(A2) >> 2;
  controllerData.rightStickY = 128;//analogRead(A3) >> 2;
Pages: 1 ... 119 120 [121] 122 123 ... 343