colorchord icon indicating copy to clipboard operation
colorchord copied to clipboard

Embedded 8266 - setup overview & performance/mic issue

Open Ojsh opened this issue 8 years ago • 20 comments

Hi Charles - wondering if you might be able to assist troubleshooting:

  • environment setup via following on fresh install of ubuntu 16.04.1

https://gist.github.com/con-f-use/d086ca941c2c80fbde6d8996b8a50761

  • also:

apt-get install libpulse-dev libasound2-dev libx11-dev libxext-dev libxinerama-dev libusb-1.0-0-dev

  • added entry to /etc/bash.bashrc:

export ESP_ROOT='~/esp8266/esp-open-sdk'

  • update user.cfg reference for SDK to be esp_iot_sdk_v1.5.0 (rather than 1.5.2)
  • ran following with 3.3V usb-serial adaptor connected to esp:
  • embedded8266$ make all
  • embedded8266$ make burn
  • embedded8266$ make burnweb
  • (did receive an error on above "fatal: bad revision 'HEAD'" - related to git i think - but does compile & write)
  • 12kOhm pullup on electret microphone to 3.3V source, gives reasonably stable 0.5V DC offset at ADC, with range of say 0.4-0.6V or more when blowing into mic (reading from DMM only)
  • No response on physical ws2812b LED string when fed with esp Rx as data line
  • Can view responsive soundwave on oscilliscope at websockets page http://192.168.4.1/ but no data coming up in DFT, LEDs, or Notes sections.......?
  • have i missed something obvious here... everything otherwise seems to have gone well with environment setup & writing to chip! Do i need to run make in any other areas, or set some additional parameters in colorchord config files?

Initial response to above received via youtube, where original comment was posted - CNLohr: You probably need to select the "Parameters" tab, and then click "Restore" and "Save"


This seems to have worked - after Restore & Save in parameters section, can now view responsive DFT chart, and Notes sections of webpage.

However, still having issues getting correct operation - symptoms are:

  • with all webpage sections closed, 'System' runs at ~200Hz. With either Oscilliscope or DFT open, willdrop tobetween 15-40Hz..... (later improved when running in Windows web browser instead of ubuntu)
  • can get Notes to register & ws2812 LED string to light up, but only by blowing directly into microphone to overload with white noise. Whistling a stable loud tone directly next to microphone doesn't seem to produce a large enough waveform to come up with anything in DFT... maybe needs amp on the microphone, however believe should also be possible to get good functionality without...

Ojsh avatar Aug 25 '16 10:08 Ojsh

  1. Try humming into microphone instead of whistling. You may be whistling outside of the frequency range.
  2. Take screenshot of oscilloscope (And DFT if possible) while humming into microphone.

cnlohr avatar Aug 25 '16 13:08 cnlohr

Good point Re: whistling range... Have now had some success:

  • humming loudly very close to mic, can sometimes get enough signal to register notes. 1 - loud hum
  • singing with open mouth directly into mic like it's about to be eaten, quite easy to hold different colour outputs, and cycle through range 2 - direct sing
  • mic inside guitar, works well for lower octaves, high end doesn't register so well 3 - in guitar

Might just be a case of trying different microphone setups to increase sensitivity, or different electret model

Ojsh avatar Aug 27 '16 12:08 Ojsh

I don't really understand what's wrong (sorry for the long time to post)

cnlohr avatar Sep 02 '16 07:09 cnlohr

