Issues with my circuit design.

Thread Starter

Jemson

Joined Sep 1, 2011
10
The uC is a Modtronix SBC68EC.

I noticed something strange lastnight that could also be the cause of the issue. I basically rebuilt the circuit on a breadboard so I could easily change out the components etc, and when the uC pin is not active, it is actually grounded... I put a multimeter between an 'on' pin and an 'off' pin and got a reading of 4.98v which I would not have expected unless the 'off' pin was grounded.

How I stumbled upon this was I found was the relay was actually engaging when the power was applied to the circuit, and disengaged when I removed the uC pin from the board. I checked and rechecked the wiring of the circuit, which was all ok, and thought it may have been a slight voltage as suggested by Pencil, however after testing with the multimeter between the pins I wasn't so sure, and then found putting a diode in line with the uC and resistor stopped this from occurring and everything was working normally.

In the process of all this, I used a new BC549 and used the 1N4148 diodes as suggested.

So I think it may have been the constant current passing from the C to the B pins on the transistor that was "burning it out".

I will monitor now and see how it goes, but does my above testing shine any further light on the issue for you guys?
 

Thread Starter

Jemson

Joined Sep 1, 2011
10
I should also add, when I earlier said the relay wasn't engaging, I wasn't hearing it click.
The testing I did lastnight was with the continuity test on the multimeter to see that it actually was engaged and was just silent which I think may have been due to the weak magnet due to a weak ground?
 

strantor

Joined Oct 3, 2010
6,782
The uC is a Modtronix SBC68EC.

I noticed something strange lastnight that could also be the cause of the issue. I basically rebuilt the circuit on a breadboard so I could easily change out the components etc, and when the uC pin is not active, it is actually grounded... I put a multimeter between an 'on' pin and an 'off' pin and got a reading of 4.98v which I would not have expected unless the 'off' pin was grounded.

How I stumbled upon this was I found was the relay was actually engaging when the power was applied to the circuit, and disengaged when I removed the uC pin from the board. I checked and rechecked the wiring of the circuit, which was all ok, and thought it may have been a slight voltage as suggested by Pencil, however after testing with the multimeter between the pins I wasn't so sure, and then found putting a diode in line with the uC and resistor stopped this from occurring and everything was working normally.

In the process of all this, I used a new BC549 and used the 1N4148 diodes as suggested.

So I think it may have been the constant current passing from the C to the B pins on the transistor that was "burning it out".

I will monitor now and see how it goes, but does my above testing shine any further light on the issue for you guys?
I'm not surprised you found the inactive pin "grounded" by the method you tested. I'm not at all familiar with the μC you are using, but with the ones I am familiar with, they have an internal pulldown resistor. I bet if you test from your inactive pin to ground with the ohmmeter, you will read something like 1.2KΩ or other k-ohm resistance.
 

Pencil

Joined Dec 8, 2009
272
The uC is a Modtronix SBC68EC.

I noticed something strange lastnight that could also be the cause of the issue. I basically rebuilt the circuit on a breadboard so I could easily change out the components etc, and when the uC pin is not active, it is actually grounded... I put a multimeter between an 'on' pin and an 'off' pin and got a reading of 4.98v which I would not have expected unless the 'off' pin was grounded.
What you have here is a premade board with a microcontroller
built in, not just a microcontroller.

This is how the output pins work. They are not "ON" or "OFF",
they are either "HIGH" (+V) or "LOW" (GND). This is simplified,
the actual voltages at each state are slightly below the supply
voltage or slightly above ground. In the case of the PIC18F6680,
which is what is on your board, the high is at minimum ≈5v-.7v
and the low is maximum ≈0+.6v with a supply of 5v and ground at 0v.
This is from the datasheet for the PIC18F6680.


Even after reading the rest of your post, I am still not sure
you have gotten to the problem. You shouldn't need a diode
in series with the base of that transistor. Keep testing/checking
something will eventually lead to the cause.
 

praondevou

Joined Jul 9, 2011
2,942
How I stumbled upon this was I found was the relay was actually engaging when the power was applied to the circuit, and disengaged when I removed the uC pin from the board.
This means the uC pin output was HIGH. when you remove the uC pin you would leave the base open, so there is no base current, the transistor couldn't drive the relay.

I checked and rechecked the wiring of the circuit, which was all ok, and thought it may have been a slight voltage as suggested by Pencil, however after testing with the multimeter between the pins I wasn't so sure, and then found putting a diode in line with the uC and resistor stopped this from occurring and everything was working normally.
You put the diode in which direction?

btw, even if the maximum LOW output voltage is 0.6V I don't think this is a problem in your case since you are driving an npn transistor ,i.e. the LOW output voltage will be near zero, since no base current is flowing.

Just for curiosity, what uC pin did you connect the transistor to? It shouldn't matter , but only PORTB has an internal weak pullup.
 
Last edited:

Thread Starter

Jemson

Joined Sep 1, 2011
10
No, the relay was engaged when the uC pin was LOW.
Which is what prompted me to check the ground etc.

I put a multimeter across a pin on LOW and ground and did get ~400ohms so I think the pulldown resistor theory is correct.

The diode I installed was in the direction of the circuit. So to clarify it was set up to allow current from the uC board to the transistor, but not back the other way which should stop the 12V leaking out the transistor base and grounding.

Two days in so far, and so far so good, though I will continue to monitor regardless.

EDIT: Forgot to mention I am using pin C0 on the board presently.
 
Last edited:

praondevou

Joined Jul 9, 2011
2,942
No, the relay was engaged when the uC pin was LOW.

I put a multimeter across a pin on LOW and ground and did get ~400ohms so I think the pulldown resistor theory is correct.
Well that's strange... Also I don't know how valid are resistance measurements in an energized circuit.
If you have a look at the PIC datasheet you'll see that there is no pull down resistor. PORTB has weak pullups, the other ports don't have pullups/downs, only two FETs at the output to pull the signal to + or gnd...

However, if it works now, ok. Good luck.
 
Top