Pages: [1]   Go Down
Author Topic: UNO Rev. 3: What is the LM358 for ?  (Read 3464 times)
0 Members and 1 Guest are viewing this topic.
BHZ, MG, Brazil
Offline Offline
Sr. Member
****
Karma: 10
Posts: 346
Android developer; Arduino enthusiast
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the purpose of the LM385 in the Arduino UNO Rev. 3 ?

I see one of its output simply feeds a MOSFET (?) while the other lights a LED.

Thanks.
Logged

Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

1/2 is used as a voltage comparator, to select whether the board is powered from USB or from Vin.
The other buffers D13, removing the load created by the L LED and its current limiting resistor.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

BHZ, MG, Brazil
Offline Offline
Sr. Member
****
Karma: 10
Posts: 346
Android developer; Arduino enthusiast
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1/2 is used as a voltage comparator, to select whether the board is powered from USB or from Vin.

Thanks, CrossRoads!

So, the 1st half of the LM358 works like an electronic jumper, automatically switching between different power sources ?

If that is so, what happens when both inputs (USB & jack) are powered?
Logged

Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, auto power selection.

If Vin/2 is greater than 3.3V, Vin is used for the power source.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

BHZ, MG, Brazil
Offline Offline
Sr. Member
****
Karma: 10
Posts: 346
Android developer; Arduino enthusiast
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The schematics won't show the other pins for the LM358. What powers the IC? Since power source hasn't been selected yet, where does it get its power (5V, I guess) from?
Logged

Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The schematics won't show the other pins for the LM358. What powers the IC? Since power source hasn't been selected yet, where does it get its power (5V, I guess) from?

Well it's called a auto-voltage selection circuit, but in reality it operates as a auto voltage cut-off circuit. If there is external power connected via the connector (or Vin pin) of at least the minimum value then that hardwires to the on-board voltage regulator which then generates +5vdc Vcc power which is hardwired to the board's Vcc bus. The op-amp comparator seeing this valid Vin voltage then switches it's output to shut-off the mosfet switch that in turns prevents the USB's +5vdc source from being routed to the board's Vcc buss. That make sense?

Lefty
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27372
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The LM358's power pins are shown to it's left with a power supply decoupling capacitor.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Nice, France
Offline Offline
Full Member
***
Karma: 11
Posts: 237
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If Vin/2 is greater than 3.3V, Vin is used for the power source.

So while DC in is supposed to be 7-12V it is actually 6.6-12V? (well, 6.61 or whtever)
Logged

BHZ, MG, Brazil
Offline Offline
Sr. Member
****
Karma: 10
Posts: 346
Android developer; Arduino enthusiast
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies, my friends, and sorry for bothering you with even more questions!

I saw how the LM358 is being powered by a 5V source.

What I don't get is this: what selects what 5V source is to be used, since there are 3 possibilities: USB, Vin and both.

In my mind it is sounding like a chicken-and-egg paradox: the LM358 selects the power source, but in order to select a power source, it has to be powered by something that has not yet been selected.

I am here: http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf


Logged

Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies, my friends, and sorry for bothering you with even more questions!

I saw how the LM358 is being powered by a 5V source.

The board's Vcc bus, the same bus that powers all the components requiring +5vdc on the board.

What I don't get is this: what selects what 5V source is to be used, since there are 3 possibilities: USB, Vin and both.

It's best to think of the two sources of +5vdc as either the USB's +5vdc or the +5vdc from the output of the on-board voltage regulator that is powered by Vin on it's input. There is really no 'switch' that select between two possible sources, but rather just a FET switch that turns off the USB's voltage if there happens to already be voltage on the board from the +5vdc and +3.3vdc as a result of their being a valid Vin voltage being applied. The purpose of the voltage selector circuit is to just prevent a situation where the on-board regulator is  +5vdc and USB +5vdc are being 'wired' together.

In my mind it is sounding like a chicken-and-egg paradox: the LM358 selects the power source, but in order to select a power source, it has to be powered by something that has not yet been selected.

There in nothing on the board that can prevent the output from the on-board +5vdc regulator from powering everything on the board that is using +5vdc. Think of it as the default power that can't be switched off as long as there is power being applied via the external power connector or the Vin pin. That is why if there is both external and USB power available at the same time, the external power is the default power being used and the USB power will be turned off via the FET 'switch'.

Again a more accurate and functional name for the circuit would be to call it the 'USB auto voltage cut-off circuit'.
Lefty

I am here: http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf



« Last Edit: October 24, 2012, 09:32:47 am by retrolefty » Logged

BHZ, MG, Brazil
Offline Offline
Sr. Member
****
Karma: 10
Posts: 346
Android developer; Arduino enthusiast
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks!

I'll be getting a bit beyond the LM358 here, but related to the question, since it has to do with what feeds the 5V bus:

If I were to have a functionally similar behaviour in an Arduino-clone I am making, would a Dual Common-Cathode Schottky Rectifier (specifically: SBL3040PT [link for datasheet]) work?

I also have a S15D40C. Both the S15D40C and the SBL3040PT are common cathode, and were taken from old ATX PSUs or old CRT monitors. Besides those I have a few schottky diodes 1N5819.

In my case, however, instead of an USB port, I have a header for a FTDI basic breakout board.

Which option would yield the least voltage drop across the diodes?
Logged

Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

Pages: [1]   Go Up
Jump to: