Jump to content
I2Cdevlib Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


gregac last won the day on August 3 2015

gregac had the most liked content!

gregac's Achievements


Newbie (1/14)



  1. Spilz, I'm sorry but I never found solution for this. I solved it with "Detecting Micro Motion Sensor" element. It is kind of switch with two balls that are closing contact when moved. Regards, Gregor
  2. Hi, I have completely opposite problem. No matter how I set interrupt registers I'm receiving interrupts at 100Hz rate. But what I would need is interrupt only on some motion. Any idea what could it be? Thx.
  3. Ferrocen, Thank you for the suggestion. I checked X-IMU, but can not find how it could help in my case? Actually I'm implementing something else: Sensor would be inside hexagonal dice. Each side of dice would have it's own led diodes around the corners (so it is easily seen when landed). In the dice would be mpu6050 (or similar), stripped down arduino nano running at 8Mhz, 3.3V and led (or more of them) for each dice side. When dice would land, Arduino (with help of MPU6050) would turn on leds around the dice side on which it landed. I have quite a few challenges here: No way to shut off electronics - no switches Circuit is placed inside the dice. There is a way to change batteries with unscrewing some "sides", but it is too complicated to do it each time dice is used. There are 3 AAA batteries inside. They should last at lease few weeks when in sleep mode. when dice is not in use, Arduino and MPU should go to sleep mode. Arduino would go to sleep mode if it won't receive interrupt from MPU for some time. MPU would go to cycle mode when there is no movement. Arduino would wake up when next interrupt would be received from MPU. MPU would wake up on first movement above threshold. This is where I'm facing two problems: - MPU is sending moving interrupts even if it is standing still on my table. - If I enable cycle mode I get "DMP Initialization failed (code 1)" sampling rate of MPU can be low as possible (if that would effect battery life) For this particular project it would be enough if MPU would measure it's position 1times/second - dice land and after a sec yaw, pitch and roll is read and appropriate LEDs are turned on. I was experimenting with this and found out that if I set sampling to slowest possible B11111111, MPU readings become strange - like it is not detecting that circuit was moved. From my examples I guess lowering sampling rate is not a good idea. What do you think? calibration can be done only once (when circuit is assembled). I don't need great accuracy to find out on which side dice has landed. But it needs to be stable and with out drifting. How I see calibration process: 1. Assembled circuit is placed on perfectly flat surface. 2. dedicated pins are shorten on Arduino which triggers calibration procedure. 3. calibration procedure reads current MPU position and set it as offset - so current position (ypr) would be 0,0,0 The biggest problem at the moment is how to enable cycle mode and properly configure interrupts (there could also be possibility that my MPU is broken). I would need a way to find out what is triggering motion interrupt. Any suggestion?
  4. Hi, I'm using MPU6050 breakout board with I2CDevLib (mpu6050 teapot example). What I would like to achieve is that interrupt is triggered when there is actually some motion on sensor (if I move it with hand for example). Based on MPU6050 documentation I set INT_ENABLE (with setIntEnabled function) to B00000010. This should mean that interrupt should be triggered based on the selected motion threshold only. Well, the problem is that no matter how I set threshold I still get continues interrupts at ~100Hz rate (100 int/sec) (measured by oscilloscope on MPU int line) As mpuIntStatus I get 00000011 or 00000010. Which means that interrupt was triggered by "motion detection" (MOT_INT). This are my current threshold settings: Actually they are as they were in teapot example. DEBUG_PRINTLN(F("Setting motion detection threshold to 2...")); setMotionDetectionThreshold(2); DEBUG_PRINTLN(F("Setting zero-motion detection threshold to 156...")); setZeroMotionDetectionThreshold(156); DEBUG_PRINTLN(F("Setting motion detection duration to 80...")); setMotionDetectionDuration(80); DEBUG_PRINTLN(F("Setting zero-motion detection duration to 0...")); setZeroMotionDetectionDuration(0); I'm wondering: - what could I overlooked? Are there some additional register settings I need to make? - What is triggering motion interrupt? - Do I maybe have faulty MPU - received values are looking fine/are quite stable though (if +/- 1 deg in considered stable) I would be glad if someone could give me some suggestion where to look further. I already spent few days figuring this out. Thx, Gregor
  • Create New...