Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microcontroller output selectable between 5V and 24V

Status
Not open for further replies.

Wamor

Junior Member level 2
Joined
Jun 16, 2009
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,491
Hello,

I am designing a circuit for a microcontroller with which it is possible to select between +5V or +24V output signal. (See attached schematic).
The input-signal is a signal with a frequency of 10kHz and switches between 0 and +5V.
With the 24V/5V-Select-signal i want to select the maximum value of the output-signal.
When the 24V/5V-signal is at 0V the maximum value of the output-signal is +5V which is Ok. When the 24V/5V-signal is at +5V the maximum value of the output-signal is arround 15V which is not Ok. In this situation the maximum value should be +24V. Could somebody tell me what i have done wrong?

Thank you and best regards,

Wamor
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,311
Reputation
4,624
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,416
It looks like you have connected both P-channel MOSFETs upside-down ..
pin S(Source) has to be connected to +Vcc (24 or 5) ..
pin D(Drain) to 2.2kΩ ..

Rgds,
IanP
 

BABESH

Full Member level 2
Joined
Sep 27, 2005
Messages
148
Helped
14
Reputation
28
Reaction score
4
Trophy points
1,298
Activity points
2,228
I think the internal diode will get forward biased and leading to wrong results,

if you revese the p-channel mosfet it should work.

--Babesh.
 

Wamor

Junior Member level 2
Joined
Jun 16, 2009
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,491
Sorry guys, but reversed the fet's in my drawing. This put you on the wrong path.

The actual design was correct and the fets were connected correctly but the drawing was incorrect.
Still i have the original problem that when i want to switch the output-signal to +24V this goes to +15V instead to +24V.
Does anybody has a clue what is happening here.

Thank you,

Wamor
 

BABESH

Full Member level 2
Joined
Sep 27, 2005
Messages
148
Helped
14
Reputation
28
Reaction score
4
Trophy points
1,298
Activity points
2,228
Hi womer,
I see once again the problem of internal diode of 5V MOSFET.

because when 24V is ON then the internal diode of 5V mosfet will be forward biased because of 24 on Anode side and 5V on cathode side so this may be leading to wrong results.

To confirm the problem, remove 5V mosfet and test for 24V alone if this works then connecting a diode(schottky) between 2k2 and 5V mosfet drain may solve the problem, but during opertion with 5V there will be drop of 0.4V


Babesh.
 

Wamor

Junior Member level 2
Joined
Jun 16, 2009
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,491
Hello Babesh,

Thank you for the information. I will try the diode. What about using a normal JFET. This will not have the internal diode?

Best regards,

Wamor
 

BABESH

Full Member level 2
Joined
Sep 27, 2005
Messages
148
Helped
14
Reputation
28
Reaction score
4
Trophy points
1,298
Activity points
2,228
I have no idea about JFET, logically it should work,
but does 0.4V matters for you??

--babesh
 

    Wamor

    Points: 2
    Helpful Answer Positive Rating

tyassin

Advanced Member level 1
Joined
Jul 22, 2004
Messages
467
Helped
86
Reputation
170
Reaction score
40
Trophy points
1,308
Activity points
3,367
Hi

If you can afford it, you can also use two FETs. Connect together the two sources and the two gates. Put a large resistor between source and gate. You will have no problem with the internal diodes.
 

Wamor

Junior Member level 2
Joined
Jun 16, 2009
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,491
Hello Babesh,

The diode is again an additional component and extra cost. If the ammount of components can be reduced this would be fine but if it is needed i will use it.
I tried your suggestion and it works ok. I also have changed the fet by a normal transistor and this work also.

Thank you for your help.

Hello tyassin,

I do not exactly understand your sollution. Is it possible to add a small schematic to this topic which explains your suggestion.

Also thank your for your help and intrest in my topic.

Best regards,

Wamor.
 

BABESH

Full Member level 2
Joined
Sep 27, 2005
Messages
148
Helped
14
Reputation
28
Reaction score
4
Trophy points
1,298
Activity points
2,228
Womwer,
use a low VCE(sat) transistor, else thansistor drop of 0.7V will be subtracted from +5V.

thx
--Babesh
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top