Had just tried today with amplified electret (https://www.adafruit.com/product/1063) + voltage divider on output - increases sensitivity so easier to register notes now

Ojsh avatar Sep 02 '16 10:09 Ojsh

would be cool to find out the results, especially if it's less noisy.

cnlohr avatar Sep 03 '16 17:09 cnlohr

I'm using an electret with an amplifier based on the MAX9812 chip. I've wired the output directly to the A0 pin. It seems to work ok, but only if the microphone is pretty close to the speakers playing the audio (within a foot), and the speakers are turned up pretty loud. What values are you using on the voltage divider?

jerryr avatar Nov 30 '16 15:11 jerryr

I don't use a divider. If you're already using the MAX9812 chip, I'm surprised you can't coax it a little louder. I will admit, when it's just the electret, you do have to get in its face, or put it in the sax :-p. If you are trying to do something with speakers instead of an instrument, you may need to just pipe the audio in electrically.

cnlohr avatar Nov 30 '16 15:11 cnlohr

I'm trying to avoid wiring it to the sound because the lights are way across the room from the music. I'll try sticking an audio amp between the mic and the esp8266.

jerryr avatar Dec 01 '16 01:12 jerryr

Hi. I have been lurking here for a while, at first I was not that interested in the LED part, but have gotten lost in constructing Red Green style infinity mirror blinkin' LED ideas for colorchord..

I have many esp8266 with colorchord on them, and really need to do an inventory.

Having followed a simmilar path as yours to concerns about the microphone in open environments ,I have made a little board wih the adafruit AGC form factor, but with a one transistor circuit for electret and dynamic microphone styled from www.eleccircuit.com .

here is a fuzzy image of the two BLIT's (Blinkin LED Internet Trinket) backsides. my_photo-2 and in front

screenshot at 2016-12-14 16 28 53

I have just received 5 Wemos D1 pro and want to build a ColorCordQuartet. Perry

pjmole avatar Dec 14 '16 17:12 pjmole

@pjmole this is insanely cool. Please, please post videos, schematics, everything. I would super duper appreciate it!!! I would love to see the setup!

cnlohr avatar Dec 18 '16 21:12 cnlohr

I am attempting to finish this 60 LED model today.

screenshot at 2016-12-21 10 00 05

I am trying to complete 4 BLIT's by Christmass, The inifinity mirror part is the most time consuming for me, I set them all up in the morning and try to complete some of them. Two smaller ones seem robust enough, but I have a small and large one I hope to complete. Perry

pjmole avatar Dec 21 '16 15:12 pjmole

Oh my gosh you seriously need to youtube this stuff.

cnlohr avatar Dec 22 '16 07:12 cnlohr

ColorChordQuartet video

ccx4.zip 2016-12-23 08 51 46

I thought the quartet was ready to-night but one seemed out of tune. Upon further investigation the Arduarggh has an inverterted wavaform compared to the others. Now starting to gather parts for last microphone board of my hackboard.

Oops, Unpon further thought I decided one needs a non inverting amplifier and discovered the common-base amplifier driven by a speaker instead of an electret. Also uses fewer parts, will try this soon.

pjmole avatar Dec 23 '16 01:12 pjmole

I have built a few WEMOS models . They have a resistor divider protecting the ADC, so I removed one SMD resistor and jumpered the esp8266 chip to the external pin.

Yesterday I built this "One LED Wonder" on a breadboard

whoooo_at 2017-01-06 15 28 05

Also I placed a 100K on the breadboard to pull up the ADC input voltage.

and a picture of blinking one. one_led_miroors

pjmole avatar Jan 06 '17 20:01 pjmole

Man your guys waves look so much better than mine! @pjmole would you be upset if I lifted your frontend?

cnlohr avatar Jan 09 '17 05:01 cnlohr

That schematic is all over the place in various forms. Feel free to use it. The circiruit is pretty forgiving in values so it's easy to build with odd parts.For me these BLIT's are an exercise in recovering long atrophied electrical hardware skills. I would like to pursue other input devices , say bat detectors and thump dectectors.

What I wish to pursure is the management of multiple Colorchords, in unision to paint ghostly apparitions into some WEBGL. I will open up another ISSUE after playing with your code some more.

pjmole avatar Jan 10 '17 02:01 pjmole

Remember, there is a POSIX-friendly version of ColorChord located in the 'colorchord2' folder if you're thinking about running more sophisticated things in Linux or anything.

cnlohr avatar Jan 10 '17 18:01 cnlohr

@pjmole

Yesterday I built this "One LED Wonder" on a breadboard

Hope you will still find this comment after 24 months or so... I cannot find any piezo microphone in a package similar to what is on your picture. Will the schematics work also with a regular, electret microphone?

sanchosk avatar Jan 19 '19 20:01 sanchosk

That circuit should work with any functioning piezo microphone.

I have been using the CJMCU-9812 with my quad microphone experiments. Now trying new MEMS microphone board as a replacement. much more expensive, but claims better S/N. 20181225_090708_hdr

and for quad systems you want the better acoustic matching recievers

pjmole avatar Jan 21 '19 02:01 pjmole

You should be able to use just about anything provided it can get the signal in the range of 0..1V and it can be about the right volume. Using resistor dividers, shifters, etc. It should work out. I do recommend using the oscilloscope feature in the ESP8266 to see if your signal comes through clearly.

cnlohr avatar Jan 27 '19 00:01 cnlohr