Shop OBEX P1 Docs P2 Docs Learn Events
Stamp/Serial/Relay Problem — Parallax Forums

Stamp/Serial/Relay Problem

HermieHermie Posts: 36
edited 2012-01-04 21:21 in BASIC Stamp
Such a simple circuit is kicking my butt. I'm making a router to route serial out, serial in, atn, and vss to five other stamps. Pin high from the bs2 goes to a 2803 to handle the load of the relay. The relay is 4p4t and operates at 5v. When the 2803 kicks in the relay, db9 pins 2,3,4,5 are sent to pins 1,2,3,4 on the stamp. I included a bmp of the circuit, and code couldn't be more simple:

Pause 1000
high 8
start:
goto start

There's no reason this shouldn't work, and I am able to get debug and debugin to work, but when I use the basic stamp editor and click identify, I get loopback yes and echo no, which immediately causes the stamp to reset. Same thing happens with I try and upload code to the stamp.
Yet when I bypass the 2803 and manually give the relay ground then the stamp and computer talks just fine, and yes I've tried replacing the 2803 just incase it was bad. I also tried giving pin 10 on the 2803 5v+, and it made no difference.

Any ideas??????????????????

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-04 16:57
    The identify function and the program download function both require the Stamp to reset first. That will force I/O pin 8 to become an input which will turn off the ULN2803 transistor which will release the relay and it all will stop working. What's your +5V supply? The relay may be taking enough current to cause the supply voltage to drop, thus resetting the Stamp. We really need a schematic showing the whole setup including the power source.
  • ercoerco Posts: 20,257
    edited 2012-01-04 17:42
    Won't your problem go away if you use the normally closed relay contacts to make your connection? If you are using the normally open contacts, your relay needs to fire just to connect the stamp to your computer. So per Mike, you can neither identify nor program the Stamp without that initial connection.

    Alternatively, you could add a momentary pushbutton on your board to manually fire the relay while programming it.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-04 17:53
    You need to have the routing Stamp be the default Stamp to be connected to the DB9 (via the Normally Closed relay contacts). Once that Stamp is programmed and running, it can turn on the relay to route the signals to one or another of the other Stamps. When you turn on the power, you have to allow a little time for the routing Stamp to start up before you attempt to use the Stamp Editor.
  • HermieHermie Posts: 36
    edited 2012-01-04 17:57
    Thanks for the reply Mike, I'm using a 2940 for the 5v and yes I have a 22uF cap between ground and output. The 2940 is a 1.5 amp and the relay only draws 80ma. I've done a breadboard version on the bmp I attached earlier, and both the pcb version and breadboard version reacts the same. I'd be happy to send you the complete schematic but the forum limits the size of my files. I don't think you'd be able to make out the detail of the whole thing. If you'll email me an email address, I'll send a high res version that you can totally make out. My email is kc5fal@yahoo.com. The reason I didn't include the entire circuit to begin with is I just isolated the part of the schematic that wasn't working. Also if interested, this is the link to the datasheet on the relay: http://www.alldatasheet.net/datasheet-pdf/pdf/80586/NAIS/DS4E-M-DC5V.html
  • HermieHermie Posts: 36
    edited 2012-01-04 21:21
    Thank you both Mike and erco.....it's funny how sometimes the easy things can be just as difficult as the hard things......I started to lay out another pcb and go with the normally closed contacts, but that would be at least 3 days work, so I tried erco's idea with the switch to manually fire the relay, and that seems to work just fine, fortunately I had one little empty space on the pcb to accomendate the switch.....Thanks to both of you!!!!

    Hermie
Sign In or Register to comment.