A presentable voice assistant satellite

Spent some time on the ESPHome Discord server tonight, getting my new build to compile successfully. Mega-THANKS to @robgough1970 for his extremely kind assistance resolving my ESP32-S3 build issues. My build is slightly different, using this ESP32-S3 Development Board. My reasons for using this particular board:

  • Pin headers are not pre-installed, allowing direct wire connections
  • Newer S3 revision of ESP32 processor
  • 8191 KB of PSRAM

These are the (current) YAML updates necessary to get this board working:

esphome:
  name:          'VA001'
  friendly_name: 'Voice Assistant 001'
  platformio_options:
    board_build.flash_mode: dio

psram:
  mode:  octal
  speed: 80MHz

esp32:
  board:   esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type:  esp-idf
    components:
      - name:    esphome_board
        source:  github://jesserockz/esphome-esp-adf-board@main
        refresh: 0s
    sdkconfig_options:
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
      CONFIG_ESP32S3_DATA_CACHE_64KB:      "y"
      CONFIG_ESP32S3_DATA_CACHE_LINE_64B:  "y"
      CONFIG_AUDIO_BOARD_CUSTOM:           "y"
4 Likes

Very cool, definitly a worthy contender

Current pictures donā€™t give enough visibility to all the wire connection. Any chance youā€™ll post better picture that could be used by others to re-create this, along with the esp code or links that give some insight into what is required to get this going?

The build video I posted has links to everything.
For the picture here, just open them in a new tab and view full size.

ESP32 (WROOM-32) MAX98357A (Speaker) I2S Microphone
GPIO33 DIN -
GPIO12 LRCLK -
GPIO13 BCLK -
GPIO34 - SD
GPIO25 - WS
GPIO26 - SCK
3.3V VDD VDD
GND GND GND
2 Likes

Thanks. Somehow it seems I didnā€™t click on the first video when I ran through this thread. For others that might be as slow as me, the details are with the video over on the youtube site.

Hey, I tested some parts from your yaml in my voice setup and I have a lot of voice_assist_thinking_phase_id events. Do you also have constantly flashing LEDs? Next to TV, this is not niceā€¦
But itā€™s a really great idea to do it your way and define the states and use same Lambda for all, instead of my previous way to declare each individually. I might steal this for my project. :face_with_hand_over_mouth:
Where do you got the enum from? Is it a list or from esphome repository?

I cant take credit for the code. I linked to that guy in the build video description.

Is all of the other code the same?

Pretty much the same YAML, no functional changes whatsoever. I added substitution values for all of the GPIO pin assignments, moving them all up to the top. I added comment lines to most sections of the YAML, including the parts links you provided. Two external links that helped me decide the GPIO assignments and better understand the I2S code and wiring are:

I still have to work on a static/buzz problem. :frowning: After getting the ESPHome YAML to successfully compile, I left the speaker powered on all night to burn in. When I woke, it was making noise. :frowning: I plan to spend most of the day tomorrow trying to resolve that issue. It might be the power supply, but right now thatā€™s a powered USB 3.0 hub which has been reliably in use for months. I think itā€™s more likely a loose Wago connection or too long wiring picking up interference.

Yes, I compared ā€œyoursā€ and mine, besides the triggers, itā€™s the same. For example:
Iā€™m using on_wake_word_detected and on_listening and on_stt_vad_end events to trigger the LEDs. But in the code it used the response codes. So this could be nicer way to get less false led.
I couldnā€™t find a list which explains what is behind id(voice_assistant_phase)ā€¦ Iā€™m actually just interested in:
After wake word detected: scan
When progressing: slow pulse blue
When ok: pulse green
When error: pulse red
Your approach looks better, but I have light voice_assist_thinking_phase_id almost all the time while watching TV.

Maybe tomorrow Iā€™m done cleaning up my code and can show you. :sweat_smile: Itā€™s a big mess at the moment while working on status LEDs for presence detection and air quality.

Strange behavior. Double checked wiring, all connections good, amp board is definitely working, but yielding static. Bottom RGB LED is lighting dimly while static plays. Set logging level to VERBOSE, and VA logic is running as expected, setting LED status and waiting for VAD voice activation from the microphone. Iā€™ll probably disconnect the amp while testing the microphone for proper operation, just to maintain some sanity.

@Rich37804 - A dumb question for you. Do you have GPIO18 directly connected to the center wire of the LED strip? Thatā€™s what I have and Iā€™m not absolutely certain about that.

Yes, directly connected.
LEDā€™s act funny when something is amiss somewhere else.
I do have the positive/negative directly connected to the source power.

Thank you! Everything sources power from the Onn speaker USB power board at two common connection points (5VDC and GND). Iā€™m guessing it might need a filter capacitor somewhere. Just have to try different things today, and hope something cures it.

EDIT: Found two problems that pretty much explained many of the issues. First, the GROUND connection on the INM441 I2S microphone had broken loose at the back of the microphone board. One of the hazards of shrink-wrapping the connections. Also found a wiring issue (canā€™t remember which lead it was at the moment) on the LED strip. The wire had not made a solid connection in the Wago lever-nut. Finally, I had not updated the ESPHome YAML to tell it there were three (3) LEDs in the string. After correcting the connections and LED code, the Voice Assistant is initializing much better. Ran into problems re-wiring the microphone, but thatā€™s getting worked right now. Should have wake word recognition later tonightā€¦

Well, the LEDs are working as expected now, and WOW is the initial white setting BRIGHT. :sunglasses: Still appear to have a microphone issue, but decided not to troubleshoot it tonight.

1 Like

i have the same issue with static. The interesting thing is when i first plug the unit into a wall socket i get static. When i say the wake word the static disappears completely and seemingly does not come back. Anytime the unit reboots though the static reappears until again i say the wake word. IF anyone has a solution for this please let me know. I have to admit this little project is no Alexa but it isnā€™t bad at all. Sure does beat the Atom Echo. I used the code that JLo worked on in his demo BTW and configured the same GPIO pins.

Change the data out pin for the audio.

I was using two GPIO pins immediately adjacent to each other, and the static was worse. I moved it to another pin five spots away, and while itā€™s not as bad, itā€™s still an issue. I finally pulled the DIN pin from the amp, and itā€™s STILL growling out loud. :astonished: Definitely going to place a capacitor across the VCC and GND pins, just as soon as they arrive.

EDIT: It seems the length of the power wiring to the amplifier (creating resistance) could be a factor in noise from this amp.

I have a 3" lead to the amp from the speaker power board if that helps.

It does! :slight_smile: Thank you. My power wires are longer than six inches, supplying all of the ESP32, the amplifier, the microphone, and the LEDs. Iā€™ll shorten those this evening, and see how much it may help. It might also help to use larger gauge stranded wire to minimize the resistance.

EDIT: Shortened the leads down to three inches, applied a tank capacitor across Vcc and GND, noise is lessened somewhat. However, what Iā€™m now seeing is, the noise is being picked up by the amplifier board. Whether itā€™s RF/Wifi from the ESP32, or from my iPhone, or even if I pass my hand over/around the amp board, it makes noise. I wonder if the Adafruit boards are any more quiet?

Sounds more like a ground loop issueā€¦
What is the power source?

Do you mind sharing your yaml?
I just got the same boards you got for testingā€¦