Page 9 of 9

Re: Driving multiple servos from the RaspberryPi

Posted: Sun Feb 08, 2015 4:56 pm
by mikerr
Servoblaster doesn't work with the new Pi 2 , and according to this is a simple change:
joan wrote:Anything which uses userland DMA will require updating above and beyond the peripheral base address move (0x20000000 -> 0x3F00000) to work on the Pi 2.

Looking in servo.d I see

Code: Select all

#define DMA_BASE                0x20007000
#define DMA_LEN                 0x24
#define PWM_BASE                0x2020C000
#define PWM_LEN                 0x28
#define CLK_BASE                0x20101000
#define CLK_LEN                 0xA8
#define GPIO_BASE               0x20200000
#define GPIO_LEN                0x100
#define PCM_BASE                0x20203000
#define PCM_LEN                 0x24
So it should be a matter of editing those to the following and recompiling ?

Code: Select all

#define DMA_BASE                0x3F007000
#define DMA_LEN                 0x24
#define PWM_BASE                0x3F20C000
#define PWM_LEN                 0x28
#define CLK_BASE                0x3F101000
#define CLK_LEN                 0xA8
#define GPIO_BASE               0x3F200000
#define GPIO_LEN                0x100
#define PCM_BASE                0x3F203000
#define PCM_LEN                 0x24
I guess this would make a Pi-2 specific version

Re: Driving multiple servos from the RaspberryPi

Posted: Sun Feb 08, 2015 5:15 pm
by joan
mikerr wrote:Servoblaster doesn't work with the new Pi 2 , and according to this is a simple change:
joan wrote:Anything which uses userland DMA will require updating above and beyond the peripheral base address move (0x20000000 -> 0x3F00000) to work on the Pi 2.
...
...
So it should be a matter of editing those to the following and recompiling ?
...
Afraid not. With "will require updating above and beyond the peripheral base address move" I was trying to point out there is rather more involved than just changing a number and recompiling.

Re: Driving multiple servos from the RaspberryPi

Posted: Wed Apr 08, 2015 11:22 am
by mikerr
Richard has posted a new pi-2 version here:

http://www.raspberrypi.org/forums/viewt ... 5&start=47

works for me ;)

Re: Driving multiple servos from the RaspberryPi

Posted: Fri Apr 24, 2015 8:59 am
by raver79
Hi

I am having a bit of a problem. I have managed to wire up two servos to create a pan/tilt mechanism for my camera. The servos are both moving although one servo moves to the default position before moving to the position i have requested. If i ask it to go to 50% for example it goes to 0% and then moves to 50%. Anyone got any idea how i may be able to solve this problem?

Dean

Re: Driving multiple servos from the RaspberryPi

Posted: Fri Apr 24, 2015 9:20 am
by joan
raver79 wrote:Hi

I am having a bit of a problem. I have managed to wire up two servos to create a pan/tilt mechanism for my camera. The servos are both moving although one servo moves to the default position before moving to the position i have requested. If i ask it to go to 50% for example it goes to 0% and then moves to 50%. Anyone got any idea how i may be able to solve this problem?

Dean
Is this a one-off initialisation problem or does it happen whenever you change servo position?

Anyhow, check your code. It seems unlikely to be a problem with servoblaster.

Re: Driving multiple servos from the RaspberryPi

Posted: Mon Apr 27, 2015 6:10 pm
by raver79
Hi

It happens whenever i change the servo position

Re: Driving multiple servos from the RaspberryPi

Posted: Mon Apr 27, 2015 6:57 pm
by joan
raver79 wrote:Hi

It happens whenever i change the servo position
I've not heard of anything like that before.

Which Pi model and which model of servos?

Re: Driving multiple servos from the RaspberryPi

Posted: Mon Apr 27, 2015 7:47 pm
by raver79
It's the B+ model. The other servo is fine. I have a feeling that one of them is faulty. I have contacted the seller off Amazon. It's a Tower Pro servo

Re: Driving multiple servos from the RaspberryPi

Posted: Mon Apr 27, 2015 11:32 pm
by ame
raver79 wrote:It's the B+ model. The other servo is fine. I have a feeling that one of them is faulty. I have contacted the seller off Amazon. It's a Tower Pro servo
Did you try swapping the connectors over? i.e. drive the 'faulty' servo from the 'good' servo's GPIO?

If the 'good' servo shows the same faulty behaviour, or the 'faulty' servo gets better then you know it's a software problem.

Re: Driving multiple servos from the RaspberryPi

Posted: Mon Mar 27, 2017 6:38 pm
by jcg1541
Love it. Just don't put it on the transatlantic 747 plane that I will fly to Paris to visit my wife's family.