Author Topic: RFduino iOS Servo App  (Read 7774 times)

Armen

  • Global Moderator
  • *****
  • Posts: 15
  • Karma: +1/-0
    • View Profile
RFduino iOS Servo App
« on: November 04, 2013, 06:14:51 PM »
Here is the link to the RFduino iOS Servo App
https://itunes.apple.com/us/app/rfduino-servo/id692552931?mt=8

Armen

  • Global Moderator
  • *****
  • Posts: 15
  • Karma: +1/-0
    • View Profile
Re: RFduino iOS Servo App
« Reply #1 on: November 04, 2013, 07:07:07 PM »
The source code for the iOS Apps are located here in this zip file:
http://www.rfduino.com/RFduino305.zip

Unzip the file.
Go to this folder:
RFduino\iPhone Apps\

There you will find the source for the 4 iOS demo apps.

seank

  • RFduino Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: RFduino iOS Servo App
« Reply #2 on: November 23, 2013, 01:37:35 PM »
Well, I hooked up my RFduino and the USB shield and uploaded the sketch and installed the iOS "RFduino Servo" app.  To my surprise it works! Very cool!

However, the servo does not sit still when I am not changing the position via the iOS app.  It jiggles its position back and forth slightly.  I can't figure out what is causing this.   When I run my own simple sketch to control the servo without the iOS app, it behaves as one would expect with no movement between calls to Servo.write().

Does anyone know why this is happening?

Carl Bellingan

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: RFduino iOS Servo App
« Reply #3 on: December 08, 2013, 02:42:54 AM »

Gordon

  • RFduino Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RFduino iOS Servo App
« Reply #4 on: March 14, 2014, 10:17:03 AM »
I am having the same problem with my application.

Went to the link recommended and it was interesting but not helpful.

I have one other behavior to note.  When I disconnect the App from the RFDuino and shields the jitter stops and it holds the position.

The jitter is slight pulses at about half second intervals with only slight but obvious rotation.


Rich

  • RFduino Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: RFduino iOS Servo App
« Reply #5 on: March 23, 2014, 02:34:52 PM »
I am having the same issue.   With your servo shield, your example servo code, and the iOS Servo App, the servos chatter.   With other servo applications and other Bluetooth (classic and 4.0), I do not have this issue.  Please advise.   Is there something I am missing?  Thanks. 

Gordon

  • RFduino Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RFduino iOS Servo App
« Reply #6 on: March 29, 2014, 07:41:33 AM »
As the others, I was having the same problem.  In my case I'm driving two digital servos and was trying to do it directly from two pins of the RFduino.

So, I contacted support.  Here is the first suggestion:

Quote
We found the attribute of the jitter to be coinciding with the fact that the BLE protocol takes priority over other tasks. When BLE is active, it can cause small jitter with the PWM timing.

If the jitter is not within your projects\' tolerance, it would be best to use an external PWM controller.

Here is an example of an ideal PWM controller to accurately position your servo:

http://www.nxp.com/products/interface_and_connectivity/i2c/i2c_led_display_control/series/PCA9685.html

This didn't make much sense to me and I didn't want to add hardware so I contacted Nordic Semi.  They indicated that if I didn't need to more than three servos that their example code would work and eliminate the jitter:

Quote
This sounds like an implementation issue, not a hardware issue. Assuming you don't need to change the PWM duty cycle during BLE events it should be possible to have a stable output.
 
I assume you are using a standard PWM implementation provided by RFduino?
 
Feel free to have a look at the following library:
https://github.com/NordicSemiconductor/nrf51-pwm-library
 
It allows you to control up to 3 PWM outputs that will run also while interrupted by the BLE stack, but I suspect that you would have to remove the Arduino code in your module to use it.

Not knowing how to do this, I can edit sketches on a good day, I went back to RFdigital and got this:

Quote
"I looked at the Nordic example and it does work but it doesn't have BLE enabled so we don't know for certain that the Nordic example doesn't have jitter when running BLE.

Our servo shield does not use a servo driver, they are being driven directly by the RFduino."

Not very helpful.

Anyway, can anyone give me detailed instructions on how to incorporate the "Nordic Example" into the RFduino example so that we can see if this eliminates the problem.

BTW, I also tried the RFduino Servo shield which doesn't solve the problem.  (BTW, to my surprise it also doesn't provide 3V for the RFduino.

Gordon

  • RFduino Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RFduino iOS Servo App
« Reply #7 on: April 08, 2014, 06:01:43 AM »
Doesn't sound like there's any interest at RFduino in addressing this in software, so I'm heading a different direction.

If anyone comes up with a solution, it would be great.

In the mean time the only solution from RFduino seems to be to add an outboard PWM controller.

Michael J Carey

  • RFduino Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: RFduino iOS Servo App
« Reply #8 on: August 24, 2015, 03:05:42 PM »
I have found the same problem.  Here is a video of it.
https://www.youtube.com/watch?v=Z4ERE7K_RbI

 

anything