Pages: 1 [2]   Go Down
Author Topic: Atmega 328 chip - 3.3V?  (Read 682 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Lol, not trying to be difficult here, I'm still learning. I understand what your saying though about the current from the I/O pins not being constant. But if I were to power the BT module by the 12V power supply instead of an I/O pin, wouldnt that supply the constant current I need, being the module would draw from the wall wart instead of one of the Atmega's pins?
No, because you do not provide current, the BT module draws current.  It takes what it needs when it needs it.  Its needs will change depending on what it is doing.  If it's transmitting it will be drawing a lot more current than if it's sat there idle.

And you never ever EVER consider powering something from a digital IO pin, unless it is an LED.  The IO pins can provide at most 40mA, which is nowhere near enough to power something like a BT module.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So, since I do have a few spare 7805's can I use one of those with a resistor since I'll have a regulated 5V coming out the Vout? Or is that not a wise choice, I dont wanna compromise the circuit.

It might be regulated out of the 7805, but once it goes through the resistor it won't be, because the current will vary.

Read the link (http://www.cmiyc.com/tutorials/regulator-basics/) about why you can't use a resistor.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lol, not trying to be difficult here, I'm still learning. I understand what your saying though about the current from the I/O pins not being constant. But if I were to power the BT module by the 12V power supply instead of an I/O pin, wouldnt that supply the constant current I need, being the module would draw from the wall wart instead of one of the Atmega's pins?
No, because you do not provide current, the BT module draws current.  It takes what it needs when it needs it.  Its needs will change depending on what it is doing.  If it's transmitting it will be drawing a lot more current than if it's sat there idle.

Just so I completely understand this, 7805 fundamentally is a no-go b/c though it'll put out a regulated 5V and adding a resistor(lets say 125ohm) to it will bring it down to 3.3V,  that 3.3V can and will change depending on the state of the module and the needed current of that particular state, thus changing the current going through the resistor, thus changing the resistance anywhere from 0-125, ultimately changing the 3.3V and either going too low or too high and frying my module.

Quote
And you never ever EVER consider powering something from a digital IO pin, unless it is an LED.  The IO pins can provide at most 40mA, which is nowhere near enough to power something like a BT module.

Well thanks for saving my 328 chip from myself
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just so I completely understand this, 7805 fundamentally is a no-go b/c though it'll put out a regulated 5V and adding a resistor(lets say 125ohm) to it will bring it down to 3.3V,  that 3.3V can and will change depending on the state of the module and the needed current of that particular state, thus changing the current going through the resistor, thus changing the resistance anywhere from 0-125, ultimately changing the 3.3V and either going too low or too high and frying my module.
Close.

It doesn't change the resistance.  The resistance cannot change.

What it does is change the voltage that is dropped across the resistor.

Say you have a resistor of 125Ω, and a regulated 5V supply.

If the module draws 10mA then Ohms Law tells us that V=RxI, which is 125 x 0.01 which is 1.25, so the voltage after the resistor would be 5-1.25 = 3.75V.

If it draws 30mA, then the same formula: 125 * 0.03 = 3.75, so the voltage after the resistor at that point would be 5-3.75 = 1.25V.  BT module cannot function.

If it only draws 5mA, then 125 * 0.005 = 0.625V, so the voltage after the resistor would be 5-0.625 = 4.375V and *bang* goes the BT module.

This is how ammeters work.  A very small resistance is placed in the circuit where you want to find out the current, and the voltage dropped across that resistor is measured.  Using Ohms Law the ammeter then calculates the current that must be flowing through the resistor.

These are some of the fundamentals that you really must get to grips with in order to do electronics.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just so I completely understand this, 7805 fundamentally is a no-go b/c though it'll put out a regulated 5V and adding a resistor(lets say 125ohm) to it will bring it down to 3.3V,  that 3.3V can and will change depending on the state of the module and the needed current of that particular state, thus changing the current going through the resistor, thus changing the resistance anywhere from 0-125, ultimately changing the 3.3V and either going too low or too high and frying my module.
Close.

It doesn't change the resistance.  The resistance cannot change.

What it does is change the voltage that is dropped across the resistor.

Say you have a resistor of 125Ω, and a regulated 5V supply.

If the module draws 10mA then Ohms Law tells us that V=RxI, which is 125 x 0.01 which is 1.25, so the voltage after the resistor would be 5-1.25 = 3.75V.

If it draws 30mA, then the same formula: 125 * 0.03 = 3.75, so the voltage after the resistor at that point would be 5-3.75 = 1.25V.  BT module cannot function.

If it only draws 5mA, then 125 * 0.005 = 0.625V, so the voltage after the resistor would be 5-0.625 = 4.375V and *bang* goes the BT module.

This is how ammeters work.  A very small resistance is placed in the circuit where you want to find out the current, and the voltage dropped across that resistor is measured.  Using Ohms Law the ammeter then calculates the current that must be flowing through the resistor.

These are some of the fundamentals that you really must get to grips with in order to do electronics.

Ok I think everything clicked now. Thanks for clearing that up. Im just gonna order a few 3V regulators rather than buying an adjustable reg.. Yeah I thought I had most of it down, this is my first perfboard project and not using an already assembled Arduino. But hey, Im a little wiser now. Thanks everyone for the replies and links.
Logged

Pages: 1 [2]   Go Up
Jump to: