Continue to Site

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.

Interface 24V to 3.3V microcontroller

Status
Not open for further replies.

Derekk02

Junior Member level 2
Joined
May 8, 2012
Messages
20
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,421
Hi,

I want to make an interface for a microcontroller that is capable of connecting 12V to 24V photocells. The trick is that the microcontroller need 3.3V.

How can I downconverter the 12V or 24V to 3.3V?
 

Can you give a part number or link to the photocell you have in mind?

I'm not sure if you mean a photocell (LDR) component, or the type of 'photocell' designed for connection to a wall light or similar, with a switched output to turn the light on.
 

This kind of photocell:
Photo-Cell-BS-PF50TF-.jpg


I want to connect a photocell with a 12V output or a 24V output. What kind of interface is capable of downconvert 12V or 24V to 3.3V?
 

Do the photocell and MCU need to be electrically isolated from each other, or can they share a common ground connection? For the moment, we will assume no isolation is needed; that would complicate matters.

You can use a simple potential divider to connect a DC voltage to the input of an MCU.

The diagram shows the values for a 12V input. for 24V, change the top resistor from 1.8KΩ to 4.3KΩ

12Vto3V.jpg
 

Hi Rick,

thank you for your reply. The problem is that I want to use the same circuit for both 12V and 24V sensors.

I want thinking about something like

zener-diode-voltage-regulator.gif


with a 3.3V zener diode.
 

Yes, that is the other option. However, I would use a 3.0V zener diode instead of a 3.3V one. That way, a small intolerance in the value won't put too much voltage into the MCU. 3.0V is enough to be seen as a logic high with a 3.3V MCU.

Be aware though that zener diodes this low (including 3.3V) are not 'ideal' devices and at low current their performance is quite variable. Check the datasheet carefully for the diode that you have in mind. I would suggest giving it a good few mA of current, perhaps 10mA, set at the 24V. So, that would be a series resistor of (21/0.01)= 2.1K (so pick 2K or 2.2K from the E24 range).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top