Shop OBEX P1 Docs P2 Docs Learn Events
Reading pulse from RC receiver — Parallax Forums

Reading pulse from RC receiver

JeffaJeffa Posts: 80
edited 2011-08-10 21:50 in Propeller 1
I'm experimenting a bit with using a Hitec Optic6 transmitter with a Hitec receiver connected to Propeller Robot Control Board on a Stingray. The goal is to drive the robot with the remote, and with some as yet undefined mechanism like another channel or control function, switch between direct control of the robot with the Hitec transmitter and ai onboard the propeller/stingray.

I'm working on reading the pulse duration from the RC receiver. After I'm satisfied with the read from the receiver I will map a couple channels to the motor control on the stingray.

I've bingled the forums a bit and come up with these ideas previously discussed. Have I missed any objects or code that might be useful to me or other discussion threads?

The BS2_functions I found on Obex was a single .spin file. Is there another distribution with examples? I'm interested in using the Pulsin command. The source has this comment refering to: "See distributed example"
PUB PULSIN (Pin, State) : Duration 
{{
  Reads duration of Pulse on pin defined for state, returns duration in 2uS resolution
  Shortest measureable pulse is around 20uS
  Note: Absence of pulse can cause cog lockup if watchdog is not used - See distributed example
    x := BS2.Pulsin(5,1)
    BS2.Debug_Dec(x)
}}
   Duration := PULSIN_Clk(Pin, State) / us / 2 + 1         ' Use PulsinClk and calc for 2uS increments


BS2_functions
Dual RC Servo Pulse Width Measurement Driver
Radio Override
Simple Radio Control Capture & Repeat to Servo
RX input / RC Receiver Input

jm_servo8_measure_test - Archive [Date 2010.12.21 Time 18.35].zip from this thread http://forums.parallax.com/showthread.php?128142-Polling-8-RC-receiver-channels-with-still-easy-to-understand-PASM-code

http://forums.parallax.com/showthread.php?128336-PPM-protocol-RC-tranmitter-module-control
http://obex.parallax.com/objects/522/
http://obex.parallax.com/objects/592/
http://obex.parallax.com/objects/401/

Comments

  • RonPRonP Posts: 384
    edited 2011-08-04 11:21
    Jeffa,

    I have used most of those objects at one time, experimenting. My favorite is RX input / RC Receiver Input by W9GFO (Rich Harman). You have "bingled" well and found most of what is out there I think. I'll look at my notes and see if I find anything you have missed.

    Ron
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-08-04 17:30
    There is some servo read code in the Obex that looks at radio control outputs.
  • JeffaJeffa Posts: 80
    edited 2011-08-10 21:50
    I'm liking the RX input/ RC Receiver input object too. After some initial problems with the MSR1 board I pulled it out of the stingray and soldered headers on it and disabled the level shifting. Seems like ~3.3vdc should be a logic true for 5vdc logic however the board behaved erraticaly at best and pretty much brought the input pin to low when using it as shipped with the level shifting in place.

    Here is a screen shot of Viewport monitoring channels/pins 1-4 as input and 4 channels out on pins 7-10.

    samiViewPort.jpg


    I started a thread in the General forum soliciting suggestions for a motor controller that I might use instead of the onboard L6205 H-Bridge driver. An interesting reply from Parallax too.
    http://forums.parallax.com/showthread.php?133716-Suggestions-for-motor-controller-for-Stingray-project&p=1026082#post1026082 I'm looking for suggestions for a motor controller.

    I also received a 2.4g ntsc wireless video camera and receiver a couple days ago so I can see where I'm going.
    1024 x 695 - 89K
Sign In or Register to comment.