Shop OBEX P1 Docs P2 Docs Learn Events
Problem with BS2 + Servo + Relay — Parallax Forums

Problem with BS2 + Servo + Relay

azmax100azmax100 Posts: 173
edited 2006-12-14 12:38 in BASIC Stamp
Hi all.

I am doing a project which include Continues Servo and Relay.
I am connecting the Servo to Pin 8 and 9 and suply with 7.2 v from Vin. 6 relay on pin 10 to 15 with·390 ohm resistor and 2n2222 transistor.

My problem is everytime·Pin 10 to 15 goes high the servo will move acording Pause time that I code for the relay.
Servo on Pin 8 go forward and Pin 9 go backward.·I've check all the conection and there's no shot circuit.
I also check with multimeter in case Pin 8 and·9 pulse out any current but it is not.

Whats the problem actually?

I really need help from the people in this forum cause I am·learning by myself.

Any respond are very much appreciated.
Thanks in advance.


azmi.

·

Comments

  • azmax100azmax100 Posts: 173
    edited 2006-12-12 04:29
    Here I attached the schematic.

    Sorry, I do it in a hurry. Pin 10 to 15 same. Pin 8 to 9 to servo.
    I am using 5V relay.

    Thanks in advance for your help.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-12 15:28
    A few additional points I wanted to make…your schematic doesn’t show any kind of filtering capacitors on the regulator.· There should be capacitors on both sides of the regulator.· Do you know how much current the relays draw?· The current drawn from the base of each transistor will be proportional to that based on the HFE of the 2N2222 transistor.· It is possible you are drawing too much current from the I/O pins.· And finally, to prevent brownouts you should connect your BASIC Stamp VIN to the 7.2V source, rather than getting VDD from the output of the 7805.· When relays energize, especially at the same time, it can sag the voltage at that point, resetting the Stamp Module.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-12-12 15:39
    1. What Chris said -- you definitely could use some capacitance (like 10 to 20 uF) on the Vdd line at the regulator.

    2. Each relay needs a reverse-biased diode across it, so when you 'turn off' the relay, the current generated by the collapsing magnetic field has somewhere to go.

    3.· Could you post your code?· This is either a voltage problem, a software problem, or both.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-12 20:02
    You are correct...I should have posted that.· Thanks (both MOSFET and NPN are posted).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    320 x 240 - 6K
    320 x 240 - 6K
  • azmax100azmax100 Posts: 173
    edited 2006-12-13 06:50
    Thanks to all of you for your concern.

    I will try to put the diod.e across the relay coil and see what happen.
    I will get to you with the outcome soon.

    Thanks again.
  • azmax100azmax100 Posts: 173
    edited 2006-12-14 12:38
    Thanks Chris for the schematic.

    Allanlane5 actually I did use the capacitance but in the drawing· I did'nt put it cause I'm in a hurrry.

    Time is very limited.·(Sorry)

    Finaly by placing a diode across the relay coil settle the EMF problem.

    Actually I am a newbie with no any·experience·either in·Programming or Electronic.

    The only thing make me decide to purchase a BS2 because I know that I can get a lot of support

    from you all in this forum.

    I'll post my project once I complete it.

    Thanks to all of you & regards.


    Azmi.
Sign In or Register to comment.