Using an eeprom on I2C bus

Firmware/software/electronics/mechanics
Post Reply
rb13g11
Beginner
Posts: 3
Joined: Sat Dec 07, 2013 7:42 pm

Using an eeprom on I2C bus

Post by rb13g11 »

Hi all

I'm doing a project analyzing the flight dynamics of the Crazyflie using only internal sensors. I need to log as much data as possible to do this properly, but have only been able to collect data at 20Hz due to various limitations.

Ideally I would like to collect data at 250Hz, so each iteration of the stabilizer loop. My idea is to attach an 8 pin 1MB eeprom to the Crazyflie through the I2C bus, write the data and then upload it all afterwards.

I've read several threads about the I2C bus, but I'm still unsure whether it is usable or not, I've also noticed the driver has been updated in the repo.

Would I be able to write (and maybe read) data to the eeprom using the I2C bus?

If so, is the Crazyflie capable of writing 10 floating point values at 250Hz?

Thanks in advance.
Kind regards
Rushin
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Using an eeprom on I2C bus

Post by tobias »

Hi Rushin,

Logging all sensors at high speed is actually a bit of a problem. We tried using a sd-card connected to the crazyflie but did not fully work out. A eeprom might actually be a better idea but check the write speeds first. Also running both I2C1 and I2C2 in parallel might not work that well the way the driver is implemented.

Making a special radio packet where you pack as much data as possible might be the best option but that requires you to learn the code and the system. The radio implementation as it is now is capable of sending ~1000 packes/second so it should be enough for what you are trying to do.
rb13g11
Beginner
Posts: 3
Joined: Sat Dec 07, 2013 7:42 pm

Re: Using an eeprom on I2C bus

Post by rb13g11 »

Hi Tobias

Thanks for the reply.

I attempted using a log group for each variable to limited success.

From what I understand you're suggesting to change Log.c to send more than one measurement in each packet. I have a basic understanding of how the crazyflie firmware works, but would I only have to make changes in Log.c for this to work? Because I'm not very familiar with the OS.

Also, another limiting factor is the speed of the VM, is there a way to make it run faster? BTW I'm using VMware Workstation 10.

Kind regards
Rushin
Post Reply