Very quick voltage question

Andrew Cowan

Senior Member
I am looking at a driver chip (not actually a PICAXE). It says the maximum voltage on an input is Vcc+0.5V. The maximum voltage the chip can be powered from is 6V.

If I run the PIC off 5V, is the maximum voltage on an input 5.5V, or 6.5V?

A
 

Dippy

Moderator
Time for you to start reading PIC Data Sheets m'lad.

A PIC Data Sheet for the 18X says:-
"Voltage on any pin with respect to VSS (except VDD and MCLR) -0.3V to (VDD + 0.3V)"

and for supply voltage:-
Voltage on VDD with respect to VSS ................... -0.3 to +7.5V

These are the ABSOLUTE MAXIMUM voltages, so you shouldn't operate at these levels.

Other PICs may vary. So R-E-A-D the appropriate Data Sheet.
You can download any PIC data from microchip.com.

I really didn't completely understand your question, but it sounds safe to operate everything at 5V.
I don't know what the other chip is and I'll leave the Data Sheet reading in your capable hands :)
 

womai

Senior Member
Andrew,

if your supply voltage (VCC) is 5V, then the maximum allowed input voltage in your case is 5V+0.5V=5.5V. (if you'd run the chip off 5.5V, then the maximum would be 6V, and so on). The reason for that is that the internal high-side ESD protection diode (between input and VCC rail) will turn on above approx. VCC + 0.6V.

Wolfgang
 

BeanieBots

Moderator
As a simple "general" rule for ANY chip, never exceed the power rail voltage.
Only EVER do so after reading the datasheet and confirming if it is OK.
 

jglenn

Senior Member
There is a trick they show in data sheets for chips, clamping inputs to the rail with external diodes. Sounds good, in practice I have seen excursions just take the rail up! I do service on large quantities of industrial eqpt, they have analog inputs clamped with a series resistor and zener diode or TVS. Again, sounds good, but the diode sometimes changes characteristics, maybe due to static discharge, and disrupts the analog signal. It starts conducting before it used to before. Also, they just plain fail and cause errors to the computer (running a diesel engine). I argue with the eng, and wanted to buy a static discharge gun for testing, but it has not happened so far. Keep my soldering iron warm...:rolleyes:
 

BeanieBots

Moderator
Andrew, check the data sheet for the IV characteristics of a zener.
You will be very dissapointed with the results if you use a 5v1 zener and expect to get anything close to 5v.
 

Dippy

Moderator
Very good point BB.

So many newbies and nearly-newbies think that Zeners have some magic cutoff on-off switch.
Sadly...

I would suggest to Andrew that he gets his folks to buy him:-
1) a few different values of Zener
2) a few resistors and good PSU
3) a Thurbly-Thandar (TTi) bench PSU
4) a Top Q calibrated voltmeter (e.g. a TTi , Sanwa, Gossen Metrawatt , a (bench) Fluke or Keithley)
5) Piece of paper and a pencil.

And then plot Ir(zener) vs voltage supply for various different loads using the range of resistors.
However, it is a lot cheaper to read (and understand) the Data Sheet ;)
 

hippy

Ex-Staff (retired)
I am looking at a driver chip (not actually a PICAXE). It says the maximum voltage on an input is Vcc+0.5V. The maximum voltage the chip can be powered from is 6V.

If I run the PIC off 5V, is the maximum voltage on an input 5.5V, or 6.5V?
Your VCC is 5V so the maximum voltage an input can be is VCC+0.5V, that is 5.5V.

The VCC is what it is actually powered from, not the maximum it could be powered from. If you were powering the chip with VCC of 6V then its maximum input would be 6.5V, still VCC+0.5V.

If you ran the chip from three 1.5V batteries its VCC would be 4.5V, the maximum input would become 5.0V, again, that's still VCC+0.5V.
 

leftyretro

New Member
And of course if you know you are going to have a voltage wired to the Picaxe input that exceeds or could exceed the voltage specs then a simple series resistor can work to protect against damage, just like the Picaxe does for it's serial input pin.

Lefty
 

Dippy

Moderator
This is starting to parallel the 5V to 3V thread.

I'd be cautious about about generalising too much there Lefty. It depends on the other device. But, hey, it's your money :)
 

westaust55

Moderator
Interfacing voltages

And of course if you know you are going to have a voltage wired to the Picaxe input that exceeds or could exceed the voltage specs then a simple series resistor can work to protect against damage, just like the Picaxe does for it's serial input pin.

Lefty
I do not recommend the serial resistor idea to limit input voltage to an input, be it PICAE or other logic chip..
When I tried a "short-cut" to use a single resistor at a 5V to 3.3V interface it just pushed the supply rail for the 3.3V powered chip up to 5V when any input signal from the PICAXE went high.

While primarily for 3v to 5V and 5V to 3V applications have a look at the 8th link in Post 1 here for some theory and ideas:
http://www.picaxeforum.co.uk/showthread.php?t=10804
 

moxhamj

New Member
Be nice to your picaxes. Don't put anything over the supply voltage into a pin. If the supply is 5V, keep it to 5V.

But there are always workarounds. Eg, I have some batteries that go between 8V and 10V and I want to measure the voltage. Use a voltage divider. You could use divide by 2, but at 10V that is cutting a bit fine. So, use a divide by 3 voltage divider and then the input is safe.

Say your input is 20V DC. You could use an optocoupler (with suitable dropping resistor) to isolate the input.

Say it is minus 8 volts. You could use a max232 to convert to 0 to 5V.

