November 23, 2024, 02:26:33 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


AP-16+ and Parallax Key FOB Remote

Started by JackMan, December 23, 2014, 12:59:04 PM

Previous topic - Next topic

JackMan

Having a problem with a Parallax Key FOB Remote connected to a PROP-1 and AP-16+. All the boards have a common GND.
5V power is connected to the Key FOB receiver from R and B of the PROP-1. I have a serial connection from the PROP-1 PIN7.W to the AP-16+. One of the output pins of the Key Fob is connected to the PROP-1 PIN6.W for a trigger. PIN7 is clipped on the ULN. When everything is powered up, the Key FOB receiver does not register a signal from the transmitter. If I disconnect either the serial wire from the AP-16+ or the trigger output from PIN6, the Key FOB receiver works perfect. I'm stumped as to why this is happening. I can get around this problem using a relay to isolate the trigger output but I'd really like to know why this is causing interference with the Key FOB.

JonnyMac

Jack,

Can you post you code and a link to the device you're using (is it the one I documented a while back)?
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

Code is just the typical debounce until triggered. The Parallax Key FOB is the one you documented. The receiver won't respond to a transmitted signal with the serial line connected to the AP-16+ and the trigger output connected to the PROP-1.


'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL Sio     = 7
SYMBOL Trigger = PIN6
SYMBOL Servo   = 0

' -----[ Constants ]-------------------------------------------------------


' -----[ Variables ]-------------------------------------------------------

SYMBOL  timer    = B2
SYMBOL  pos      = B3
SYMBOL  seconds  = B4
SYMBOL  counter  = B5

' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear all outputs
  DIRS = %00111111                              ' make P0-P5 outputs


' -----[ Program Code ]----------------------------------------------------

Main:
  timer = 0                                     ' reset debounce timer

Check_Trigger:
  PAUSE 5                                       ' scan delay
  IF Trigger = 0 THEN Main                      ' check trigger input
    timer = timer + 5                           ' update timer
  IF timer < 200 THEN Check_Trigger             ' wait for .02 second trigger

Head_Up:
   FOR pos = 195 TO 75 STEP -1
    PULSOUT Servo, pos
    PAUSE 17
   NEXT
   SEROUT Sio, OT2400, ("!AP16", %00, "PS", 0, 1)
   seconds = 17

Servo_Pause:
  IF seconds = 0 THEN Head_Down
    FOR counter = 1 TO 50                       ' create 1s delay
      PULSOUT Servo, pos                        ' while refreshing servo
      PAUSE 19
   NEXT
    seconds = seconds - 1
    GOTO Servo_Pause

Head_Down:
   FOR pos = 75 TO 195
    PULSOUT Servo, pos
    PAUSE 20
   NEXT

GOTO Main

JackMan

Well, I isolated the serial connection with a relay and it works, sometimes. The more I play around with these Key FOB Remotes, I'm beginning to realize that they're very unreliable once they are connected to other devices. Sometimes they work, sometimes they don't. With the receiver just connected to a battery, it works flawlessly and the range is very good. With other devices connected, it's hit or miss. I bought 4 of these and so far I'm not very happy with the results. I thought they would be great for use with a PROP-1. I know these are Parallax and not EFX-TEK but if anyone has any experience or suggestions with these I'd love to hear it. Thanks!

JonnyMac

I'm wondering if it doesn't like the loading characteristic of the ULN. Seems odd, as it's all TTL and in within what would be considered norms.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

December 25, 2014, 07:01:03 AM #5 Last Edit: December 25, 2014, 10:06:06 AM by JackMan
I've ruled out the ULN as a possible cause, the receiver is finicky even when there's no output connected to the PROP-1. It seems to be the simple fact that it doesn't like 5V power directly from the PROP-1 to the receiver.  Doesn't really make sense but for some reason it affects the performance of the Key FOB. I think I'm gonna have to put the receiver on it's own power supply and then isolate the output with a relay to trigger the PROP-1. Kind of a big hassle for something that should be simple.
MERRY CHRISTMAS!

UPDATE: Well it's not the common power supply either, that didn't cure the problem. This has got to be one of the most frustrating gremlins I've ever had. I've tried so many different set ups with this thing that I've lost count. Final conclusion....it just doesn't like being anywhere near the AP-16+, even with the serial connection being isolated with a relay. If I switch off the AP-16, the darn thing works perfect. Oh well, gotta go with a different remote, looks like I wasted my money on these Key FOB's.

JackMan

Well, because I hate giving up on something (despite the mountain of aggravation this Key FOB has caused me), I went back at it this morning and FINALLY nailed down the problem. While I have absolutely no idea why, the Key FOB receiver will not respond when there's a serial connection between the PROP-1 and the AP-16+, even when the connection is isolated with a relay. I removed the serial connection and used the 12-24 input on the AP-16+, and viola, the Key FOB works like it should. Although this is not the ideal set up, it will suffice for this particular project. Not that it matters at this point but if anyone knows why the serial connection would interfere with the receiver, please chime in.  :o

bsnut

Jack,

Since you isolated the problem. I think the problem is with the serial interface circuit on the AP-16 itself. Its acting like an antenna, which in turn is causing the interference problems you are having with the Key Fob receiver. I think a code change may work. When the Key Fob isn't sending (triggering the Prop-1) then send the serial commands to the AP-16.
William Stefan
The Basic Stamp Nut

JackMan

The receiver doesn't work even while no serial commands are being executed. The PROP-1 doesn't send a command until the program is triggered.