Output voltage from avr pin

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I supply a voltage to my chip (atmega328p) of 4.1v the output I had expected the pin out (ie:PC0) to be in that range.

Instead I measured it as 1.6v. I have made a horrible mistake of connecting my pin to a regulator (mcp1703) to power a low power chip.

I now realize I should have tied it to a transistor, but thought I could save some parts (and time soldering).

I of course printed a circuit board and put everything on before realizing. Any ideas? Do I have to solder some wires to a transistor or is there a way around this?

Thank you so much! If I left out any info I can fill anything else in.

What would you do? (Reprinting and Re-soldering would cost quite a bit ($80 with new chips) and take too long if I can avoid it).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So if I read between the lines, you incorrectly got a fixed 1.5V regulator in lieu of a 4.0 V regulator.

Two methods come to mind.
a) Remove he 1.5V regulator & replace with 4.0V regulator.
b) Bias the regulator up the way you bias a LM317, using the same formula but replacing the 1.2V reference with 1.5V. This requires two resistors ( depending upon how accurately you want to set the voltage) & cutting a track (or at least isolating the common terminal).

This should really be in the General Electronics, as it is not specifically AVR related. This is especially so using a regulator from the evil empire!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what is the pin voltage when the regulator is removed?
Does it make the 4V then, or not?
have you specified the pin to be output, or is it still input with pull-up?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From what I can tell he is trying to feed a voltage regulator from an output pin of the mcu but didn't take into account how the voltage dips as soon as you start sourcing current.

How much current are you trying to get from the pin?

Alex

ps if you have any unused pins maybe it will help to connect them together (all outputs) and see if that raises the voltage

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If that is the case Alexan_e then he best cut the track and add a transistor plus 2 resistors. Then first validate that this new schematic works as wanted and then make a new PCB.....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely the best way it to add a transistor or even better a small logic level mosfet but maybe he can get away with a short between a couple of pins depending on the consumption level and availability of pins.

Using a pin output as a power source for an external device is not a good practice and should be avoided.

Alex

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meslomp wrote:
what is the pin voltage when the regulator is removed?
Does it make the 4V then, or not?
have you specified the pin to be output, or is it still input with pull-up?

On a empty pin out it is 3V, which would be fine.
It is output:

DDRC |= (1<<PINC0) | (1<<PINC1);
	PORTC |= (1<<PINC0) | (1<<PINC1);

PinC0 is where it connects to the regulator.
PinC1 is where it connects to nothing, except my voltmeter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexan_e wrote:
From what I can tell he is trying to feed a voltage regulator from an output pin of the mcu but didn't take into account how the voltage dips as soon as you start sourcing current.

How much current are you trying to get from the pin?

Alex

ps if you have any unused pins maybe it will help to connect them together (all outputs) and see if that raises the voltage

I am a little confused with the data sheet, which is technically the current draw, but I posted it below:

MCP1702 requirements:
250 mA output current.
1.6 uA typical active current.
178 mV dropout voltage.

Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/39610C.pdf

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Btw, how bad is it to power a low power chip directly from the atmega328p. Like never done, or if low enough power it is okay?

On further investigation I might have found a short circuit, everything looked good, but the multimeter doesn't lie..... Sadly I don't have a soldering iron and wick where I am.

First, I will wait a week or two when I get an iron, and try to fix the short circuit.

If the problem still persists I will resurrect the thread I guess. I am hoping that is the issue....

Otherwise I will try using two pins as alexan_e ingeniously suggested, or I will have to somehow stick a transistor and two resistors on my smd board....

And thank you everyone for the suggestions! It really helps me see all my options.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

msj121 wrote:

I am a little confused with the data sheet, which is technically the current draw

How much current does the load of that regulator absorb?

msj121 wrote:

Otherwise I will try using two pins as alexan_e ingeniously suggested, or I will have to somehow stick a transistor and two resistors on my smd board....

I haven't really powered anything From AVR pins but connecting two or more pins should effecvtivly limit the current of each one and raise the voltage.

Just for reference I'm attaching the output voltage vs source current graph for m328, you are probably sourcing much more than 20mA

If you connect an external device a mosfet could probably be used without any resistors

Alex

Attachment(s): 

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

msj121

as you do not seem to have reworking equipment at hand all the time to be playing, I would suggest you try to cut the track between the regulator and the AVR and putin the transistor right away.
the problem is that when the output of the regulator draws to much current you will blow-up the AVR pins and have nothing to work with. If you blow the transistor you can still write code and see how that performs on other parts of your design. and then when you have the ability to solder again you can replace the transistor.
Also a transistor is much less costly than an AVR....