Add SPIRAM to WROOM32

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Add SPIRAM to WROOM32

Post by rdagger » Sat Apr 11, 2020 1:41 am

I've built a small handheld project using an older Wemos Lolin32 (no SPIRAM). Unfortunately, after beta testing I realized the urequests class is running out of memory. I tested the code on a newer Lolin32 Pro (4 MB of SPIRAM) and it works much better.

Everything is 3D printed and soldered together. Switching boards would require extensive redesign. I found a post on the ESP32 forum indicating that you can add 4MB of SPIRAM to the ESP WROOM32 chip on my Lolin32.

Does anyone know if MicroPython is compatible with this mod?
Does anyone know of a source to get the IPS6404L-SQ-SPN in the US or if there is an alternative chip available from Mouser or Digikey?

User avatar
tve
Posts: 216
Joined: Wed Jan 01, 2020 10:12 pm
Location: Santa Barbara, CA
Contact:

Re: Add SPIRAM to WROOM32

Post by tve » Sat Apr 11, 2020 1:57 am

I want to do the same and ordered 10x LY68L6400 chips via aliexpress: https://www.aliexpress.com/item/4000700754968.html, but they haven't arrived yet. LCSC is a good alternative source. I figure that if you wire them up just like they're wired on WROVER modules it should work just fine. We shall see :-) :-)
You do need gpio 16 & 17 for that, IIRC, check the schematics. Warning: you do have to make sure that your psram has the same voltage as the flash on your WROOM. There are a couple of variants (e.g. WROOM-32 vs WROOM-32D) and some have 1.8V flash others 3.3V flash. I believe the chip you mentioned is 1.8V and less likely to work with your module... Note also that the gpio are hard-coded into esp-idf, so if you must use different pins you have to edit the source.

User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: Add SPIRAM to WROOM32

Post by rdagger » Sat Apr 11, 2020 2:40 am

Thanks for your response. Please let me know if it works.
Here's my board. Is it possible to check the flash voltage without removing the shield?
Attachments
lolin32.jpg
lolin32.jpg (203.07 KiB) Viewed 4465 times

User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: Add SPIRAM to WROOM32

Post by rdagger » Sat Apr 11, 2020 3:28 am

I found a better implementation of urequests that supports response.iter_lines(). Everything is working great now!

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Add SPIRAM to WROOM32

Post by Roberthh » Sat Apr 11, 2020 6:36 am

Just for interest I upgraded a Wemos Lolin Lite with that PSRAM chip, following the cited instructions. It worked instantly. If you want to do that, better remove the shield cap from the Wroom module and place the RAM on top of the flash chip. They share 6 of the 8 required connection. Removing the cap is not difficult. You just need a sufficient powerful soldering iron. Start at a corner. Solderding the RAM is the opposite. You need a fine tip, good eyes and a steady hand. Even if the latter two a degrading with me, I finally succeeded. But, as said, there is no commercial need to do so, given that ESP32 boards with PSRAM are easily available.

B.T.W.: Compared to that, replacing flash with a larger sized Version is easy.

User avatar
tve
Posts: 216
Joined: Wed Jan 01, 2020 10:12 pm
Location: Santa Barbara, CA
Contact:

Re: Add SPIRAM to WROOM32

Post by tve » Sat Apr 11, 2020 3:46 pm

Roberthh wrote:
Sat Apr 11, 2020 6:36 am
Just for interest I upgraded a Wemos Lolin Lite with that PSRAM chip, following the cited instructions.
Which PSRAM chip? There are two different ones mentioned in this thread.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Add SPIRAM to WROOM32

Post by Roberthh » Sat Apr 11, 2020 4:08 pm

IPS6404LSQ, as far as I can read the numbers. That's the one I could get. Picture attached. I also changed the flash chip. The Wemos lite is not the best candidate due to it's CH340 USB/Serial bridge, which is pretty slow. But it had the flash directly accessible.
wemos lite.jpg
wemos lite.jpg (129.11 KiB) Viewed 4419 times

User avatar
tve
Posts: 216
Joined: Wed Jan 01, 2020 10:12 pm
Location: Santa Barbara, CA
Contact:

Re: Add SPIRAM to WROOM32

Post by tve » Sat Apr 11, 2020 5:58 pm

Nice mod!

Post Reply