Show Posts
Pages: 1 ... 54 55 [56] 57 58 ... 203
826  International / Portugues / Re: Arduino + w5100 Conexão com o Banco de dados Mysql on: May 23, 2014, 01:43:52 pm
¡CUIDADO! ¡LLAMA!
827  Using Arduino / Interfacing w/ Software on the Computer / Re: How to connect arduino to matlab simulink on: May 23, 2014, 01:41:02 pm
Is google broken in your country ?

Google "arduino matlab" seems to bring up lots of instructions.
828  Using Arduino / Programming Questions / Re: Software serial blocking my code on: May 23, 2014, 01:38:56 pm
you should not use the "readbytesuntil" function,   you will be waiting a long time.

Each time through loop( ),  you should only read the characters which are already available.
829  Using Arduino / Programming Questions / Re: Trouble with if() loop on: May 23, 2014, 01:35:47 pm
You code only does something ,   when angLR is between -90 and +90.   When it is less than -90,   it will do nothing,   there is no code for that.

If you want it to do something other than nothing,  you will need another if ( )  for that,  or change your logic.
830  Using Arduino / Programming Questions / Re: Error: Does not name a type on: May 23, 2014, 01:32:55 pm
failed to name a type error,   almost always means that your #include did not work.

You might have put the file in the wrong place -  check.

The library files for code you have written yourself or downloaded from some random place,   go in a different places to the standard arduino libraries.

You also need to close and restart the Arduino IDE  so it can see the new library files when you restart it.
831  Using Arduino / Sensors / Re: Electret Microphone with LM358 gives weird analog reads combined with WS2812 on: May 22, 2014, 01:56:32 pm
The thing with sound,  is that it is a wave,    and the value you get depends on when you read it.
832  Using Arduino / Sensors / Re: Measuring inclinations of a moving vehicle with an accelerometer on: May 22, 2014, 01:44:32 pm
It's a common misconception that an accelerometer is measuring the force of gravity.  Actually,   the accelerometer is measuring the force of the floor or ground or table pushing on it from underneath, that is preventing the accelerometer from falling into a bottomless pit.
833  Using Arduino / Sensors / Re: Measuring inclinations of a moving vehicle with an accelerometer on: May 22, 2014, 01:30:22 pm
Even using a gyro,   you are going to have great difficulty distinguishing the actual tilt of the vehicle from the acceleration of the vehicle.   The tiny moving parts of the accelerometer device sense acceleration,    and they fundamentally cannot tell you if that is caused by gravity or by the acceleration or deceleration of the vehicle.    The gyro will tell you if the car is rotating,   but any normal car or vehicle does not rotate much,   and the rotation effect will be difficult to distinguish from noise and from the inherent drift in the gyro.
834  Using Arduino / Sensors / Re: Value of an sensitive Analogsensor changes heavy with other power sup. than USB on: May 22, 2014, 01:21:14 pm
All the previous advice is good,   but I would just add that it is the input capacitance of the a/d input  rather than the resistance of the a/d input,   which causes a problem here.
835  Using Arduino / Sensors / Re: Value of an sensitive Analogsensor changes heavy with other power sup. than USB on: May 22, 2014, 01:16:29 pm
Having such high resistances is a problem for the arduino.

When you initiate an a/d measurement,   the arduino sucks in a bit of current and charges a capacitor and then tries to match the voltage on the capacitor.   The problem is,  when this current is sucked in,   the effect of that current itself alters the voltage at the "voltage divider" point between your actuals sensor  and the resistor which forms a voltage divider in combination with it.

If you have the sensor and the resistor connected in series between Vcc and ground,   then a current of a couple of microamps flows through it,   and the voltage of the mid-point is determined by the ratio of the two resistances.     But if the a/d input of the arduino is also sucking in some current from Vcc through the upper resistance,    that will distort the voltage.    The instructions for the a/d input recommend an input impedance in the ballpark of 10 kohms I believe,  not megaohms.

