Go to advanced search

by Hove
Mon Sep 25, 2017 7:58 am
Forum: Automation, sensing and robotics
Topic: My crazy quadcopter / Pi Drone experiment
Replies: 9
Views: 6722

Re: My crazy quadcopter / Pi Drone experiment

First, accelerometer + gyro is absolutely critical; without it, all your drone will ever do is flip over and smash itself into the ground. Only once you get that working should you even think about GPS tracking, collision avoidance and all sorts of other things. Have a look at: http://blog.pistuffin...
by Hove
Sat Aug 26, 2017 11:05 am
Forum: General discussion
Topic: PWM max duty cycle.
Replies: 11
Views: 2686

Re: PWM max duty cycle.

Message "joan" directly - I could guess the answers, but better get answers direct from the creator / owner. http://abyz.co.uk/rpi/pigpio/
by Hove
Sat Aug 26, 2017 9:08 am
Forum: General discussion
Topic: PWM max duty cycle.
Replies: 11
Views: 2686

Re: PWM max duty cycle.

pigpio became standard roughly a year ago; the advantage of pigpio is that the PWM is hardware; RPi.GPIO uses software which is fine for dimming LEDs but not for PWM with accurate 1uS resolution pulses. Personally, I don't use pigpio as everything goes through a separate server process but that's ju...
by Hove
Fri Aug 18, 2017 12:51 pm
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

I found these python libraries for Madgwick's algorithm https://pypi.python.org/pypi/scikit-kinematics https://github.com/morgil/madgwick_py But this doesn't solve the problem of needed sample rate. Running the fusion algorithms on the RPi means both the bus between the sensor chip and RPi is flat ...
by Hove
Fri Aug 18, 2017 12:40 pm
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

Just a warning if it's a problem (you'll know not me) but in https://github.com/RTIMULib/RTIMULib2/blob/master/README.md It says the BNO055 has problems on a Pi2 (so probably other Pi too?) Bosch BNO055 IMU with onchip fusion. Note: will not work reliably with RaspberryPi/Pi2 due to clock-stretchin...
by Hove
Fri Aug 18, 2017 9:21 am
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

I'm using a much simpler filter to Kalman (i.e Complementary), and it works well enough for me. The filtering / fusion for me is taking inputs from two sensors, one of which has short term accuracy, the other has long term accuracy, but short term, it is either noisy or new inputs happen infrequentl...
by Hove
Fri Aug 18, 2017 6:45 am
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

The problem here is I'm weird! I'm not making a piDrone to fly it. It's more of an intellectual challenge to find out how these things work from scratch. I'm reinventing the wheel! Which means I want all the sensors in raw format, and fuse them all in my code. It's a perfect antivirus for the termin...
by Hove
Thu Aug 17, 2017 2:07 pm
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

I just use very simple complementary filter because it was easy to understand when I started and lightweight, and as yet, I've never needed to move to Kalman or Madgwich (never even heard of that until now!). I use the complementary everywhere integrated gyro pitch / roll angles (short term) + accel...
by Hove
Thu Aug 17, 2017 5:53 am
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

Yes, you've understood everything correctly. The 9250 can do some of the processing for you using the "Digital Motion Processing" unit, but it's not documented anywhere how! It is used though so it might be worth googling it just in case you can find out more about it. For me, I wanted the raw data ...
by Hove
Wed Aug 16, 2017 8:49 am
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

Best first guess, have a look at flushFIFO() - the last line sets up which registers get fed to the fifo - mines gyro+accelerometer. The FIFO fills up fast (only 512 bytes), hence the earlier code in flushFIFO() to empty it first. After that, my code down at "while self.keep_looping:" is _very_ care...
by Hove
Wed Aug 16, 2017 8:35 am
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

I'm just working on GPS autonomous flight paths, but after that, I'm hoping to use SLAM (with Scanse Sweep) for getting my piDrone to fly independently through a maze. Not confident I'll get that to work but always like a challenge
by Hove
Wed Aug 16, 2017 8:17 am
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

Thank you!! It is night time here in Australia and I have a case of man flu so I will leave it till to morrow to print out all your code and peel over it with a magnifying glass to see what your doing different to me :) P.S. The top 1000 loc are the I2C + MPU9250 classes - below that is more sensor...
by Hove
Wed Aug 16, 2017 8:10 am
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

Quadcopter code is 100% my design; started it 5 years ago in complete ignorance as a challenge to see whether it can be done on a Raspberry Pi with standard Raspian in python. There's an awful lot of waffling on my blog as I use it as a notebook to remind me what I'm doing. I really wouldn't spend t...
by Hove
Wed Aug 16, 2017 7:31 am
Forum: General discussion
Topic: MPU9250 9 axis motion sensor
Replies: 27
Views: 16816

Re: MPU9250 9 axis motion sensor

I've been using the MPU-9250 for my piDrone since it has been released. It works well but does require calibration - for the gyro, I do this prior to every flight immediately before takeoff - it takes just milliseconds. For the magnetometer, I do this very rarely when either when I change my PCB & h...
by Hove
Sun Aug 06, 2017 7:50 am
Forum: General discussion
Topic: keeping the temp low without fans?
Replies: 14
Views: 3151

