Loading...
  Show Posts
Pages: 1 ... 51 52 [53] 54 55 ... 67
781  Using Arduino / Motors, Mechanics, and Power / Re: HELP 4 motors 1 arduino on: June 27, 2012, 03:27:28 pm
They use only little current, so the schematic with the transistor is a good solution.

The Arduino has a number of pins that are PWM capable. You need those pins.
If the motor is full on, and you use it with 12V, the motor gets about 12V (maybe 11.9V because of the voltage drop of the transistor). How fast they would run, depends on the motor.

The PWM output is able to change from 0 (completely off, output pin is 0V) to 255 (completely on, output pin is 5V).
782  Using Arduino / Sensors / Re: Digital Accelrometer, am I missing something? on: June 27, 2012, 01:33:08 pm
You need a better sensor.

This one is only 6 bits. Others are 10 to 16 bits.
You could average a few samples, which will smooth a motion. But for tilt detection, you can't get more than those 6 bits.
783  Using Arduino / Sensors / Re: MPU6050 + arduino nano + raw data over serial on: June 27, 2012, 08:57:40 am
The Wire.write() is a function, which is used during the I2C-communication: http://arduino.cc/en/Reference/WireWrite

In my sketch ( http://arduino.cc/playground/Main/MPU-6050 ) I have already made a function which you can use to write to a register of the MPU-6050, called "MPU6050_write()".
You could try to write a few registers. If you understand how to use it, you might try the library by Jeff Rowberg http://www.i2cdevlib.com/devices/mpu6050#source
784  Using Arduino / Sensors / Re: MPU6050 SparkFun Breakout to Arduino Uno - No Communication on: June 27, 2012, 03:51:42 am
You don't have I2C communication (or the sensor is broken).

I read that you already did the scanner sketch.
As I wrote in the other thread: I used this code by user RandallR for scanning. See here: http://arduino.cc/forum/index.php/topic,96952.msg738703.html#msg738703
Can you try the scanner sketch once more?
Do you have any other I2C device, to test the I2C bus with the scanner sketch ?
I use a I2C EEPROM to test the I2C bus, that chip operates at 3.3V, but also at 5V.

Is your AD0 soldered on the sensor board to either one (ground or 3.3V)? Just as in the photo of Obakemono ?


Meanwhile in the other thread, the pull-up resistors seem critical: http://arduino.cc/forum/index.php/topic,111698.msg840273.html#msg840273

785  Using Arduino / Sensors / Re: MPU6050 + arduino nano + raw data over serial on: June 27, 2012, 02:02:28 am
IT'S ALIVE!!!!!!!!!!!!!!!!!!!!
Congratulations!

Which it's the range of values of the gyro and accel? if it's in 16 bits, one bit for the sign and number between -32767 and 32767
Yes, that is the range.
You have to study the datasheet(s) for the sensitivity and the digital low-pass and high-pass filter.
786  Using Arduino / Sensors / Re: MPU6050 SparkFun Breakout to Arduino Uno - No Communication on: June 27, 2012, 01:56:01 am
...I keep getting a constant stream of 5883...

Can you try my sketch : http://arduino.cc/playground/Main/MPU-6050
It checks for every error that could occur during the i2c communication.
787  Using Arduino / Sensors / Re: MPU6050 + arduino nano + raw data over serial on: June 26, 2012, 08:56:05 pm
The values change a lot, but it's not dramatically. The values are 16-bit, and they should be filtered/averaged.

If I put it on the same table of my computer, the vibration of my computer is measured.
So I place it on the floor for (a little) better readings.
You could rotate the board in all directions, and see what the acceleration values do.
The gyro is harder to recognize, but they will change if you move the board upward or sideward.

For proper I2C communication a level shifter could be used: http://arduino.cc/playground/Main/I2CBi-directionalLevelShifter
But just two resistors of 4k7 to the 3.3V will do fine, the Arduino will read the 3.3V as a logical '1'.
The 10k on the sensor board is probably just a little too much outside the specs.
788  Using Arduino / Sensors / Re: MPU6050 SparkFun Breakout to Arduino Uno - No Communication on: June 26, 2012, 06:16:52 pm
Check your wiring once more.
AD0 must be connected to ground or 3.3V (with solder jumper). Connect it to ground for I2C address 0x68.
SCL and SDA are connected directly to the Arduino, but you could add extra pull-up resistors to the 3.3V. The resistors could be 4k7 or 10k (the board already has 10k pull-up resistors, but I prefer 4k7).
You don't need the INT, you could leave it open.
The CLKIN and FSYNC can be tied to ground, because they are not used.

If you have all this, the scanner sketch should be able to find it.


I'm confused !
Is this crossposting ?  http://arduino.cc/forum/index.php/topic,111698.0.html
If you bought a new sensor module, and started a new topic, you should have mentioned at the beginning that you made this posting before.
It's okay, as long as you let us know.
789  Using Arduino / Sensors / Re: MPU6050 + arduino nano + raw data over serial on: June 26, 2012, 03:03:53 pm
So this is your board with sensor: http://www.drotek.fr/shop/en/42-mpu6050-gyro-accelerometer.html
That page also shows how to use it. It has a voltage regulator on the board.
Connect the 5V of the sensor board to the 5V of the arduino.
The 3.3V of the sensor board is an output, don't use it.

I'm pretty sure that the two black 10k resistors on the sensor board are pull-up resistors for the I2C bus, but 4K7 is better to avoid problems with the internal pull-up resistors of the Arduino (the internal pull-up resistors pull the signal to 5V, see: http://arduino.cc/playground/Main/I2CBi-directionalLevelShifter ), so you could add two extra 10k pull-up resistors to 3.3V (The 3.3V of the Arduino, or the 3.3V output of the sensor board). It looks as if you have already those 10k pull-up resistors.

The page at drotek says: I2C address: 0x69
So they have a pull-up on the address pin, mine had a pull-down. I will change my page with the example sketch.

Now for your values:
error = 0 : good, i2c communication is okay.
temperature : good
acceleration values : good, the module is upside down, so the z-axis is negative (-1 g)
gyro : I think they are also good.

Here are my values (raw values, not calibrated, no offset compensation).
My MPU-6050 sensor is in normal position, with the z-axis pointing up.
Code:
InvenSense MPU-6050
June 2012
WHO_AM_I : 68, error = 0
PWR_MGMT_2 : 0, error = 0

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: -384, -284, 15236
temperature: 27.706 degrees Celsius
gyro x,y,z : 394, 201, -806,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: -312, -356, 15232
temperature: 27.706 degrees Celsius
gyro x,y,z : 386, 205, -818,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: -468, -392, 15192
temperature: 27.847 degrees Celsius
gyro x,y,z : 387, 197, -794,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: -380, -380, 15256
temperature: 27.659 degrees Celsius
gyro x,y,z : 388, 209, -808,

If you rotate and move the sensor, you should see the values change.

You are doing fine so far.
790  Using Arduino / Sensors / Re: MPU6050 + arduino nano + raw data over serial on: June 26, 2012, 10:57:12 am
I wrote the page http://arduino.cc/playground/Main/MPU-6050 and it should provide you with a sketch that runs without problem.

You have to get a I2C connection of course.
Do you use a board with the MPU-6050? Which one ? Some have a voltage regulator on board. The board I used also has the right pull-up and pull-down resistors, so I only had to use the power supply and the I2C-bus.

I used code by user RandallR for scanning. See here: http://arduino.cc/forum/index.php?topic=96952.0

About the power supply. The MPU-6050 needs 3.3V (if there is no regulator on the MPU-6050 board). Pull-up registers of 4k7 can be used to pull-up to the 3.3V. Can you upload a photo perhaps ? So we know what and how you are using it ?
791  Using Arduino / Microcontrollers / Re: Extremely efficient code. on: June 26, 2012, 10:40:38 am
You have already done some good optimizations.
Your use of the 'dcount' variable can be written shorter in 'C' (with less program lines), but the compiler won't make smaller code.

I don't know if user defined compiler options is already implemented. Arduino uses common optimizations for size, so it doesn't use the most extreme compiler options for speed.

What are the mask(), unMask() and setReg() functions or macro's ? If setReg() is for a register, why use setBit() for a register ?
792  Using Arduino / Sensors / Re: could I use arduino in place of an amplifier in basic geiger counter? on: June 25, 2012, 01:28:19 pm
Quote from: Magician
They used audio transformer to generate high voltage, not for audio output....
Alternative is semiconductor , "elektor" has published a series of articles, stating last year
Thanks Magician, for the info.
793  Using Arduino / Sensors / Re: could I use arduino in place of an amplifier in basic geiger counter? on: June 25, 2012, 09:31:32 am
The Sparkfun Geiger counter doesn't use an Arduino. But since they use the same processor it is easy to adapt. Using an Arduino makes it even easier. The chip for USB is already on the Arduino board, and the tranformer for audio out is not needed if a piezo beeper is used.

This is the link to the Sparkfun page : http://www.sparkfun.com/products/10742
They use the LND712 Geiger tube.
This is the page for the LND712 : http://www.lndinc.com/products/711/
The LND712 need 500V (recommended operating voltage).

Anyone knows a cheaper Geiger tube ? or an alternative way to detect radiation ?
794  Using Arduino / Motors, Mechanics, and Power / Re: MEGA 2560 - LCD 4 bit 1602 - 50A H bridge motor driver - HELP? on: June 24, 2012, 01:36:47 am
zoomkat, it's nice to see what the inner of my S3003 is, but I ment the schematic of the wingxine NISI IMS-1 "Arduino50A" alfs-tech.taobao.com 50A single H-bridge.
795  Using Arduino / Motors, Mechanics, and Power / Re: MEGA 2560 - LCD 4 bit 1602 - 50A H bridge motor driver - HELP? on: June 23, 2012, 07:09:03 pm
...I'd be interested in seeing if the internals of a cheap $2 servo could drive these bridges for making monster servos.
I think they can. But you need the schematic to be sure, and so far, no one has been able to retrieve the schematic.
Pages: 1 ... 51 52 [53] 54 55 ... 67