BHZ, MG, Brazil
Offline
Sr. Member
Karma: 8
Posts: 298
Android developer; Arduino enthusiast
|
 |
« on: October 22, 2012, 07:15:50 am » |
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
|
|
|
|
|
Global Moderator
Boston area, metrowest
Online
Brattain Member
Karma: 240
Posts: 16440
Available for Design & Build services
|
 |
« Reply #1 on: October 22, 2012, 07:28:58 am » |
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
|
|
|
|
|
BHZ, MG, Brazil
Offline
Sr. Member
Karma: 8
Posts: 298
Android developer; Arduino enthusiast
|
 |
« Reply #2 on: October 22, 2012, 08:20:04 am » |
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
|
|
|
|
|
Global Moderator
Boston area, metrowest
Online
Brattain Member
Karma: 240
Posts: 16440
Available for Design & Build services
|
 |
« Reply #3 on: October 22, 2012, 10:01:16 am » |
Yes, auto power selection.
If Vin/2 is greater than 3.3V, Vin is used for the power source.
|
|
|
|
|
Logged
|
|
|
|
|
BHZ, MG, Brazil
Offline
Sr. Member
Karma: 8
Posts: 298
Android developer; Arduino enthusiast
|
 |
« Reply #4 on: October 22, 2012, 11:00:24 am » |
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
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15310
Measurement changes behavior
|
 |
« Reply #5 on: October 22, 2012, 12:29:23 pm » |
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
Online
Brattain Member
Karma: 240
Posts: 16440
Available for Design & Build services
|
 |
« Reply #6 on: October 22, 2012, 04:53:49 pm » |
The LM358's power pins are shown to it's left with a power supply decoupling capacitor.
|
|
|
|
|
Logged
|
|
|
|
|
Nice, France
Offline
Full Member
Karma: 10
Posts: 232
|
 |
« Reply #7 on: October 23, 2012, 04:08:43 am » |
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
Sr. Member
Karma: 8
Posts: 298
Android developer; Arduino enthusiast
|
 |
« Reply #8 on: October 24, 2012, 09:04:59 am » |
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, V in 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
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15310
Measurement changes behavior
|
 |
« Reply #9 on: October 24, 2012, 09:22:18 am » |
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, V in 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
Sr. Member
Karma: 8
Posts: 298
Android developer; Arduino enthusiast
|
 |
« Reply #10 on: October 24, 2012, 11:54:35 am » |
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
|
|
|
|
|
|