There is an appropriate chip/device for almost any input. Even relays can be useful (I use relays for ultra slow comms where there is a chance of lightning strikes).

But as others have said, I wouldn't use zeners or diodes to clamp inputs.

Can you describe more what you are actually sampling?
 

BeanieBots

Moderator
There's no right or wrong about using current limit resistors and clamp diodes or zeners. The issue is about understanding components, how they work and what their differences are from the simplified ideal model.
That's what DESIGN is all about.

If the current limit resistor method pushes up the power rail, it's because the excess current was not considered as part of the design. In other words, it was not suitable in that particular application. (or they were the wrong value)
 

Dippy

Moderator
Quite right BB.
Read, experiment, get advice/training .... learn.
Horses for courses. Never generalise. Never assume one size fits all.
These are the differences between designers and novices.
 

Andrew Cowan

Senior Member
A bit more detail:

I have a chip with an analogue, that requires 0-5V.

I tried PWMing it from a PICAXE, and got the analogue chip to see 221/255. This is because I was using a 4.5V pack on the picaxe. The analogue chip runs on a 5V regulated supply, which I cannot access.

Therefore, I need the picaxe to output 0-5V, but not over 5.5V. I will run the picaxe off another 5V regulator, but I will use a 5V1 zener for added protection.

A
 

BeanieBots

Moderator
A bit more detail:

I have a chip with an analogue, that requires 0-5V.

I tried PWMing it from a PICAXE, and got the analogue chip to see 221/255. This is because I was using a 4.5V pack on the picaxe. The analogue chip runs on a 5V regulated supply, which I cannot access.

Therefore, I need the picaxe to output 0-5V, but not over 5.5V. I will run the picaxe off another 5V regulator, but I will use a 5V1 zener for added protection.

A
Now I'm totally confused about what you are doing (trying to do).
The PICAXE CAN'T output more than its Vcc voltage.
So why is protection needed?
PWM into an analogue input. Are you RC'ing that? (would also provide current limit).
Slap a 5v1 zener on that and it will be well below 5v.
 

Dippy

Moderator
Oh, this is the 1500Mega Watt robot motor controller I guess?
And you are PWMing up its wiper hole?

Andrew, like BB said, you can't magically make a logic output higher than it's supply.
Unless you are using the Paul Xenon range of PICAXE :)
(or it involves reactance for the pedants).

Look, if you are really worried why don't you use your PWM-V circuit (a simple RC??) and fire it into a high value resistor and measure it with your 'scope.
(Waddya mean, you haven't got a 'scope? For what you are fiddling around with it would be adviasble. Then, instead of guessing or relying on others, you will be able to see EXACTLY what is going on. And no, i don't mean some tat off you-know-where ;) )

Or are you just PWMing straight into the wiper hole?... oh dear.
 

Andrew Cowan

Senior Member
Now I'm totally confused about what you are doing (trying to do).

Sorry!

The PICAXE CAN'T output more than its Vcc voltage.
The PICAXE is on a seperate power supply to the other chip, which means the PICAXE can output more than the analogue chips Vcc.

PWM into an analogue input. Are you RC'ing that? (would also provide current limit).
Slap a 5v1 zener on that and it will be well below 5v.


The analogue chip already has a RC network.

A

Edit: To Dippy:

I've been PWMing straight into the wiper hole (the speed controller already has a 10K resistor (series) and a 100n cap (to ground) on this input). My PWMing to the wiper hole has worked fantastically, although using a 4.5V battery pack limits the speed controller to 90% speed (The speed controller has an internal 5V reference).

To get 100% speed, I need a 5V PWM signal. I will run the PIC of a 7805, I just want to ensure that there can't be any spikes or faults that will give an output of more than 5V5 (damaging the speed controller).

I have a scope, plus acess to a good scope if needed, but as far as I can see, the circuit seems to work fine.

Hope this answers all your questions.
 
Last edited:

Dippy

Moderator
Oh dear.

You said "I have a chip with an analogue, that requires 0-5V".

You said you want to PWM into it with a PICAXE @ 5V.

So, HOW is that PWM from PICAXE going to be higher than 5V?
100% duty gives 5V DC (!).

If something is expecting true anlogue as it would get from a pot wiper you can't expect great success by firing a bunch of 0V to 5V pulses at it.
Hence RC.
Do a Google. I can't draw waveforms well, but it's a cheap'n'cheerful 'boys' method for (nearly) turning PWM into a voltage level.

Read up on rectifiers.
 

Dippy

Moderator
Always, best to post a new message rather than editing.... I can't be arsed to keep going back and forth ;)

So, aha, an RC, the Forum crystal Ball didn't pick that up.

Well, I guess if your 7805 goes duff or you put it in the wrong way round then it could go higher.

I would think that cockups and accidents aside (oh dear) that it will be fine.
Or a fancy coupling using the controllers supply volts.

But if you are going to play around with zeners then get a selection and experiment in a breadboard. Their performance will be affected by the series resistance, which in turn will affect the pumping characteristc on your capacitor.
But if the reg is 5V then (reactance aside) it can't go higher.

If it does, then you have discovered perpetual motion, which is the feeling you get several hours after a strong curry.
 

BeanieBots

Moderator
So, there is a 10k between the analog input and the PICAXE output.
You're worried that the regulated 5v PICAXE supply could cause its output to exceed 5.5v.
So the PICAXE output will be CLAMPED by a 5v1 zener.

I wonder what the impedance of that 5v1 zener is @ 5v?
I wonder if that's below the current limit of a PICAXE output?
Hmm....
 
Top