Bench Power Supply With Microcontroller

Click For Summary

Discussion Overview

The discussion revolves around the use of a bench power supply with a microcontroller, specifically the P16F88. Participants explore issues related to current ratings, potential damage to the microcontroller, and the implications of using fixed versus variable power supply outputs.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant questions whether a 25 ohm resistor is necessary to limit current to 200 mA for the P16F88, given its maximum current rating.
  • Another participant clarifies that the power supply's 3A rating indicates maximum capacity, and the load will only draw the current it requires, which could be 200 mA for the microcontroller.
  • Concerns are raised about the tolerance of CPU chips to excessive voltage, suggesting that any voltage above 5V could damage the microcontroller.
  • A participant shares their experience of damaging multiple chips when using the bench power supply, speculating that voltage spikes may be the cause.
  • Discussion includes the maximum current draw for the entire chip versus individual I/O pin limits, with a suggestion to use switching components for inductive loads.
  • Another participant proposes using the variable output of the power supply to monitor current draw and avoid potential issues with fixed outputs.
  • A participant identifies a potential issue with the MCLR pin configuration, suggesting that improper settings may lead to the microcontroller becoming unresponsive.
  • One participant reports success in reviving previously non-functional chips by correctly configuring the MCLR pin.

Areas of Agreement / Disagreement

Participants express varying opinions on the necessity of current limiting and the implications of using fixed versus variable outputs. There is no consensus on the best practices for connecting the power supply to the microcontroller, and multiple competing views remain regarding the causes of chip failure.

Contextual Notes

Participants mention the importance of checking the actual voltage output of the power supply and the potential for damage due to incorrect configurations, particularly with the MCLR pin. There are unresolved questions about the specific conditions under which chips may fail.

Who May Find This Useful

This discussion may be useful for electronics hobbyists, students working with microcontrollers, and engineers troubleshooting power supply issues in their circuits.

PhysEd
Messages
12
Reaction score
0
I know this question is so simple and probably stupid that it will enrage some people, but bear with me. :)

When connecting a bench power supply that does 5V@3A, to let's say a P16F88, should I use 25 ohm resistor to bring those 3 Amps down to 200 ma?

According to the p16f88 datasheet:

Maximum current into VDD pin: 200 mA

And by doing so, can I expect 200mA to come out of an output Pin when I turn it on in the pic?

And finally, the reason I ask is that I didnt use a resistor, and I connected the power supply directly to the PIC and after programming it maybe once or twice it no longer works (as in does not return proper ID when programmer asks for it).

I am assuming I fried it and am looking for a solution, thanks.
 
Engineering news on Phys.org
The current shown as 3 amps is just a maximum rating. If the voltage is 5 volts, the load will draw whatever current it was designed for.

In this case, it takes 200 mA from the supply even though this is only a fraction of what the power supply is designed for.

CPU chips are very intolerant of excessive voltage, though, so it would be worth checking the exact power supply voltage before installing a new chip. if it is more tha 5 volts, even by half a volt or more, you should not use this supply.

200 mA seems like a lot of current for a CPU chip and the chip would probably only draw this much current if you were trying to drive a low resistance load from one or more of the outputs or if you had an output that was shorted to the negative supply rail.
 
vk6kro said:
The current shown as 3 amps is just a maximum rating. If the voltage is 5 volts, the load will draw whatever current it was designed for.

In this case, it takes 200 mA from the supply even though this is only a fraction of what the power supply is designed for.

CPU chips are very intolerant of excessive voltage, though, so it would be worth checking the exact power supply voltage before installing a new chip. if it is more tha 5 volts, even by half a volt or more, you should not use this supply.

200 mA seems like a lot of current for a CPU chip and the chip would probably only draw this much current if you were trying to drive a low resistance load from one or more of the outputs or if you had an output that was shorted to the negative supply rail.

Yeah, what you say makes sense and I figured this is how it should be.

But somehow I have fried like 6 chips in the span of a few months and all though I haven't made any ruling out, it feels like it always happens when I use my Bench power supply instead of a 9V battery and a 7805.

Allthough the power supply says it's a dedicated 5V, maybe it somehow jumps sometimes and fries the chips.

Hmm, I'll keep buying chips and see if I can narrow it down.
 
200 mA is the max current for the entire chip, but most Microchip I/O pins source or sink a max of 20 mA (there's a constraint for total amount in/out of a port, also).

If your I/O lines are sourcing too much current, or switching highly inductive loads (e.g. relays or motors), you may be toasting the micro that way as well. If you are, I suggest either using a BJT or FET switch, or some flyback diodes.

EDIT: Additionally, if you have a nice bench supply, I'd suggest avoiding the 5V fixed output, and using the variable voltage / variable current ones. This way, you can limit the current going into your circuit (set the output to 5V, and then slowly ramp the current up until the current limiting turns off). If your micro alone is drawing 100 mA at 5V, you probably have a problem.
 
I like the idea of using the variable output on the power supply to see the current being used.
I just assumed that dedicated 5V output was created for this sort of thing and that's what I have been using.

Also, I think I might have discovered my problem with the chips stopping working.

I set the MCLR pin to be used as I/O and I assumed this turned OFF anything special the MCLR pin does. But as it turns out, when I set the MCLR to i/o, it internally ties to ground or 5V or whatever and if I use the internal oscillator at the same time, this can cause the chip to stop responding to ID requests from the programmer.

I'm going to try to set the MCLR pin through a resistor to 5V and see if I can salvage my old chips or at least prevent any new chips from going insane.

EDIT:
Hah! I tied the MCLR to +5V and set MCLR_ON as a config bit, and all my "dead" chips are working again!
Thanks for helping my brain get on the right track :D
 
Last edited:

Similar threads

Replies
19
Views
3K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
Replies
8
Views
4K
  • · Replies 11 ·
Replies
11
Views
2K