Switching a PIC circuit from 5 to 12 volts

  • Thread starter Thread starter mishobg12
  • Start date Start date
  • Tags Tags
    Circuit Volts
AI Thread Summary
To switch a PIC circuit from 5V to 12V while maintaining CMOS logic levels, a voltage regulator like the LM7805 can be used to step down the voltage to 5V for the PIC and other logic components. The PIC is compatible with CMOS logic levels, allowing it to interface with HC series chips without issues. It's important to add capacitors for stability; electrolytic capacitors are recommended for filtering voltage ripple, while ceramic capacitors should be placed close to the ICs for bypassing. Proper input protection measures should be implemented to safeguard against high voltages and currents. Following these guidelines will ensure the circuit operates effectively at the new voltage level.
mishobg12
Messages
25
Reaction score
0
Hi all,
I have almost completed a project that I power on the breadboard from USB and it works with TTL levels.

But the situation is that I must make it powered by 12V and working with CMOS logical levels (because of the external input to the device).

All my chips are CMOS already (HC to be more exact), but at the moment working with TTL logical levels. So, I guess, there will be no problem with them, and for powering the PIC probably I could use a stabilizer. But I don't know what to do about making compatible the CMOS logical levels that are going to be sent by the ICs with the PIC.

And another question, can you give me some good advices about putting protection on the device input from high voltages and big currents so that the chips won't burn out.

Thank you
 
Engineering news on Phys.org
mishobg12 said:
Hi all,
I have almost completed a project that I power on the breadboard from USB and it works with TTL levels.

But the situation is that I must make it powered by 12V and working with CMOS logical levels (because of the external input to the device).

All my chips are CMOS already (HC to be more exact), but at the moment working with TTL logical levels. So, I guess, there will be no problem with them, and for powering the PIC probably I could use a stabilizer. But I don't know what to do about making compatible the CMOS logical levels that are going to be sent by the ICs with the PIC.

And another question, can you give me some good advices about putting protection on the device input from high voltages and big currents so that the chips won't burn out.

Thank you

You're asking two separate questions here:

1) Will the PIC be compatible with CMOS logic levels?

Yes, since the PIC is a CMOS device, and the range of values for acceptable inputs (low under the electrical specifications in the datasheet for your particular device) are fairly broad. The digital outputs (which are nearly GND, and Vcc) should also be capable of triggering any CMOS logic you may have.

2) How do I power my PIC off of 12V?

You didn't make it clear in your post, but presumably, you would also need to power your other logic with 5V, and not 12V, and thus, your logic levels should still be 5V and 0V (I don't recall any of the families being able to deal with really high Vcc voltages, beyond maybe 6 or 7 V). In that case, you just need a voltage regulator, say, something like an LM7805 (they're cheap--make sure to use 10 or 100 uF electrolytic capacitors on input and output to ensure output stability: you don't have anything too high speed, so you shouldn't need to worry too much about slowed responses as a result of these higher capacitances)

An example of an LM7805 (it's a genericized, or so heavily cross-licensed that it might as well be, part that dozens of companies produce and should be able to get to you for under a $1 per, in lower volumes):
http://www.fairchildsemi.com/pf/LM/LM7805.html

EDIT: I should mention that the 7805 takes in 12V, and outputs 5V to power your PIC, logic, etc.
 
Thank you for answering. I am sorry I didn't explain well enough in my original post.

So as far as I understood, I keep everything the way it was when I was powering the circuit from USB, just add this voltage regulator to the power supply line to make it 5V. And the capacitors I should put between the device input (the connector) and the PIC's pins (where there used to be nothing). Is that correct?

And would you mind to explain briefly why exactly electrolytic capacitors?
 
Last edited:
Yes, keep your circuit the way it used to be, but see Figure 7 of the datasheet linked in the link I gave earlier for how to connect the capacitors. You would not connect across the unused I/O pins of the PIC, though it is good practice to put CERAMIC bypass capacitors (usually something like 0.1 uF or thereabouts) between the power and ground pins of your ICs right next to the ICs themselves (the ones you're powering, not the voltage regulator ones):
http://www.seattlerobotics.org/Encoder/jun97/basics.html

The reason you use electrolytics for the regulator filter capacitors is that they're cheap, and do a reasonable job of removing voltage ripple on the input (and output). You also don't care if they're off by 50 or 80%, or that they 'leak' a fair bit, since you use such a large value anyway. Ceramics are smaller, and generally more expensive (for any given value, within a tolerance class). But their small size, low power dissipation (that leakage current gets turned to heat) and general non-polarization (unless you're dealing with tantalums) also make them ideal for bypass capacitors.

These broad generalizations are just what I've heard (and taken to heart), so someone else may weigh in differently. I should also point out that if you disassemble PC power supplies (or many other wall-supplied supplies that need very steady output) you'll find banks of high-value capacitors: these are mostly used to smooth out the ripples and eliminate the noise that they get from the input. NOTE: Do not disassemble power supplies without knowing what you're doing! These 'great big capacitors' sometimes retain charge for months and can give you a rather unpleasant (or even fatal) surprise!
 
Thank you, MATLABdude. You've been very helpful.
 
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top