Switching a PIC circuit from 5 to 12 volts

In summary: But if you want more detail, or if you're having trouble getting your PIC to work with CMOS levels, I would strongly recommend looking at one of the many CMOS data sheets that are available online, or at your favorite technical bookstore.
  • #1
mishobg12
25
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
  • #2
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.
 
  • #3
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:
  • #4
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!
 
  • #5
Thank you, MATLABdude. You've been very helpful.
 

What is a PIC circuit?

A PIC circuit is a type of microcontroller developed by Microchip Technology. It stands for Peripheral Interface Controller and is used for a variety of applications, including controlling electronic devices.

Can a PIC circuit be switched from 5 volts to 12 volts?

Yes, a PIC circuit can be switched from 5 volts to 12 volts. However, it is important to ensure that the circuit is designed to handle the higher voltage and that all components are rated for 12 volts. Otherwise, it could lead to damage or malfunction.

Why would someone want to switch a PIC circuit from 5 to 12 volts?

There could be several reasons for switching a PIC circuit from 5 to 12 volts. One reason could be to provide more power to the circuit, allowing it to perform more complex tasks or drive larger loads. Another reason could be to match the voltage requirements of other components in a larger system.

What precautions should be taken when switching a PIC circuit from 5 to 12 volts?

It is important to carefully check the specifications of all components in the circuit to ensure they can handle the higher voltage. Additionally, steps should be taken to regulate the voltage and protect the circuit from any potential spikes or surges. It is also recommended to test the circuit thoroughly before implementing the voltage change in a larger system.

Are there any risks associated with switching a PIC circuit from 5 to 12 volts?

As with any electrical modification, there is always a risk of damage to the circuit or other components if not done properly. It is important to follow proper procedures and take necessary precautions to minimize these risks. Additionally, it is recommended to have a backup plan in case the circuit does not function as intended after the voltage change.

Similar threads

  • Electrical Engineering
Replies
13
Views
3K
  • Electrical Engineering
Replies
5
Views
810
Replies
7
Views
2K
  • Electrical Engineering
Replies
3
Views
1K
Replies
37
Views
3K
  • Electrical Engineering
Replies
2
Views
1K
  • Electrical Engineering
Replies
7
Views
1K
  • Electrical Engineering
Replies
4
Views
1K
Replies
1
Views
2K
  • Electrical Engineering
Replies
19
Views
1K
Back
Top