Problem with voltage output of pins of the BX-24

Started by Anand Ramaswamy October 25, 2003
Hi,
I am trying to build a lego car controlled by the
BX-24. The problem is when I do commands like call
putpin(5,0) I get an output on pin five of about
.00036 mVolts, and when I do call putpin(5,1), I get
an
output of about 0.8 volts. The relays don't recognize
this as a voltage high enough to change the direction
of the motors. So the problem bascially is that the
microcontroller doesn't output 0 volts, and 5 volts,
like I think it should. do i need to use different
pins? different coding?
Thanks
Anand __________________________________




You may be loading your output pins with too much of a load and may have
damaged them. Do you have a driver for the relays you mentioned and are you
using a diode to protect the BX24 for reverse EMF from the relays?? If not
those pins may be cooked. ----- Original Message -----
From: "Anand Ramaswamy" <>
To: <>
Sent: Saturday, October 25, 2003 9:40 PM
Subject: [BasicX] Problem with voltage output of pins of the BX-24 > Hi,
> I am trying to build a lego car controlled by the
> BX-24. The problem is when I do commands like call
> putpin(5,0) I get an output on pin five of about
> .00036 mVolts, and when I do call putpin(5,1), I get
> an
> output of about 0.8 volts. The relays don't recognize
> this as a voltage high enough to change the direction
> of the motors. So the problem bascially is that the
> microcontroller doesn't output 0 volts, and 5 volts,
> like I think it should. do i need to use different
> pins? different coding?
> Thanks
> Anand > __________________________________ >
>
> ">http://docs.yahoo.com/info/terms/



I am not quite sure what you mean by a driver for the
relays ...but what I was doing was to pass the outputs
of the pins through a 74LSO4 ( an inverter chip)..
also lets say i have damaged those pins is there
anyway to salvage the rest of the chip ..could i use
the other I/O pins and what precautions must I take
for such a problem not to recur. --- Eric Adams <> wrote:
> You may be loading your output pins with too much of
> a load and may have
> damaged them. Do you have a driver for the relays
> you mentioned and are you
> using a diode to protect the BX24 for reverse EMF
> from the relays?? If not
> those pins may be cooked. > ----- Original Message -----
> From: "Anand Ramaswamy" <>
> To: <>
> Sent: Saturday, October 25, 2003 9:40 PM
> Subject: [BasicX] Problem with voltage output of
> pins of the BX-24 > > Hi,
> > I am trying to build a lego car controlled by the
> > BX-24. The problem is when I do commands like call
> > putpin(5,0) I get an output on pin five of about
> > .00036 mVolts, and when I do call putpin(5,1), I
> get
> > an
> > output of about 0.8 volts. The relays don't
> recognize
> > this as a voltage high enough to change the
> direction
> > of the motors. So the problem bascially is that
> the
> > microcontroller doesn't output 0 volts, and 5
> volts,
> > like I think it should. do i need to use
> different
> > pins? different coding?
> > Thanks
> > Anand
> >
> >
> > __________________________________
> >
> >
> >
> >
> > ">http://docs.yahoo.com/info/terms/
> >
> >


__________________________________



--- In , Anand Ramaswamy <anandswamy@y...>
wrote:
> Hi,
> I am trying to build a lego car controlled by the
> BX-24. The problem is when I do commands like call
> putpin(5,0) I get an output on pin five of about
> .00036 mVolts, and when I do call putpin(5,1), I get
> an
> output of about 0.8 volts. The relays don't recognize
> this as a voltage high enough to change the direction
> of the motors. So the problem bascially is that the
> microcontroller doesn't output 0 volts, and 5 volts,
> like I think it should. do i need to use different
> pins? different coding?

For starters, how much current do your relays require to activate
them? You probably don't want to use an 'LS04, they can only source
400uA and sink 16mA. Generally, you wan to use open-collector
drivers such as the 'LS06 which can sink 40mA. They will also
tolerate up to 30V on their outputs.

If your relays require more than 40mA, you could select a transistor
to drive them that will handle the required current. This is only
slightly more complicated and adds 1 more inversion.

Let's say, for example, that you using some 12 volt relays that draw
30 mA. You'd connect one end of the relay to your 12V source and the
other to the output of the 'LS06. When the input of the inverter
goes high, the output will go low thus activating the relay. You
should also use a "snubber" diode across the relay coil with the
cathode (the marked end) connected to the 12V supply. This diode
provides a path for the "back EMF", or reverse voltage spike that
will occur when the relay is de-energized. If you don't do this the
driver can be damaged. The exact specifications of the diode aren't
very critical. Many people use the 1N4001 on low voltage systems
because they are cheap and easily obtained. They're only rated for
50PRV, though. Even the ubiquitous 1N914 would probably work -
they're spec'd at 150mA and 100 PRV. If you're really concerned, use
the 1N4004 - they're rated at 1.0A and 400PRV.

Don in Portland, OR