Close

ESP Everything transcript

A event log for ESP-everything chat with Sprite TM

In this chat we'll be discussing the ESP family with Sprite TM

sophi-kravitzSophi Kravitz 03/09/2018 at 16:350 Comments

Sophi: And.... let's get started. welcome @Sprite_tm !


Sprite, can you introduce yourself, tell us all who you are and what you work on?
(pretty excited to have you hosting btw)

Sprite_tm says: Thanks Sophi, glad I can be here again! Fingers all warmed up, hope I can type quick enough :)
Marek has joined this room.10:05 AM

Sprite_tm says: I'm Jeroen Domburg, aka Sprite_tm. I am an engineer for Espressif, working mostly on the platform side (SDK, drivers, examples, ...) but I tend to poke my nose in other internal stuff as well. Somehow I also got the title of 'marketing manager'. Not sure how I got that one, but I try to use it for good, e.g. as an excuse to port Doom to the ESP32.

Sprite_tm says: Furthermore, I also tend to meddle a bit in electronics here and there. I think you may have seen some of my stuff on HAD, as they have featured some of my projects. Sophi, mind if I plug the PocketSprite here as well?

https://pocketsprite.com/

POCKETSPRITE

PocketSprite - Tiny Retro Gaming on your Keychain
PocketSprite is the world's smallest gameboy and sega emulator. Play all your favorite gameboy and mega drive ROMS on this keychain emulation console.

Read this on PocketSprite >

plug away :)

Sprite_tm says:So my latest (well... two years in the making) project is a tiny game console based around the ESP32, the Pocketsprite. It's open source and all, and already has a GameBoy and Game Gear emulator, but it also has a SDK so you can write your own things for it. Crowdfunding is still going on: https://www.crowdsupply.com/teampocket/pocketsprite/ .

cpope says: congrats on your campaign, looks like it is going well!

Sprite_tm says: So, erm, any questions about Espressif, myself, the PocketSprite or whatever are welcome. I'll stick to the questions posted at https://hackaday.io/event/69323-esp-everything-chat-with-sprite-tm first, feel free to chime in if you have anything to say on the topics there.

Sprite_tm says:cpope: Thanks! Yes, >600% funded, we can't complain :)

Milkey Mouse says: Yes the PocketSprite is really cool. I've wanted one ever since I saw Sprite_tm's hackaday superconference talk. Just a little too lazy to replicate it myself ;)

Sprite_tm says: Yes, I heard that way too often, hence me actually turning it into a commercial product :)

Sprite_tm says: Anyway, 1st question from the comments:

Sophi: Here is our first question: Would it make sense to use small USB-capable chips in place of the USB to serial converter on the development boards, like the micro:bit does, to allow for easier programming (for example using UF2) and possibly access to the on-flash filesystem? Would Espressif or you personally be interested in developing such a board?

Sprite_tm says:  he guy wo had way too many fun with Unicode asked: "Would it make sense to use small USB-capable chips in place of the USB to serial converter on the development boards, like the micro:bit does, to allow for easier programming?" The answer is: yes! Actually, one of us (Angus, aka projectgus) already looked into this for the esp8266 but aborted his project somewhere. We think it would make sense to replace the usb-to-serial converters we use now with something slightly more custom-made for ESP32s. We just don't really have the time to design something like that ourselves, but we'd be welcoming efforts there.

question is from @ɖҿϝիɟթվ

konsgn says:I finished wiring up a similar prototype the day the campaign launched. Really happy to see that it was turned into a thing. great job!

Sujith Anandan: That was awesome..congrats

Thomas Shaddack says:10:11 AM
thought. add rotation encoder or three and it could be a good "core" for all sorts of lab instruments.
watson has joined this room.10:11 AM

Sprite_tm says:10:11 AM
Sophi: GMTA:) You do the questions, I'll do the answers.

ok cool

question 2: Is there any recent software improvement for the ADC of the ESP32? Will there be a new revision of the chip with improved V_REF and a more linear behavior?

Sprite_tm says:
Anyway, we are looking into making our devices slightly more user-friendly. We have things planned wrt a native USB-interface for the next chip. We'll still be mostly WiFi/BT, but we have noticed USB can be useful at times.

Sprite_tm says:
Aah, the dreaded ADC.

Sprite_tm says:
The answer is yes - we're actually working on improving the characterization in software so you at least have an option to get something linear out of the ADCs. For now, you'll have to measure the offset of the reference voltage yourself, but we are working on integrating this in the ATE process and burning the exact reference voltage into the E-fuses. It still does not mean you have a perfectly linear 12-bit ADC, but it should go a fair way in making it more useful. For our next chip, we'll definitely be improving the ADCs - the ADCs in the ESP32 are far from the best we can do.

ɖҿϝիɟթվ says:
thanks, that's good to know!

Sophi: so is the ADC in the esp8266 not working? I get some data using the Arduino IDE, but haven't checked if it is accurate yet

Milkey Mouse says: It's just not very linear from what I remember

Sprite_tm says: No, this is the ESP32 ADC. The 8266 ADC probably works, but to be honest I have not heard anything about its precision.

benjaminaigner says:
@Sophi Kravitz  There is a big discussion ongoing on how to measure accuracy and linearity of the ADC in ESP32...

Milkey Mouse says: *in the ewp32

Sophi: where is that discussion?

Sprite_tm says: Sophi: The issues are that a. the Vref is not very accurate. Well, it is, but it varies chip-by-chip. Once you know it and compensate for it, that's no issue. The other issue is the non-linearity. We have curves to compensate for that (also in esp-idf), but you lose some precision near Gnd/Vref that way.

Sprite_tm says: Analog hardware on chips is hard :/

benjaminaigner says: On GitHUB :-), different issues are posted here:
https://github.com/espressif/esp-idf/issues?utf8=%E2%9C%93&q=adc

Sophi: ok cool. I'm just measuring the battery, so when it gets near 3.6-3.7 is enough
thanks for the link @benjaminaigner

Thomas Shaddack: ...if a pwm is reliable, could we self-calibrate the adc with a small circuit that'd feed it with filtered pwm-ed voltage from 0 to vcc and build a curve to write to the memory?

Sprite_tm: Sophi: Pro-tip: If you have a charger that outputs a 'battery full' signal, connect that to the ESP32. If that goes active, you know that what you're measuring corresponds to 4.2V exactly.

Sophi: good point :) yeah I have 4.2 mapped to 1V

Ɖҿϝիɟթվ: ooh, I didn't even think about using the status led pin for anything else than the led
Eric has joined this room.10:19 AM

Sophi: @ɖҿϝիɟթվ what will you use it for?

Sheffieldnick: Question: what's the best way to contact Expressif about technical issues? e.g. I submitted an issue on github about the ESP8266 coming out of light sleep over 2 months ago... ? Thx! :D https://github.com/espressif/ESP8266_NONOS_SDK/issues/78
fkilleen has joined this room.10:19 AM

Sprite_tm: The question ties in with that trick: if you have a precise external voltage you can measure, you can figure out what the Vref of the chip is, feed that into the ADC calibration logic in esp-idf, and that will then give you a more precise measurement.

Sophi: next question from @haddyhad, a bit of a rant: Hey SpriteTM! Esp32 sdk development has issues, Minor features pending for over a year, commits take forever to make it to the public repo and still break stuff, some peripherals still not supported, wifi/Bluetooth not optimized, docs incomplete, not enough effort to avoid both shanzhai practices (passing around zip files, multiple versions of closed source libs) and corporate stuff (sales conduit to tech support solving the same problems over and over in private instead of public support response and push to public KDB).

Sprite_tm: Well, first of all, if you're talking about very recently, we've had the Chinese new year which tends to slow things down. Apart from that, most of the drivers are done now, so we only have a few done that at least our customers do not have a pressing need for. Apart from that, we're using the SDK more and more for internal projects that are pushing the limits of what the chip can do, and that brings small but pretty hard to pin down bugs to the surface; the fact that we're expanding QA/testing to actual projects and not just the SDK helps there as well. I think it's just part of the lifetime of the SDK: initially, there's a huge rush to get everything built, but later on the priorities are more on making it bug-free (as much as possible), polishing it and maintaining it.

Sprite_tm: I don't really see us reverting to shanzai practices and corporate stuff, do you have any examples of that if you're here?

Sophi: question from @Milkey Mouse : I have too much time on my hands and am considering trying to get linux-xtensa to run on an ESP32 (obviously with a trimmed-down kernel, maximum SRAM, XIP, etc.). What are some roadblocks that I would come across? I'd have to use ucLinux no-MMU stuff because the MMU isn't the Linux-capable one as used in the Diamond 232L, right?

Sprite_tm: Ah, I saw that one. That would be absolutely awesome to do, if you ever get that off the ground and I'll see if we can help wrt getting WiFi/BT to work!

Arsenijs: Posted a question, fingers crossed =)

Simon Merrett: @Sophi Kravitz I think @ɖҿϝիɟթվ was talking about using the charge full status led voltage going high as a trigger to read ADC and record it as whatever voltage your charger gives as full (4.2/4.25V).


Sprite_tm: Some issues... well, first of all, you indeed don't have a MMU compatible with Linux, so as you guessed you'd have to run the MMU-less variant. Another issue would be that the amount of RAM you can run instructions on is pretty limited: only a few hundred K if memory serves, and external PSRAM can't do it at all. Not sure if Linux plays well with that.

Milkey Mouse: Why wouldn't PSRAM work? Can't it be mapped in same as the rest of it?
I mean, code and data would be separated, but that isn't a showstopper

Sprite_tm: No; the memory range it normally lives in can only be connected to the D-port, which can't execute instructions. You may be able to hack something with connecting psram instead of flash, however... not sure how viable that would be. Flash is usable as both instruction as well as data memory, but is read-only.

Milkey Mouse: Can you execute instructions from flash without loading them into RAM first (XIP)?

Sprite_tm: Yes, you can definitely do that.

Sophi: Next question is from @davedarko : I have this project idea: #WIFI Game Boy Cartridge  - I was a bit naive when I started this, tried to toggle pin for pin but it was way too slow. Would/could this work with the I2S parallel interface? I wasn't able to find much on the I2S interface when I started this and what I found was above my skillset, but I still like the idea of having a cartridge that has wifi.

Sprite_tm: So if you can do everything XIP, there's a chance you can get it to work.

Sprite_tm: Ah, I saw that. Did something like that on a Vectrex with a CortexM4.

Sophi: Q from @Jarrett : Do you have any tricks for the homegamer to try and tune their antennas for the ESP32-PICO-D4?


Milkey Mouse: Cool, XIP is natively supported by Linux mainline as well as -xtensa, I'm just not sure if it would work in combination with ucLinux no-MMU patches out of the box.

Sprite_tm: Wrt the WiFi GB cartridge: Long story short, I don't thing I2S is the right way to go there.

Davedarko: okay, any right ways?


Sprite_tm says:10:32 AM
DaveDarko: Sophi went a bit too fast, I'll continue answering your Q.

davedarko says:10:33 AM
cool

ɖҿϝիɟթվ says:10:33 AM
this is too exciting

Sprite_tm says:10:33 AM
The issue mostly is that you need to see that a CS line goes low, then immediately read the address lines, look up whatever you want to send back and send it.

Sprite_tm says:10:34 AM
I think that I2S would be too slow for that; you'd have to set up a transaction and everything. I think you could get it to work if you wrote a high-prio interrupt for the CS pin, then in the interrupt handler, in assembly, read the address GPIOs as fast as you can, grab a response from internal memory (which luckily you have more than enough of) and send that to the data pins.

Sprite_tm says:10:35 AM
If you need help with that, poke me; by now I have some experience with high-level interrupts and I'm actually curious if the ESP32 can do it, but don't really have any interesting consoles here.
jay broni has joined this room.10:35 AM

konsgn says:10:36 AM
could you put a small fpga to act as a buffer between the gb and esp32. that might werk too

davedarko says:10:36 AM
I thought "as fast as I can" would be I2S, since there's no way of getting pins parallel

davedarko says:10:36 AM
no "take other chips" please :)

Sprite_tm says:10:37 AM
You might get it to work... but there's a fair amount of setup using the I2S peripheral. It may still be quicker than doing it manually, I agree.

konsgn says:10:37 AM
does the esp32 have enough pinout to connect fully?

ɖҿϝիɟթվ says:10:37 AM
@davedarko you could do it with a 555 ;-)

davedarko says:10:37 AM
almost enough

davedarko says:10:38 AM
I tried it with reading via the registers, but was a full cycle behind

Sprite_tm says:10:39 AM
@davedarko Maybe a good idea to move on to other qs... if there is still time at the end, I'd love to come back to it. For now, feel free to poke me at jeroen at spritesmods period com for this.
curly722 has joined this room.10:39 AM

davedarko says:10:39 AM
yes, was about to say that

@Sprite_tm there are about 10 more questions, can I move on?

haha ok

davedarko says:10:39 AM
thanks a lot!

Sprite_tm says:10:39 AM
GMTA :P

Do you have any tricks for the homegamer to try and tune their antennas for the ESP32-PICO-D4?

from @Jarrett

1rabbit says:10:40 AM
what kind of range should i expect from ESP-NOW in urban conditions

let's move fast for a bit. @Jarrett someone else responded to your q in the comments too

@1rabbit all questions go in the comments here: https://hackaday.io/event/69323-esp-everything-chat-with-sprite-tm

1rabbit says:10:41 AM
i have not been impressed by the range from my tests at home, iirc its supposed to be stronger than regular wifi, is there options to consolidate the transmission

and a question from @billybob : Q: I want to shove an esp in to my fpv goggles, but I am pretty sure it will interfere with video quality. The video comes in at 5.8ghz. It shouldn't interfere, but I can't help wonder if a small transmitter inside the goggle enclosure would have negative effects.

1rabbit says:10:41 AM
allright thanks

Sprite_tm says:10:41 AM
Ah, yes. I have no idea. Antenna tuning is Deeper Friggin' Magic, as is all RF things. I've been watching the RF team here, and they seem to be able to go without sacrificing goats... so I think the one advice I have for the homegamer is that I have no clue, but that sacrificing goats does not seem to be an essential part of the ritual.

Discussions