Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Sensors / Re: Can i connect 1 Sensor to 2 Arduino Board using I2C? on: September 18, 2013, 01:18:09 am
Quote
Can i connect 1 sensor (MPU6050) to 2 Arduino boards at the same time using I2C connection?
Yes but you will need some I2C multi master software to drive it.

Is there any example code?
And i found this from simplebgc.com:
http://www.simplebgc.com/files/v10/SimpleBGC_connection_diagram.pdf

The I2C wire from MPU6050 is split to 2 board. How it's possible?
2  Using Arduino / Programming Questions / Re: How to send data from I2C to another microcontroller? on: September 17, 2013, 09:08:53 pm
You could try SoftwareSerial. It adds an extra serial port to both Arduino boards.
http://arduino.cc/en/Reference/SoftwareSerial

You can also use I2C, but only if there is one Master.
You cannot request data from two Arduino boards from a single MPU-6050.
You could make one Arduino board the Master and request data from the MPU-6050 and send it to the other Arduino board (the other one is set as Slave). I think the SoftwareSerial is easier that this.


Is SoftwareSerial support float variable? I mean, i want to send float variable, can i do this with software serial?
3  Using Arduino / Programming Questions / Re: How to send data from I2C to another microcontroller? on: September 17, 2013, 08:46:40 pm
Quote
You could try SoftwareSerial. It adds an extra serial port to both Arduino boards.
http://arduino.cc/en/Reference/SoftwareSerial

You can also use I2C, but only if there is one Master.
You cannot request data from two Arduino boards from a single MPU-6050.
You could make one Arduino board the Master and request data from the MPU-6050 and send it to the other Arduino board (the other one is set as Slave). I think the SoftwareSerial is easier that this.

Thanks caltoa, i will try it..


4  Using Arduino / Sensors / Can i connect 1 Sensor to 2 Arduino Board using I2C? on: September 17, 2013, 08:43:55 pm
Hi everyone..

Can i connect 1 sensor (MPU6050) to 2 Arduino boards at the same time using I2C connection? Are both of Arduino Board can read the sensor at the same time?

Thank You..
5  Using Arduino / Programming Questions / Re: How to send data from I2C to another microcontroller? on: September 17, 2013, 07:56:55 pm
The first question is why you want to send it to another uC. Is your original one not able to handle the job? Why is a second one required?

Second question is how are you going to connect them? SPI? IIC? Serial? digitalWrite and analogWrite will be useless to you for this.

 Because i need more PWM. I use ATMega 328, it just has 6 PWM pin, i need 9. I have 2 arduino board, i want both of them can read value from 1 MPU6050. Is that possible?
6  Using Arduino / Sensors / Re: How to Connect IMU Sensor --> Arduino --> Arduino? on: September 17, 2013, 07:54:58 pm
Please, need help..
7  Using Arduino / Programming Questions / How to send data from I2C to another microcontroller? on: September 17, 2013, 10:27:36 am
I already can read the data from MPU6050 via I2C and convert it into angular. Then I want to write the value of this angle to the output pin. This output pin data will connected into another microcontroller. What commands should i use? analog write or digital write? Or there is another way to do this?

Thank You..
8  Using Arduino / Sensors / How to Connect IMU Sensor --> Arduino --> Arduino? on: September 17, 2013, 10:09:41 am
Hi, i have 2 Arduino Board:
- Arduino Uno
- Multiwii 328p fligt controller

And an IMU sensor (MPU6050)

I want my 2 arduino board can read value from 1 MPU6050. How i can connect them all?

Like this:


Or like this:


Or may be there is other way to connect all of them?

Thank You..
9  Using Arduino / Project Guidance / Re: Arduino Mega 2560 Stop Read IMU every PWM Pin Connected to Motor Driver on: September 16, 2013, 10:14:08 am
UPDATE: Sometimes it will works normal, but sometimes it will error again.

AND THIS IS VERY STRANGE:
When my program running (i watch it on serial monitor), then i touch the heatsink part of my motor driver circuit, it will stop running. I do this many times to make sure, and it's always happen.