One way to circumvent this problem,  is to take a reading,  and ignore it,  and then take another reading.    The rationale for this,  is that when you take the second reading,   the capacitor in the a/d converter still has most of the current that it sucked in the first time,   so it doesn't need to suck in so  much current the second time,   so the second reading will result in less distortion of the actual voltage divider voltage that you are try to measure.   I have followed this suggestion before and it seems to work.

836  Using Arduino / Sensors / Re: Ammonia Sensor. on: May 22, 2014, 01:06:00 pm
What concentration of ammonia in water are you trying to measure ?

The concentration of ammonia in floor cleaner is usually detemined by measuring the density,  which is a fairly simple procedure also used in beer making.    The relationship between apparent density and ammonia concentration is easily determined,  as long as you can assume there isn't anything else in the liquid.

Measuring the low concentration of ammonia in polluted stream water would be another issue entirely,  quite difficult and probably not possible with a "sensor".

You might also want to look at how they measure dissolved ammonia and related substances in aquarium water.

The ammonia gas sensor you looked at will meaure ammonia in air,   and it is less sensitive than your nose is.



837  Using Arduino / General Electronics / Re: proper wattage for a resistor? on: May 22, 2014, 12:38:43 pm
Quote
Using a 5v input with a 500mah draw

What do you mean by this ?   Input to the arduino,  or input to something else ?  An arduino input is not going to draw 500 mA.    It is not going to draw 500 mah either.
838  Using Arduino / Sensors / Re: Value of an sensitive Analogsensor changes heavy with other power sup. than USB on: May 20, 2014, 11:51:57 am
The resistance of your sensor is supposed to vary from around 10 Mohm without load,  and decreases to about 50 kohm under load.

If you connect it as shown in that diagram,  with a 1 Mohm resistor to ground,    then when it is not loaded,  your analog input voltage should be about 1/11 x 5 volts,   about 0.45 volts,   about 90 analog input counts.

If you load it with the recommended weight of 25 pounds,  and the resistance falls to 50 kohms,  then your analog input voltage should rise to about 4.7 voltags,   and your analog input count should be about 920 counts.

Have you verified this behavior ?

You should do this test,  to verify your device and your circuit is working.   You can use the sketch in the sparkfun tutorial and you can also use a regular multimeter to observe the analog voltage.

The description of what you did in the first post on this thread isn't really clear.
839  Using Arduino / Sensors / Re: i2c read failed: 4 with mpu6050 and saberthooth 2x25 on: May 20, 2014, 11:37:40 am
Quote
Yes there is a logic analyzer for the i2c communication on the begining of the code that forbids the code to move on unless the comunication is established.

You may have misunderstood the question.   A logic analyzer is a kind of oscilloscope which will display the waveform of your I2C bit communications.
840  Using Arduino / Sensors / Re: Maximum number of DS18B20 on one pin on: May 20, 2014, 11:32:58 am
These gadgets each have a 48 bit address.  Every device that comes from their factory allegedly has a unique 48 bit ID.    That is billions of ID numbers.

If you have, say, 10 ( or 50 ) devices on your network,   the first thing you have to do is find out what the numbers of your 10 ( or 50 ) devices are.   Your master device ( ie. your arduino ),  has to look for all of the BILLIONS of 48 bit addresses,    and notice which 10 of those possible billions of addresses responds.   Once it has those 10 ( or 50 ) addresses,  it keeps them in a table  and only tries to talk to those specific addresses.

Suppose you have a cell phone and 50 friends and you lost all your friends number.    You could dial ALL THE CELL PHONES IN THE WORLD and ask them if they are your friend,  and then write down the numbers of the 50 that you find.   This would be an impractical process.   Fortunately,  they have a slightly smarter scheme,  but it still takes a fairly long time.  They use subsets of the 48 bit addresses to save time.
Pages: 1 ... 54 55 [56] 57 58 ... 203