My cool mesmerizer beside another cool project! #649
Replies: 5 comments 5 replies
-
Cool stuff, Harrie! Thanx for sharing your work and helping the project look alive! These look great. This is actually kind of a common lull in open source projects. It does what the creator needed/wanted it to do, but there's not quite been a critical mass of devs coming on board wanting to do different things - and backing it with actual pull requests to do those things. I've seen projects both starve (never gets those additional devs) and suffocate (crushed by an onslaught of contributions where nobody can build/test/guide the whole project) at this stage. This is actually common in small companies, too... FWIW, I haven't stopped work on NightDriverLED; it's just been in the "under the hood" things that (I like to think that) I'm good at and less on splashy things. Most of what I've been working on hasn't been submitted back to the mainline because trunk wanted some quiet time to prepare for some 1.x releases and I've been working on things not interesting to most people. I've recently had a thoroughly mentally defeating battle with hexagonal geometry (even WITH https://www.redblobgames.com/grids/hexagons/) in an attempt to awesomeize the Hexaputer panels. I have my head around how to build an XY map that treats them enough like a grid to run many of our existing effects, but it seems wrong to run a hex with 60 degree offset pixels like a rectangular grid that happens to be lopped off at the edges. TBF, some of the abstract patterns actually look OK, but they just don't look very hexy. Geometry/math nerds reading this that want to partner up, buzz me! I've been working with the creator of https://github.com/ale1800/YULC as he was working on a board that was almost one I was going to create, only he's actually qualified to build it, so we teamed up a little. All that ugly "what gauge of wire should I used for the barrel connector" stuff gets replaced by "attach USB-C power supply here". There are some interesting things (I think) that I've implemented/am implementing in ND to support this kind of advanced controller hardware, but we run into some architectural walls here and there that I've been trying to knock down. It's really hard to recommend NightDriver as a default firmware when you have to recompile to change the number of LEDs, color order, or LED type, for example. This season, the whole ESP32-blinkyverse is kind of a mess. PlatformIO and Espressif are no longer playing nice, so it's gone beyond PlatformIO not doing new work, they're not even clicking "accept" on community-authored fixes and development, so that project is falling behind for new chip and board hardware - and we depend on it. (If you like your 2016 ESP32-nothings, you can keep your ESP32-nothings, but things like Matter aren't in motion.) Worse, the Espressif-Arduino32 3.0 library broke most every blinky project out there (Makuna, NeoPixelbus, FastLED (which we use) , Adafruit, etc.) in some pretty serious ways (we're pinned back, so this only prevents us from going forward), so the Arduino/Espressif 3.0 situation is just bad. It's bad enough that there's basically been a community-created fork just to try to get developers working while the two commercial entities are holding things up. If you're craving different (disclaimer: "different" vs "better" is in the eye of the beholder - I'm only pitching "different"!) blinkies on your Mesmerizer build, there's a branch at https://github.com/PlummersSoftwareLLC/NightDriverStrip/tree/all-robertlipe-effects that contains different effects. It's been a while since I've looked at them. The whole branch SHOULD check out and run. There are 33 effects that were turned on in this branch that, after development, were decided to be insufficently cool to justify space in the firmware/maintenance costs. (If you want my effects AND the others, just comment out the obvious "#else" in that #if 1 block.) They're admittedly not all super-awesome, but your awesome and someone else's awesome might differ. Given a dare and a beer, I could be convinced to submit a PR that updated that PR with the trunk and whacked that #else so that branch could be the union of trunk + my dumb effects that didn't land. If I believe the web interface, it should be easy, but I'm skeptical. (Not my first rodeo...) But I suspect that you have enough Mesmerizer builds - and the skills to figure out how to copy-paste lines in that file - that you can make your very own "Harrie's Favorite Effects" builds, even if it's "robert's effects" on this one and "dave's effects" on that one. No mean comparisons either way, please! But if there's one or two effects that you think are super awesome that you think the world shouldn't be denied (by default) you might be able to plea your case with the others. I'll help do the slugwork to upgrade. One of my near-tearm projects is adding audio (Analog MAX4466? I2S INPM441?) support to the YULC fork of ND, so adding a Spectrum build to that fork is probably on my list. Given what I (think I) know about the A/D converters on ESP32 (thought the ones on S3 are less terrible) I may just go directly to the I2S as it's only a pin or two more. Have you used both, Harrie? |
Beta Was this translation helpful? Give feedback.
-
Cool. Thanx for the recommendation on mics. Embarrassingly, I think I have
several of each of the choices in my parts drawers, so it's just a matter
of laying down a dash of metal and hooking up representative code.
include/analyzer.h doesn't seem to be particularly welcoming to just
hooking up arbitrary microphones to arbitrary ESP32's (this will be an S3
and in configuration with a SOMETHING on pin SOMETHING and not a canned M5
configuration.) so I'll probably try to build up a hardware configuration
that lands in the #if ! M5| MESMERIZER| TTGO path and see if the S3's I2S
is close enough that it'll work with the given IDF driver... and if not ,
make it so, I suppose. :-)
As a sidebar, I hate globals.h more every week. Best I can figure,
INPUT_PIN is used for both Analog and I2S input and if you're using I2S the
clock pin is just divined by the gods, but after all the hoop-jumping to
set it, INPUT_PIN os only ever really used in the ELECROW... which I know
isn't right or your Spectrum build wouldn't work and I KNOW that Mesmerizer
works, so I have an existence proof that there's more to this than meets
the eye. Where the heck are the serial and LR clock pins defined for an I2S
mic? I've spent nearly a year inside this code now and still hate working
this kind of thing out. You and I had even poked this bear a little bit
back in #592. In Scott's example, he has:
#define <https://www.youtube.com/hashtag/define> I2S_WS 26 // aka LRCL
#define <https://www.youtube.com/hashtag/define> I2S_SD 18 // aka DOUT
#define <https://www.youtube.com/hashtag/define> I2S_SCK 22 // aka BCLK
...yet I only really see us configuring one pin in globals. Where are the
others? I don't really expect you to answer that - I'll tear in
preprocessor output and/or a debugger and figure it out.
Bugreport to my sidebar: I was 20 minutes into a WTF analysis of
soundanalyzer
<https://github.com/PlummersSoftwareLLC/NightDriverStrip/blob/411d9cdcff053a662a923fd2466a703dc44095ac/include/soundanalyzer.h#L559>.h
and tried to figure out the difference between TTGO || MESMERIZER ||
SPECTRUM_WROVER_KIT and "everything else" case. See if you can spot it with
your eyes. Now convince me that the difference is intentional and the
reason that block exists at all! :-)
all the projects that the code can drive.
This isn't that board. It really only makes sense for the USE_281X class of
builds. All that cleverness about buck and boost converters is super nice
if you're trying to drive a 12V strip with a 5V power supply (yes, really!)
but it's dead electronics if you're buildig a HUB75.
I thought a time or two about building a all-blinky board that accepted
something like a YD-ESP32-S3 board (much like you used Wemos in yours) and
brought out a bunch of pins to buffers and a HUB75 AND a couple of pins,
also through buffers, out to 2-8 channels of WS281x. (Arguably, the buffers
aren't NEEDED for hobbyist stuff that's a few inches away, but for
permanent installations, it just makes sense - and it protects the exposed
pins on the boards from an accidental short or voltage excess. HUB75
connectors aren't cheap. Screw terminals aren't cheap. (I"m guessing
they're the most expensive thing on your board.) "Well, lay traces for the
74LS245 and just route some pins out to pads for JST connectors and some to
the HUB75 socket and just don't plug both up." Legit. But power is a
different problem for the two types of displays and now you have boards
that are either half-unused or that you chose to leave half unpopulated.
(Parts not soldered down.) It kind of took the innocence of "I know this is
a $3 project" and turned it into a $15 project (all numbers made up, but in
USD and small numbers.) While it's tempting to have a handful of those
superboards for development and testing, I've just kind of settled on
having a bunch of ESP32 boards and quickly hooking them up to whatever I'm
knocking up that day. I've long liked the YD-ESP32-S3 but they're pretty
serious overkill and just sockets for the dumb part cost almost as much as
the boards do. (I learned the need for this after building up a PCB for a
friend...and then blowing up the ESP32 - and finding the PCB
self-destructed when desoldered, which meant I basically had to replace
everything but the terminals.) I'd started using the "SuperMini" S3 form
factor boards for some projects just because I rarely NEED 30+ GPIO pins
and the 44-pin boards were a pain.
I've just concluded that HUB75 projects - like yours, Mesmerizer, Trinity,
Matrix-S3, etc. and Strip projects are just different projects. We leave
probably 20% of that strip market untouched - people just don't ask us much
about APA102, RGBWW, WS2815 (annoyingly different timing), and others. IMO,
that's at least somewhat because of globals.h. The entry ticket to build
any strip project with NightDriver is high enough that either people can do
it themselves or they just use something else. Within the strip market, the
folks building inside projects on the bench with nice, tame, electrical
needs served by a few cm of wire are different than the folks trying to run
16 different effects on 16 different pins that are doing this in a
waterproof box outside. That's another niche we can't serve well - multiple
effects on different pins requires source changes for us.
This comes from a personal conversation you and I once had, Harrie, but
since it might benefit other people in this space, I'll mention that
someone has FINALLY built a prototyping board that I was afraid I was going
to have to build myself. Companies are now (finally, four years later)
building 44-pin versions of the breakout boards. I can't remember if these
are the EXACT units I bought (and these aren't referral links) but as
examples, see:
https://www.aliexpress.us/item/3256806647138933.html (I'm 95% this is the
same board, but not necessarily the same store) and
https://www.aliexpress.us/item/3256805693341149.html (screw terminals, but
with the note that it "only works with their boards" ?!?!)
I keep boards like those in my lab where I can easily attach a big-boy
power supply, break out to JST connectors, quickly DuPont up IR or other
quirky inputs, rip boards in and out to flip between Brand X firmware and
NightDriver, and still have pins to easily attach a logic analyzer and/or
scope is awesome. Now that I'm typing this, I see one that adds screw
terminals and LEDs, though. I may have to give them (yet) more money. Even
if it's somehow special and is designed only for their own boards, I can
cut a few pins if needed.. I'd written FreeNove a few months ago and asked
them to build this board - they've had a 38 for a while - so while I got
no response, I'll admit this is about exactly what I asked for. I have the
(LED-Free) versions of those first boards mounted with a bunch of JST
connectors, jacks for 5521/5525 supplies, power connectors on Wagos, and
permanent VA meter so I'm less likely to plug my 5V strips into 24V
supplies, etc. I'm all about building better test fixtures to help myself.
I have another matrix with a gif player.
Dave added GIF support earlier this year. (I remember because I helped
chase down a particularly gnarly bug.). It's built in for Mesmerizer, but
I'd bet we could make it work for the rectangular WS2812 configurations.
Maybe Nyancat would look OK on a Spectrum's 1x3 geometry, but a 32x32
WS2812 could probably display many of the GIFs recognizably. With 1024Px,
that's the outer edge of what you'd want on a single WS bus, but we could
make that work if you're interested in that kind of a thing. IMO,
Hub75/Mesmerizer is just a better match for GIF, but I think we have all
the right plumbing to do it for USE_WS281X, too.
My project for the day (days?) is adding a voltmeter (of sorts) to
Nightdriver so we can read a blown fuse. I have no idea how to present that
in the web interface yet, but once I get the bulk of it in place, I think
it'll all speak to me. (OR maybe it won't and I'll just let people read the
telnet/serial debug logs. :-) With voltage, levels (we can tell if we're
driving a 5, 12, or 24V strip) we could probably do something more
meaningful with our current limiter,too, Then it's mic time. Either way, I
get to dive into sections of the ESP tech ref that I've only briefly
skimmed over.
Have a groovy weekend!
…On Sat, Aug 24, 2024 at 5:00 AM Harke Bosgraaf ***@***.***> wrote:
This project uses the inpm441 digital microphone (
https://www.youtube.com/watch?v=9PEjvFkdpIE) The analyzer has a nice
response.
The max4466 i have often used in vu meters (led) The max 9814 i now use on
my mesmerizer, this microphone has an automatic gain.
Indeed, it would be nice if there was also a piece of hardware specific to
the nightdriver code. And by that I mean also for all the projects that the
code can drive. Just a power input to which you can put a power source from
e.g. 5 to 24 volts. And various outputs and inputs for the relevant
peripherals. Then it would be a lot easier for many people. But a little
tinkering is also fun robert! There is already a very easy piece of
hardware that is accessible to many to make a mesmerizer (
#571)😉
Am satisfied with my mesmerizer, sure it's nice to have some new effects
added. But is not a must, for me it is mostly fixed on the pongclock and
weather anyway. if I prefer other effects I have another matrix with a gif
player.
Time is most people's enemy. Maybe someday I'll start coming up with a
piece of hardware for the nightdriver code that has multiple inputs and
outputs. But that is time consuming, and then I will also have to try out
all the projects that the code can drive. And not all of the projects have
my interest.
What you've told me many times is that it's open source, people do this
voluntarily and for fun. So if you want to get something done, it will have
to be a collaborative effort. And not everyone is good at everything,
everyone has their own specialties. And together very nice things can be
done.
Happy tinkering! 💪
—
Reply to this email directly, view it on GitHub
<#649 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD34NFQ3BNJTJNAH6EODZTBKUZAVCNFSM6AAAAABNAEEXWKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBTGY4TOOA>
.
You are receiving this because you commented.Message ID:
<PlummersSoftwareLLC/NightDriverStrip/repo-discussions/649/comments/10436978
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
Indeed, that was the code I was looking at earlier and baffled by.
So INPUT_PIN is set in globals.h and therefore somewhat user selectable,
bug the bitclock and word select are hardcoded. ... for elecrow. Where are
they set for, say, MESMERIZER, which is the code just below that.
How are they set for anything else? i2s_set_pin() is called ONLY in the
electrow case. What pins are used? YOUR non-mesmerizer builds, like
Spectrum, aren't on Electrow hardware, are they? Where are your BCK and WS
pins defined/connected?
Maybe I'm missing some key parlance, but I expected to find paths like
if you're using an analog mic, it's in INPUT pin and do Analog stuff.
If you're using an I2S mic, here are at least 3 pins, so do I2S stuff.
and I'm just not seeing that clear distinction. I think a key learning (for
me. I'm slow) is that internally it seems that the ESP32 can internally
<https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/i2s.html#adc-dac-mode>
route analog to I2S, which is awesome, weird, or both. At least it helps
explain why I'm seeing less distinction than I initially reasoned out. But
that's a feature that's only on the 2016-era parts by my understanding of
Espressif's doc on ADC/I2S capabilitieis
<https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32/api-reference/peripherals/i2s.html#i2s-communication-mode>
.
Sure enough, setting USE_AUDIO on an S3 goes splat.
It looks like an analog mic needs to go through this:
https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32s3/api-reference/peripherals/adc_continuous.html
It looks like everything except the ELECROW path through this code uses
this path that's available only on the original chips. Well, M5 uses yet
something completely different. But the ELECROW case is the only one that I
see that tries to run the I2S mic as a full I2S device talking to the I2S
driver so that's probably where the gold lays... and I'll just take the
path of least resistance and #ifdef in yet more special cases for the
hardocded pin numbers since those aren't brought out. (I could be clever
and use the new pin multiplexors and rename the pins externally to the I2S
peripheral, but before the pads, just to be sure that the next person
reading this would NEVER figure it out...)
i think you landed on the right code, Harrie, but it's not "This is
something funky that only Elecrow does", it's "this is a real I2S
microphone". So that's probably how your Mesmerizer-like build is working.
But where are those pins defined if you're building, say Spectrum on a
Heltec? (Where "heltec" is something that I think you have and isn't either
a Mesmerizer or an M5stick or an Elecrow or anything else already defined
in there?
Is there any configuration currently supported that's an analog mic on
anything but legacy ESP32-Nothing? I can't find any code anywhere that's
using the ADC continuous mode
<https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32s3/api-reference/peripherals/adc_continuous.html>
driver which seems like it would be necessary to just keep laying down
packets of waveforms.
Remember when I spoke earlier of collapse? Just a few weeks ago, Dave did
something major in this code and we mentioned that he was probably one of
the few people that could build and test all the pathways through it, and
it's currently looking like we're missing two _other_ paths. (ADC
continuous mode and I2S for anything that isn't Electrow...and pin plumbing
for that, though that's minor.)
It's an interesting aspect of engineering how little threads like this can
turn into projects of their own when pulled.
RJL
…On Sat, Aug 24, 2024 at 12:10 PM Harke Bosgraaf ***@***.***> wrote:
soundanalyzer.h
// i2s pin configuration
const i2s_pin_config_t pin_config = {
.bck_io_num = 39,
.ws_io_num = 38,
.data_out_num = -1, // not used
.data_in_num = INPUT_PIN
};
ESP_ERROR_CHECK( i2s_driver_install(I2S_NUM_0, &i2s_config, 0, NULL) );
ESP_ERROR_CHECK( i2s_set_pin(I2S_NUM_0, &pin_config) );
ESP_ERROR_CHECK( i2s_start(I2S_NUM_0) );
I2S pinout elecrow is this what you where looking for robert?
—
Reply to this email directly, view it on GitHub
<#649 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD333QPITHSUQNWGOV2TZTC5AVAVCNFSM6AAAAABNAEEXWKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBTHA4TCNQ>
.
You are receiving this because you commented.Message ID:
<PlummersSoftwareLLC/NightDriverStrip/repo-discussions/649/comments/10438916
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
Mine lets me down all the time. It was bad BEFORE I started living on all
my meds. I'm a goldfish now.
Looks like I nearly ran you out of the project in that thread exactly by
"typing up a storm". Sorry again. :-) But looking at that whole thread, I
think that three of us were each having a different 75% of the same
conversation.
Interesting that it hits on things we've (very) recently discussed. The key
sentence is " 1 red flag that came up for me was that there is only 1 pin
defined in globals for Elecrow audio. To me that might imply that the chip
was capable of analog audio in. From what I read, that is not possible in
any quality fashion on s3 chips"
So, yeah, it looks like we (at least I - you may have remembered it) just
rediscovered what I clearly read and commented on just a few months ago.
There's only one pin #defined, but there are two more that are just
hardcoded and used.
Elecrow is a brand that sells Other People's Stuff, but mostly LCD screens,
so #if ELECROW is about as helpful as #if ADAFRUIT. So it's likely that
elecrow_mesmerizer refers to an Elecrow LCD SCREEN that's running a
Mesmerizer CONFIGURATION on some kind of a board that's like
a esp32-s3-devkitc-1, but not quite a perfect match or that "magic
incantation" wouldn't need to be spelled out right as it would be in the
system definition. So it seems that someone added a symbol "ELECROW",
presumably meaning to tie it to the LCD but somehow tied THAT definition to
an I2S vs. Analog->I2S internal conversion inside soundanalyzer.h
The value of good names and documentation just can't be understated.
Just to confirm, did you ever get audio of any form running in this project
on the S3? Did you get mics working on S3 in other projects?
I'll report back once I have some tangible progress. I think the answer to
supporting at least some audio on the post-2016 chips is, indeed, tied up
in that very block of code, so it's a good find, even if it's kind of a
weird orphan that's named funny and with some hardcoded stuff. I can't use
exactly that pinout on YULC as those pins, so the internal GPIO Pin MUX may
help put off the day that I have to invent a web/json configurable pin
manager for NightDriver...
…On Sat, Aug 24, 2024 at 1:54 PM Harke Bosgraaf ***@***.***> wrote:
My memory sometimes lets me down robert, but some time ago I was working
on something that I bought multiple microphones for. Just to get it
working. Here is the link: #592
<#592>
If you can read as fast as you type it won't take you much time 😜
Bye the way, i sent you a personal email. But I think you are way too busy
with the night driver code😌
—
Reply to this email directly, view it on GitHub
<#649 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD37FKQQIHTOUAI7LUTDZTDJG3AVCNFSM6AAAAABNAEEXWKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBTHEZTMNI>
.
You are receiving this because you commented.Message ID:
<PlummersSoftwareLLC/NightDriverStrip/repo-discussions/649/comments/10439365
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
Hi, very nice looking projects. Best wishes, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
video_1.mp4
video_2.mp4
video_3.mp4
Currently not much movement on the nightdriver project. My mesmerizer is working well. Stumbled upon something else again that I also thought would be very fun to build. Am still working on the led matrix which I can also use for the spectrum analyzer but also for my new project. Thought might be fun to show that here. Kudos to mark donners, the creator.
Greetz Harrie
Beta Was this translation helpful? Give feedback.
All reactions