What happen? I'm very frustration..
10  Using Arduino / Project Guidance / Arduino Mega 2560 Stop Read IMU every PWM Pin Connected to Motor Driver on: September 16, 2013, 09:55:49 am
Hi, i have strange Error on my Arduino Board. I have Arduino Mega 2560 R3, i use the board to read IMU sensor and move the motor based on IMU position. I connect PWM pin from Arduino Mega 2560 to L6234D motor driver.

The problem is, every time i connect any PWM Pin, the it will stop read IMU. If i not connect the PWM pin, it will running well.

Whats wrong with my Board? Previously, I have tested my code with my old Arduino Mega 2560, and it's works well. Then, my board is broken, and i replace it with my new Arduino Board, And this problem appear.

Can anybody help me?

11  Using Arduino / Installation & Troubleshooting / Re: Arduino Mega 2560 getting very HOT! on: September 13, 2013, 03:50:01 am
Both parts?
Regulator is not powered when running from USB.
Are you getting 5V from the regulator, or something else?

When i connect it with USB and measure the Voltage on the regulator, it shows 3.1 V, not 5 V
12  Using Arduino / Installation & Troubleshooting / Arduino Mega 2560 getting very HOT! on: September 12, 2013, 08:28:33 am
Hi, my Arduino Mega 2560 getting very Hot, even when i just connect it with USB. ATMega 2560 Microcontroller and the voltage regulator is the part that getting Hot. Has anyone ever experienced anything like this?

My Board is not the Original, it's clone from Hobby King:
http://www.hobbyking.com/hobbyking/store/__25085__arduino_mega_2560_microcontroller_board.html

Thank You..
13  Using Arduino / Programming Questions / Re: Arduino Mega 2560 PWM Setting on: July 27, 2013, 01:35:43 am
So, solved?
Yes, it solved, Thank You..
14  Using Arduino / Programming Questions / Re: Arduino Mega 2560 PWM Setting on: July 24, 2013, 12:00:41 am
Which one? You seem to be using 3 timers there. Can you post a full sketch that demonstrates this?

Yes, it is same, and it is works now. I forget to change PIN configuration before. This is the code:
Code:
 
  //ATMega 2560 Pin
  pinMode(13, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(11, OUTPUT);
  /*
  //Atmega 328p Pin
  pinMode(3, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  */
  
#ifdef PWM_8KHZ_FAST
  TCCR0A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM01)| _BV(WGM10);
  TCCR0B = _BV(CS01);
  TCCR1A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM10);
  TCCR1B = _BV(WGM12) | _BV(CS11);
  TCCR2A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM21)| _BV(WGM20);
  TCCR2B = _BV(CS21);
#endif

#ifdef PWM_32KHZ_PHASE
  TCCR0A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM00);
  TCCR0B = _BV(CS00);
  TCCR1A = _BV(COM1A1) | _BV(COM1B1) | _BV(WGM10);
  TCCR1B = _BV(CS10);
  TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM20);
  TCCR2B = _BV(CS20);
#endif

#ifdef PWM_4KHZ_PHASE
  TCCR0A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM00);
  TCCR0B = _BV(CS01);
  TCCR1A = _BV(COM1A1) | _BV(COM1B1) | _BV(WGM10);
  TCCR1B = _BV(CS11);
  TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM20);
  TCCR2B = _BV(CS21);
#endif

  TIMSK1 |= _BV(TOIE1);
  sei();

  // Enable Timer1 Interrupt for Motor Control
  OCR2A = 0;  //11  APIN
  OCR2B = 0;  //D3
  OCR1A = 0;  //D9  CPIN
  OCR1B = 0;  //D10 BPIN
  OCR0A = 0;  //D6
  OCR0B = 0;  //D5
15  Using Arduino / Programming Questions / Re: Arduino Mega 2560 PWM Setting on: July 18, 2013, 07:23:32 am
They won't be identical. You'll have to haul out the datasheet and do some reading.

I have read the datasheet, they looks identical..

Oh, sorry, they looks identical, but when i try with same code, it didn't works well. I must have missed something..
Pages: [1] 2 3 ... 5