Re: keeping the temp low without fans?

You could try fixing the clocks to their idle values to see if you still have performance to do what you want, you can probably do this in config.txt. Only other thing I can think of is some sort of heat spreader in the form of a shaped piece of aluminum bonded to the cpu. @Hove, you may want to re...
by Hove
Sun Aug 06, 2017 6:55 am
Forum: General discussion
Topic: keeping the temp low without fans?
Replies: 14
Views: 3151

Re: keeping the temp low without fans?

Chill out :D 55's fine - the CPU will slow things down at 85, so you've got 30 to spare at the moment. There are low profile heatsinks available if you really must, but honestly, there's no need to worry. Using my Pi0W at full speed with camera motion processing and 5 other sensors, and I couldn't g...
by Hove
Mon Jul 17, 2017 5:38 pm
Forum: Beginners
Topic: read i2c data from sensor
Replies: 2
Views: 523

Re: read i2c data from sensor

Your wiring is correct

Run "sudo raspi-config" to check if I2C is enabled. If not, set it and reboot.

Run "i2cdetect -y 1" to see if the I2C address of your AM2315 shows up at row / column 5, C in the graph.

If that all works, the sensors is working, and you can start coding!
by Hove
Sat Jul 15, 2017 8:41 pm
Forum: Camera board
Topic: RESOLVED: Macro-block buffering
Replies: 26
Views: 4738

Re: RESOLVED: Macro-block buffering

Out of curiosity, what are you using for the "-ex" option, Hove? To be honest, I can't remember: at a guess I was just experimenting to find the best options. I don't use raspivid now, I use python picamera; and I'm explicitly setting contrast but not exposure. It's working for me, though I haven't...
by Hove
Thu Jul 06, 2017 6:51 am
Forum: Camera board
Topic: SOLVED:Pi Camera V2 video compression in GPU, CPU or camera?
Replies: 11
Views: 3469

Re: SOLVED:Pi Camera V2 video compression in GPU, CPU or cam

Out of curiosity, have you already disabled CPU power saving features? force_turbo=1 in /boot/config.txt? Yes! Python does have garbage collection though very few variables in my code are short lived. As I'm using CPython, collection is efficient, as soon as they drop out of context - i.e. the coun...
by Hove
Wed Jul 05, 2017 4:26 pm
Forum: Camera board
Topic: SOLVED:Pi Camera V2 video compression in GPU, CPU or camera?
Replies: 11
Views: 3469

Re: SOLVED:Pi Camera V2 video compression in GPU, CPU or cam

How do you communicate inbetween the parts ? Python Queues ? Pipes ? Sockets ? ghans OS level shared memory FIFO, with io.open() to get the fd, and then poll() (have used select() too) to trigger a read() on the FIFO when there's something to read. This was the first way I tried for the PiCamera, a...
by Hove
Sun Jul 02, 2017 9:11 pm
Forum: Raspberry Pi OS
Topic: RPIO problems due to Jessie upgrade
Replies: 7
Views: 1507

Re: RPIO problems due to Jessie upgrade

The author of the RPIO library is Chris Hager. You could ask him via his github repository: https://github.com/metachris/RPIO/issues (Although there have been no changes to the RPIO library for the last 2 years there is evidence that Chris is actively using his github account for other projects.) T...
by Hove
Sun Jul 02, 2017 6:06 pm
Forum: Raspberry Pi OS
Topic: RPIO problems due to Jessie upgrade
Replies: 7
Views: 1507

Re: RPIO problems due to Jessie upgrade

If you ask the author nicely, perhaps he'll upgrade his RPi.GPIO to support tristate? Worth a try? He's "Croston" here.
by Hove
Sun Jul 02, 2017 8:19 am
Forum: Raspberry Pi OS
Topic: RPIO problems due to Jessie upgrade
Replies: 7
Views: 1507

Re: RPIO problems due to Jessie upgrade

I'm no expert in I2C details, but here's what I've heard: There's a bug in the chipset level of I2C implementation of clock-stretching. I don't think there is a fix or workaround as it's a hardware flaw: https://www.raspberrypi.org/forums/viewtopic.php?p=282071 There has been a recent kernel change ...
by Hove
Sun Jul 02, 2017 5:58 am
Forum: Raspberry Pi OS
Topic: RPIO problems due to Jessie upgrade
Replies: 7
Views: 1507

Re: RPIO problems due to Jessie upgrade

Hi Ludo, If you don't need hardware PWM, you don't need RPIO - just use RPi.GPIO. If you do need hardware PWM, and you have a Zero, B2 or 3, you do need the v2 version. I've run this version on Zero, Pi0W, 2B 2B+ and 3B and all work perfectly. If the problem is with I2C, then there has been an updat...
by Hove
Thu Jun 29, 2017 2:35 pm
Forum: Camera board
Topic: RESOLVED: Macro-block buffering
Replies: 26
Views: 4738

Re: RESOLVED: Macro-block buffering

You can get around buffering on Python 2 by using io, so instead of using file = open(filename), you import io and do file = io.open(filename, buffering = 0) - has worked perfectly for me.

Go to advanced search