interface problem

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
mikeb
Posts: 85
Joined: Fri Jul 12, 2002 1:01 am
Location: calif.
Contact:

interface problem

Post by mikeb » Thu Jun 03, 2004 1:33 pm

hi guys in trying to interface a temp sensor kit that i built with a timer based microcontroller board. the units seperately work just fine the timer board keeps time an date data an will branch thru all it routines, seperately the temp sensor kit works equally as well. to interface the 2 systems together to make a temp sensor unit that is controlled by the microcontroller im using a general purpose output bit from the micro controller to turn on a relay that is connected thru a transistor switch and connects and sends power to the sensor kit. the relay basically close the switch between the sensors power supply and the rest of the circuit. the problem im having is once i choose the menu selection that would turn on the realy the code wont execute from that point once power is connected to the sensor board. if i run the code an select the option from the menu to turn on the temp sensor kit with the power disconnceted from the kit, the code will then execute pass the point of turnin on the sensor board. the micro controller board and the sensor board have different power supplys so i cant see why the microcontroller wont execute after the power is turned on at the sensor board. any help will be appreciated.

russlk
Posts: 563
Joined: Thu Dec 06, 2001 1:01 am
Location: New Hampshire
Contact:

Re: interface problem

Post by russlk » Thu Jun 03, 2004 2:07 pm

If both are running on 5 volts and the grounds are common, it must be a coding (programming) problem.

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: interface problem

Post by rshayes » Thu Jun 03, 2004 9:36 pm

If the sensor circuit has a local bypass or filter capacitor across the power supply, turning the power on with the relay may cause a transient signal as the capacitor charges. The grounds are commmon, but are they common at the microprocessor input, or at the power supplies? Also, how long are the power supply leads? A long ground lead may allow the sensor output to bounce up when power is applied.

bodgy
Posts: 1044
Joined: Tue Dec 04, 2001 1:01 am
Location: Australia
Contact:

Re: interface problem

Post by bodgy » Fri Jun 04, 2004 3:23 am

I wonder if the uP isn't suffering from lockup.<p>Perhaps caused by the relay switching. Does the power supply to the uP board have a largish electrolytic capacitor or the temperature board.<p>If not, this may require a larger value. EG: At present 1- 10uF increase to 150-220uF.<p>What happens if you switch the relay on via the menu but have the temp board disconnected? Try putting a LED on the contacts with suitable resistor, see if it lights and the program still runs.<p>Colin
On a clear disk you can seek forever.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: interface problem

Post by MrAl » Fri Jun 04, 2004 4:57 am

Hello there,<p>Yes, it sounds like it could be a power
supply glitch. To find out if this is
true you can also put a resistor between
the second board and the power source, or
between the relay coil and it's power source.
A resistor value of 1 to 100 ohms depending
on current draw.<p>If a micro controller chip's power supply goes
to zero (or just too low) for any short length of
time it could cause a false POR, which could
make the chip appear to be locked up, or jump
to an indeterminate place in memory. If it
was long enough it would simply reset, so i wonder
what your boot up code looks like too...<p>Take care,
Al
LEDs vs Bulbs, LEDs are winning.

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests