ESP32 Proffieboard

Impedance matching sounds like what I’m thinking of. 2.4ghz would be super short wavelength, right? Hence the difference in the length of the antenna is trivial, because it will always be close to a multiple of the wavelength? Am I getting that right?

2.4Ghz is on the lower part of the millimetric band. It’s 125mm or 5" for your customary units. Small for big antennas, but pretty big for a saber.
Regardless, how important is the antenna? Why do chip antenna require a coaxil antenna? I think that keeping it as a separate module would be much easier for saber installs. Proffies are usually hidden behind 2mm of aluminum and many hilts are, effectively, a Faraday cage.
So being able to have it as an option and, if so, being able to position a small module in a more accessible part, would be great.

2 Likes

But now that I think of it, Cat 6 twisted pair could work for “small” distances, like 15cm? If so, a chip antenna could be position anywhere.

Chip antennas are not special, they are just small antennas.
Generally, you use coaxial cables to connect antennas to things, because coaxial cables have simple behaviors. If you use something else, the impedance is variable, and you need to tune your components to take that into account.

At high frequencies (like 2.5Ghz) resistance/impedence is much more affected by surrounding components, and any nearby conductors will have an effect. Coaxial cables makes this simply by surrounding the signal with a ground layer at a specific and known distance, which means that at a given frequency, you will know exactly what impedence you get from the cable. Impedance is a measurement that assumes an INFINITELY long cable, so the length of the cable doesn’t matter. The assumption is that the antenna at the end of the cable will have the same impedance as the cable (or a matching circuit) and so the total impedance ends up being the same as if the cable was infinitely long.

To make things more complex (pun intended) impedance at high frequencies are complex numbers. The resistance/inductance/capacitance of the components will not only be reduced in volume, but they are shifted in phase as well. Reducing phase shift is important, otherwise the receiver will not be able to decode the sent signal. My understanding is that an ideal antenna circuit has a phase shift near zero at the specified frequency.

Lots of people have already put bluetooth modules in their sabers, and for the most part, that seems to work even through a bunch of aluminum somehow.

I wonder if there is a super-small antenna that can be fitted directly into the coaxial slot?
If there was, then the board could be shipped with such an antenna, but it could be moved, extended or replaced with a different antenna and/or a coaxial cable.

If it doesn’t exist, maybe I should just make a tiny separate board with a coaxial connector and chip antenna on it?

1 Like

Twisted pair is better suited for lower frequencies I think, like 250-600Mhz

Maybe the requirement is that you have to take off the end cap for the Wi-Fi to work? only a small PIA but I would not have to remove the rest of the guts…

That would be fine if it’s just going to be used for programming the board, but I think if we wanted to somehow use the wireless feature for some kind of gaming purpose we’d probably want really good reception with everything fully assembled.

Interesting point.
I haven’t even really figured out what the wifi capabilities would be used for yet, other than:

  1. programming
  2. font uploading
  3. proffieOS workbench
  4. Possibly some sort of remote audio

Yeah, honestly I’m not sure how a pb saber could be used as a gaming periphreal, other than for some kind of geocache/orienteering game, or as a motion controller for some sort of AR. The former would be pretty tractable to develop a simple game for, as it would only need location and orientation of the saber, but the latter would likely be a ton of work, and require additional periphrials like a quest or something. Beyond those two examples though, I only have a vague notion that allowing the saber to communicate over wifi, presumably with a range of a couple dozen feet, would open up the doors to more possiblilites, and allow folks to get creative. Hell, Disney might even figure out some way to make rides or attractions respond dynamically depending on how many light side or dark side sabers there are in a room (pure imagination here).

Main point is that if the capability exists, I’m reasonably confident SOMEONE will figure out how to do something cool with it. The better the tools get, the cooler the stuff that can be made with them. IMHO.

The ESP32 requires a matching network, unless you design the antenna to be specifically matched. You could probably do something like that in Ansys HFSS, but it is hard to do. Most of the time it is easier to have matching network to something like 50ohms, 75, ect.

Also, a PCB antenna should be on a outside layer, so you can manually tune the antenna. One way to do this is use copper tape on the prototype, before you finalize the design. You adjust the length until you get the best range or signal strength. Another reason, to put it on the outside, is someone can cut it and add their own antenna.

A chip/ceramic antenna is the easiest to connect, since they are not as sensitive to parts around them, but they also do not works as well as other solutions.

My primary concern is space on the board, but of course I also want it to work well.
I think my current plan is to use the chip antenna I linked above. It’ small and designed to sit above a ground layer, which means that I should be able to use the space on the bottom for single-sided solder pads. I haven’t tried it yet, but I think this antenna could sit in the corner of the proffieboard, right next to the USB connector.

From what I’m reading online, a matching network is always recommended, and the proper way to choose the component values for the matching network is to find someone with the right tools to simulate and/or measure it for you.

My experience with esp32 chips is that even with the proper PCB antenna, and without anything in the way, reception is still not very good. If your wifi router is in the next room, it might not work very well. With that in might, I figure that using BLE and AP mode might be the best way to use the wireless capabilities, as point-to-point access can be more up close and personal.

1 Like

would this also mean txt file configs and styles? and reading of other files? because that would be amazballs… so you dont need to flash it every time you want to change something?

no, that’s not what that means.

ESP32-S3 seems to have a perfectly useful jtag debugger built into the chip which can be accessed from the builtin USB port. No need for external debugger pads!

The more I use the ESP32-S3, the more I like it. At least so far. :slight_smile:

2 Likes

ProffieOS now supports neopixels, sd cards and cycle counting.
That basically just leaves sound… :slight_smile:

Edit: and motion, I almost forgot motion…

3 Likes

Looks like a job for 3d printers… You could make all sorts of special connecters. but I am a fan of KISS and KICK… Keep It Simple Silly and Keep It Cheap Kitten… I only car that we can keep it small.

1 Like

These are great convo’s plus the attenae can always be hidden as a greeblie. art meets functionality, right?

Ok, so most of the sound code is written, but now it gets a bit complicated…
I haven’t figured out exactly how to do software interrupts, which I normally use in ProffieOS to do all the audio reading. The software interrupts puts them at a higher priority than the base code, but lower than the hardware interrupts, which have very tight timing requirements.

There are alternatives though, because the ESP32S3 chip has two cores. I could start a task on the second core for doing all the audio reading. This would also mean that even if we spend 100% of our time reading from the SD card, we still have time for everything else, which would be a nice bonus.

The problem is that I can’t figure out how to synchronize the memory between the two cores. So if I read data on CORE1, then access it on CORE0, it might not all be there, because it’s stuck in a cache somewhere. Without using the right synchronization instructions, there are no guarantees.

Now, I suppose I could take it one step futher and also moves the code that reads the data to the second core, but then I still have the same synchronization problem every time I want to start or end a sound.

Anyways, maybe I’ll figure it out tomorrow…

6 Likes

Ok, so the sound is working-ish.
It doesn’t sound good, and there are lots of buffer underflows.
Could be power and wiring issues since it’s all running on a solderless breadboard.

Hmm, SD speed is weird on esp32. According to the sdtest histogram, many block reads take less than 50us to complete, which is really really fast, while others take up to ~3ms, which is really slow.

Ok, motion also works now, but complaints a lot about timeouts.
So now everything works… poorly.
The hard part is that I don’t know what’s causing it to work poorly.
It could be hardware or software, and for the software, it could be bad arduino libraries, or it could be problems in my code…