"Chattering" relays solution
Archiver
Posts: 46,084
I wanna thank Jon and Larry for there reply. I just figured out what the
problem was but I haven't found a solution for my program. At the same time
i'm using a LCD-display with parallel interface. The pin select (enable) is
defined for pin 0,1,8,9 (no other pin's are possible.) I'm using the command
LCDCMD with pin 9 as enable pin so LCDCMD 9,...... but the enable
information who goes to the display is also present on pin 0,1,8 so thats
why the relays start to chatter because inA includes pin 0,pin 1 and pin 2.
My final question is how to define pin 0,1,8 as input pin's (sealing of the
enable information) because otherwise I haven't enough pin's left to create
my subject.
Kindly regards
Tim (a electronics student in Belgium)
Sorry for my terrible English.
the problem is shown below:
I've made a program to read in 3 switch values and the status of the
switches determines how the output pins must be.
PIN 0=switch 1
PIN 1=switch 2
PIN 2=switch 3
PIN 4=output 1
PIN 5=output 2
PIN 6=output 3
I programmed my BS2P-24 as following:
low 4
low 5
low 6
main:
inA=outB
goto main
I use a ULN-2003A to amp. the voltage also the current. With this
voltage I
control 3 relays. The problem is that the relays start to shake when
I
download the program into my controller. I guess that the command
brings the
outputs very short on a 0 status even when my input voltage is 5V.
Does
anybody have an idea to solve my program so the relays won't shake
anymore.
[noparse][[/noparse]Non-text portions of this message have been removed]
problem was but I haven't found a solution for my program. At the same time
i'm using a LCD-display with parallel interface. The pin select (enable) is
defined for pin 0,1,8,9 (no other pin's are possible.) I'm using the command
LCDCMD with pin 9 as enable pin so LCDCMD 9,...... but the enable
information who goes to the display is also present on pin 0,1,8 so thats
why the relays start to chatter because inA includes pin 0,pin 1 and pin 2.
My final question is how to define pin 0,1,8 as input pin's (sealing of the
enable information) because otherwise I haven't enough pin's left to create
my subject.
Kindly regards
Tim (a electronics student in Belgium)
Sorry for my terrible English.
the problem is shown below:
I've made a program to read in 3 switch values and the status of the
switches determines how the output pins must be.
PIN 0=switch 1
PIN 1=switch 2
PIN 2=switch 3
PIN 4=output 1
PIN 5=output 2
PIN 6=output 3
I programmed my BS2P-24 as following:
low 4
low 5
low 6
main:
inA=outB
goto main
I use a ULN-2003A to amp. the voltage also the current. With this
voltage I
control 3 relays. The problem is that the relays start to shake when
I
download the program into my controller. I guess that the command
brings the
outputs very short on a 0 status even when my input voltage is 5V.
Does
anybody have an idea to solve my program so the relays won't shake
anymore.
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
Four things:
- Maybe just a typo, but I can't make sense of "inA=outB". Do you
really mean outB = inA (there is a _big_ functional difference)?
- If you use LCDCMD 9,..... only I/O's 9-15 are affected. There
should be no effect whatsoever on I/O's 0-8.
- Try removing the Stamp and LCD from the situation altogether and
connecting the ULN2003A inputs to +5 or ground directly. If you
still have a chatter problem, then you've probably got a power
supply problem. If not, add the Stamp back in and get things
working, then add the LCD to the equation.
- Try adding the following just before "main:", which will let you
know if your Stamp's program is restarting due to power glitches or
whatever:
DEBUG CR,"About to enter main"
Regards,
Steve