1
\$\begingroup\$

I am trying to use ESP8266 with STM32L476RG Nucleo. The ESP8266 requires up to 300 mA to transmit properly. I tried to connect my ESP to an Arduino Mega, and it responds correctly, but when I brunch the ESP to the STM micro controller, the AT command was sent correctly, but the response message is not correct (if I send 'AT+RST' the response would be 'AT +RST').

I want to ask if the STM32L476 Nucleo can provide 300 mA that the ESP requires.

If it can require that 300 mA, what do you think the issue could be?

Well, I tried to use an external power supply that can provide 3.3 V the ESP8266 is responding this time with garbage characters baudrate = 115,200 and Tx -> Rx , Rx->Tx, CH-PD -> 3.3 V, VCC -> 3.3 V, and Gnd -> Gnd.

I am working with IARWorkbensh and the code is simple:

if (HAL_UART_Receive_IT(&UartHandle, aRxBuffer, RXBUFFERSIZE) != HAL_OK)
{
    Error_Handler();
}

if (HAL_UART_Transmit(&UartHandle, (uint8_t*)aTxBuffer, TXBUFFERSIZE, 5000) != HAL_OK)
{
    while(1);
}

aRxBuffer is a buffer containing the data received.

aTxBuffer is a buffer containing the command transmitted to the ESP8266 (in my case I'm sending an "AT+RST\r\n" command).

\$\endgroup\$
2
  • \$\begingroup\$ You will need to connect the external power supply to your nucleo board \$\endgroup\$ Aug 2, 2017 at 9:06
  • \$\begingroup\$ Add your code, and the evidence that the command was sent correctly. \$\endgroup\$ Aug 3, 2017 at 9:22

2 Answers 2

1
\$\begingroup\$

You should not power the ESP off of the STM's 3.3 V pin. You probably have a 500 mA fuse on there and if your STM is running full load, maybe a couple of LEDs or other components on the board and the ESP together could exceed that fuses rating.

Get the LM1117 instead; it's a solid 3.3 V regulator. Also put a beefy capacitor parallel to the ESP's supply, so when it starts building up its Wi-Fi network the current peak needed can be easily supplied.

\$\endgroup\$
0
\$\begingroup\$

The Nucleo should happily give you 300 mA of 3.3V current - it's regulator is rated at 500 mA so even with those few LEDs and running the MCU at 80 MHz ypu should hace enough. There IS one caveat though - it cannot do so if powered through the programming USB - you need to power it through E5V or VIN for it to work. Or get an external 3.3V and use that to power the board. Everything should be in the manual.

Your description of connections when using the external PSU isn't clear but if you connected the PSUs output to Nucleo's 3V3 without disconnecting Nucleo's regulator you might've fried the regulator.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.