I've successfully migrated and ATMEL328P-UP microcontroller from the Arduino Uno Board to a breaboard, following these instructions: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard. Everything is OK, the bootloader worked and code is already uploaded an running.
The ATMEL is connected to a pair of sensors, and all the system works using 3.3V. And here comes the problem: I'm using a 5V USB power bank to power up everything. When I make this connection:
USB Power Bank @ 5V -> Arduino Uno board (without the microcontroller) -> 3.3 V Output from the board -> ATMEL/Sensors on the breadboard
everything works just fine! Now I decided to replace the Arduino uno board with an LM317 voltage regulator which gives me the 3.3V needed. The connection is this:
USB Power Bank @ 5V -> LM317 with 3.3 V output -> ATMEL/Sensors on the breadboard
and nothing happens! Is as if there wasn't enough current to feed the ATMEL nor the sensors. I've checked the Vcc/GND pins of the sensors and the ATMEL and they're all getting the required 3.3 V, but for some reason the system seems to be OFF.
What could be happening? I'm sure the USB power bank is at full charge, so it should be able to supply enough current. Any suggestions?
Thanks guys!
-
1Can you show the actual LM317 circuit?Majenko– Majenko2017年03月10日 18:11:27 +00:00Commented Mar 10, 2017 at 18:11
-
How have you connected ground through the board and breadboard?Mikael Patel– Mikael Patel2017年03月10日 19:52:32 +00:00Commented Mar 10, 2017 at 19:52
-
@MikaelPatel: I'm not going through the board in the second case (it's been replaced by the voltage regulator).CodificandoBits– CodificandoBits2017年03月10日 20:09:09 +00:00Commented Mar 10, 2017 at 20:09
-
@Majenko The LM317 circuit is as the one shown here. In my case R2 = 1.6K and R1 = 1K to ensure that Vout = 1.25*(1+1.6/1) = 3.25 V . Connections are as follows: +5 V Power Bank -> Vin LM317; Vout LM317 -> Vcc ATMEL (pin 7)CodificandoBits– CodificandoBits2017年03月10日 20:13:26 +00:00Commented Mar 10, 2017 at 20:13
1 Answer 1
According to the datasheet, the LM317 needs an input voltage 3v higher than the output. Since 6.3<5, there's not enough margin for the LM317.
You can use an AMS117 LDO @3.3, which only needs an input of 3.9v to operate. I find these modules very handy. If the MCU has some tolerances, you can likely get away with using a diode or two in series with the 5v rail to drop it down; the actual forward voltage fluctuates slightly on load, but it will likely stay in the acceptable range for your MCU.
you can also use a switch-mode regulator, commonly sold as "buck converters" on ebay, to more efficiently reduce the voltage. This is the way to go over linear regulator like the 317 if you power your project from batteries or have concerns about heat. I go through a lot of these style converters, and they seem to work very well.
-
Indeed! According to the datasheet, 5V are not enough for the LM317; so even if the LM317 delivers the required 3.3 V it might be an issue with the current?... I'll give the AMS117 a go and let you know!CodificandoBits– CodificandoBits2017年03月11日 11:49:42 +00:00Commented Mar 11, 2017 at 11:49
-
your current would be fine, if it weren't the LM317 would be hot. It's the voltage drop from the 317's darlington pair transistors that cause the problem. The AMS117 uses only a single pnp transistor and thus drop less voltage.dandavis– dandavis2017年03月11日 13:46:19 +00:00Commented Mar 11, 2017 at 13:46