MicroPython on ESP32 with SPIRAM support

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Fri Dec 22, 2017 11:44 am

@EasyRider

Thank you very much for the donation.
Best Regards,
Boris
Last edited by loboris on Fri Dec 22, 2017 11:59 am, edited 1 time in total.

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Fri Dec 22, 2017 11:54 am

OutoftheBOTS_ wrote:
Fri Dec 22, 2017 11:21 am
My new ESP32 WROVER board juts showed up made by LOLIN with 4MB psRAM and 4bit SD card.

I just discovered this thread and am still reading though it but am very impressed by what I am reading and noticed that previous donated to your paypal account and I would like to do the same as you have put so much work in. Can I get details please :)
Lolin32 Pro, with very low price, SDCard, 4MB psRAM, very good hw design (great for low power applications) is at the moment probably the best ESP32 development board for MicroPython. Congratulations for your choice.

You can support this project by donating via PayPal, just click on the link.

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Fri Dec 22, 2017 11:58 am

@devnull

I've done some work on SPI slave support, but I'm planning to work on SPI slave module implementation after I push the next update.

Wessix
Posts: 2
Joined: Mon Dec 18, 2017 11:29 am

Re: MicroPython on ESP32 with SPIRAM support

Post by Wessix » Fri Dec 22, 2017 12:38 pm

Hi Loboris,
Do i have to "Compile/build" your firmware port by myself in any case, or is ther some ready to use bin. I'm on a windows machine and don't have a very good python setup there and i'm not that familiar with the build process.
I'm using ESP32 from HrpH (Doit), and have one from Node MCU. Don't know about extra flash on these boards, for the first step that wouldn't be the most important thing for me, but ssh or ftp would be very nice to simplify workflow with coding.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Fri Dec 22, 2017 1:04 pm

I have just made a small donate to your paypal account and plan to make more from time to time to support your work :)

I built your firmware on my windows computer and flashed it to my board and it all worked( had to alter the flash.sh to flash it though).

I tried out your tftdemo.py and was surprised on the speed it ran at :) :)

Not that I have tried it yet but you have support for 4 bit SD card but I notice on your docs it has to use pacific pins and they seem to be different to the pins on my board. Here's my pinout for the SD card CMO-15, CLK-14, D0-2, D1-4, D2-12, D3-13. Will your SD card library still work with this pin out??

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Fri Dec 22, 2017 1:15 pm

Also I would recommend the LOLIN32 pro as not only it is very well featured with battery charger for lithium battery and 4 bit SD card but it is thinner than other ESP boards so fits on a bread board better and everything is labeled much better i.e the LED has a number 5 next to it to tell you it is attached to pin 5 and all the pin numbers for the SD card r also written on it.

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Fri Dec 22, 2017 1:17 pm

OutoftheBOTS_ wrote:
Fri Dec 22, 2017 1:04 pm
I have just made a small donate to your paypal account and plan to make more from time to time to support your work :)
...
Here's my pinout for the SD card CMO-15, CLK-14, D0-2, D1-4, D2-12, D3-13. Will your SD card library still work with this pin out??
Thank you very much for the donation.

This pinout is the exact pinout needed for 4-bit SD mode.
I you look at Using SDCard with sdmmc driver connection, ESP32 column, you'll see that the pins (GPIOs) are the same.
It is the same pinout as on ESP32-WROVER-KIT v3 on which I've tested it.

Best Regards.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Fri Dec 22, 2017 9:21 pm

Ha Ha Ha thanks. I was looking at the wrong column, I was looking at the pin numbering in column 3 ( SD pin ) not the numbering in column 1

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Fri Dec 22, 2017 10:11 pm

I know your really busy doing great work with the firmware but you seem to the the guy that can answer everyone questions and provide solutions.

My question is about hardware PWM. Reading the ESP32 datasheet it seems that it has 2 types of PWM, a high Freq for flicker free LED and a low freq for motor PWM as motors need a low Freq or the transistors in the H-bridge don't switch fast enough and loose efficiency.

I was wondering does your firmware support both types of hardware PWM??

Also wondering does the motor PWM update duty faster??

One of the problems with motor PWM is to get a dc motor to turn at exact RPM you need to read the encoders and detect the exact speed it is turning then update the duty cycle to unsure the motor maintain correct RPM for your robot to maintain direction. It is very common to be updating the duty at about 20hz some high performance robots can use updates as high as 50hz. The quicker the duty updates the more time the chip has to run the rest of the program

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Sat Dec 23, 2017 6:36 am

Ok I hate to keep asking too many questions but I have hit another problem.

I am using the SD card on my Lolin32 pro. The following code works and will show me the correct contents of my SD card

import uos
import os
uos.mountsd(True)
os.listdir()

I have your display.TFT() libiary working and run your tftdemo.py and can run all the demo functions.

I tried adding this code

tft.image(0, 0, "bots.jpg")

but I get the following error written in red text

E (189708) sdmmc_cmd: sdmmc_read_sectors_dma: sdmmc_send_cmd returned 0x107
E (189709) diskio_sdmmc: sdmmc_read_blocks failed (263)

If I copy the file "bots.jpg" to the flash and comment out the line uos.mountsd(True) then the program runs fine and displays the image so the problem only arises when I try to load the image from the SD card

I also tried just making a simple text file on my PC and save it to the SD card then plug the SD card into the ESP and could easily open and read the text from the file correctly from the ESP

Post Reply