Category Archives: Hardware

Wireless classroom conference microphone system – #4

This post is part of a series on designing a wireless microphone system for hybrid online meetings, i.e. with some people present in person and others present online. See also the previous and next post in this series.

I want to design a wireless clip-on “Lapel” microphone based on the LOLIN32 lite board and the INMP441 I2S microphone module (not to be confused with the INMP 411, which has analog output). Given the size of the board (about 25 by 50 mm), an 802040 or possibly an 802540 Lithium Polymer battery would be a nice match. These LiPo cells are 8 mm thick, 20 (or 25) mm wide, and 40 mm long. In a few iterations, I designed a simple enclosure in Fusion360 and 3D printed them.

ESP32 wifi microphone enclosure

ESP32 wifi microphone enclosure

The box has a port in the top for the microphone; on the inside are two rails to keep the ESP32 board in place. The microphone is mounted in a small holder that clips perpendicular onto the antenna-side of the ESP32 board. The micro-USB connector is exposed at the bottom, this allows charging the LiPo battery. I expect that this design will also allow making a docking station for charging multiple microphones at once, for example, using these male micro-USB connectors. The first versions (red and blue) did not have an on-off switch; I added these in the later versions of the design (green, yellow).

The ESP32 wifi microphone enclosure is about 57x28x18 mm in size. For mounting the microphone on a lapel or in the neck of a shirt, I considered 3D printing a clip. However, I know from experience that 3D printing a clip with exactly the right flexibility is not so simple, since that depends on the properties of the filament. The clip would also make the 3D printing and assembly more complex. I think that a magnetic name badge holder will be a good alternative to a clip for mounting the microphone to your clothing; it has the advantage that the microphone can be positioned more flexible, especially for informal clothing such as t-shirts. Using double-sided adhesive tape the magnetic name badge holder can be attached to the recesses at the back of the 3D printed microphone enclosure.

magnetic name badge holder

magnetic name badge holder

Wireless classroom conference microphone system – #3

This post is part of a series on designing a wireless microphone system for hybrid online meetings, i.e. with some people present in person and others present online. See also the previous and next post in this series.

I evaluated various small ESP32 and ESP8266 development boards for use in a clip-on microphone. The requirements are that it should be cheap, it should be small, and it should include a charger circuit for a LiPo battery. The most suitable candidates are the WEMOS D1 mini pro and the WEMOS LOLIN32 lite.

LOLIN32 lite versus D1 mini pro

The first is based on an ESP8266 and the advantage is that it is officially available from the WEMOS store. The second is based on the ESP32, has the advantage of a faster MCU, includes Bluetooth (although I don’t have plans for that at the moment) and is even cheaper (about €2.50, whereas the Wemos D1 pro is about €5.00). The disadvantage of the LOLIN32 lite however is that according to the ESP32 page on Wikipedia it is retired and hence not available through an official WEMOS channel. There are many clones of the LOLIN32 lite board available on AliExpress as LOLIN32 lite or as LOLIN32, however, the quality of these clones may vary.

I removed the battery connector from the WEMOS board (that is on the right in the photo) to reduce the height. Furthermore, using a Dremel tool I made a small indentation in the board: this allows passing the wires from the battery cables. Both boards feature a JST-PH-2.0 battery connector that points along the axis of the board in the same direction as the micro-USB. This arrangement of the connectors makes it impossible to plug in a battery, while at the same time having the micro-USB connector flush to the side of an enclosure. To keep the assembly as simple as possible, I want external access to the USB connector for charging, so instead of using the battery connector, I will solder the wires from the battery straight onto the board. The JST-PH-2.0 connector comes off easily with a pair of pliers and a little force.

Continue reading

Wireless classroom conference microphone system – #2

This post is part of a series on designing a wireless microphone system for hybrid online meetings, i.e. with some people present in person and others present online. See also the previous and next post in this series.

Pondering about wireless microphones for a classroom or for a larger scale conference/meeting room, I identified some requirements:

  • it has scale to a classroom with 20 or 30 attendees
  • it has to be cheap per microphone, rather in the range of €10 than €100
  • it has to be simple to use, as there is no sound technician to control a mixing console
  • it has to integrate with online meeting software as if it were a regular micophone
  • it has to be portable, so that I can take it to any class or meeting room
  • it has to be DIY and easy to build with already available components

Imagine that you would have a number of rechargeable clip-on microphones that all transmit their audio wirelessly to a single base station. The base station could also act as a charging station, i.e. when not in use the microphones would be docked in it. The base station would be connected to the central laptop/computer as if it is a single external microphone. Bluetooth lapel microphones exist, but Bluetooth does not allow connecting a lot of microphones to the same computer. Proprietary radio systems such as used by audio companies like Sennheiser are not DIY friendly. There are easy to use RF modules, but those are more suited for IoT applications and not streaming audio. This actually sounds like an ideal application for a 5G device-to-device network, but components for those are not easily available yet.

Continue reading

Wireless classroom conference microphone system – #1

This post is part of a series on designing a wireless microphone system for hybrid online meetings, i.e. with some people present in person and others present online. See also the next post in this series.

Update 22 November 2020 – I split the original post into two pieces to make it easier to follow up and added some information about commercial solutions.

I was chatting with my daughter about the challenges of doing hybrid Zoom or Teams meetings. She was not allowed to go to school for a few days and had to follow lessons online, with the teacher and most students in the class. And I was still stuck in my attic, organizing my own university teaching and meetings remotely. Recently I went to work a few times for meetings, but only a few people came to work in person, and most attended online through Zoom. This is similar to the current school situation for my daughter, where most kids attend in person but some attend online on Teams. I expect that we will have these hybrid online/in-person meetings for quite some time to come; perhaps they might even become the new “normal”.

The challenge with hybrid in-person and online meetings is mainly in the physical room where multiple people are attending in person. The online attendees simply connect to the online meeting the same way as if it were a 100% online meeting. The people present in real life also have their laptops in front of them with the webcam on, but with the speakers and microphone muted. This allows online attendees to see everyone, also those people in the physical room. Only one person in the physical room unmutes the speakers and microphone. This allows the noise- and feedback-suppression of the video conferencing system to do its work and not to amplify the voice of the local attendees through the speakers. If you would have multiple laptops with the speakers and microphones on, you will hear echo’s, and the sound will start feeding back, creating lots of noise.

Continue reading

Improved touch-proof enclosure for OpenBCI

While assembling the touch-proof enclosure for the OpenBCI Cython/Ganglion biosensing amplifier boards, I realized that with the board in the middle of the enclosure, there is little space for the Dupont wires connecting the pins of the OpenBCI to the touch-proof connectors. Trying to squeeze the board in place, some of the solder joints broke off. After repeatedly re-soldering the wires to the connectors, I was able to get it all properly in place. However,  this was definitely a design flaw.

I designed a new version that has the OpenBCI PCB board rotated by 45 degrees and shifted a bit to the corner. This gives more space for the wires and reduces the stress on the joints. Here you can see the new enclosure printed for a 4-channel Ganglion board.

OpenBCI touch-proof enclosure version 3 – with the PCB board in the corner

Compared to the previous one for the Cython, the difference is also in the colour of the connectors: I used 4 pairs of red and blue connectors for each bipolar channel, one black connector for ground, and one blue connector as the common reference. Using the 4 channels (i.e. the red connectors) relative to the common reference requires toggling the micro-switches on the Ganglion PCB board. Using a common reference is handier for EEG measurements, whereas the bipolar configuration is convenient for ECG/EMG, but with some extra electrodes also works fine for EEG. The Cython version has 8 red connectors, one blue connector for the reference, and one black connector for ground.

Another change is aesthetic; thanks to the nice post and configuration files from Rainer I figured out how to 3D print with multiple colours. I updated the Fusion 360 design of the enclosure to include the EEGsynth logo. The logo is embedded in blue and white in the black background of the box.

logo embedded in the 3D-printed enclosure

The 3D design can be downloaded from Thingiverse.

12 Volt trigger for NAD-D3020 amplifier

Update 3 January 2021 – mention that I am now using Tasmota firmware.

Update 26 February 2023 – I have followed this up with a PCB version that also includes a button and a 12 Volt input trigger for switching the 12 Volt output trigger.

The NAD D3020 is a hybrid digital audio amplifier with a combination of analog and digital inputs. I have been using it for quite some years now to play the sound of my Samsung smart TV over the living room speakers and for digital radio, iTunes and Spotify from my Mac mini. The Samsung is connected with an optical Toslink cable, the Mac mini is connected with a USB cable.

In the way the D3020 is placed in our media cabinet, its on/off button is not so easy to access. The D3020 remote control is really crappy and I find it anyway annoying to have to use multiple remotes to switch the power of all devices. Also, the status LEDs of the D3020 are dim and got considerably worse over time, especially for the OPT1 and the USB inputs that are for the TV and the Mac mini, and hence on most of the time. I guess that it uses OLEDs, which have degraded over time. Consequently, it happened quite often that we forgot to switch the amplifier off for the night.

However, the D3020 features a 12V trigger input port which allows the amplifier to be switched automatically on/off along with other gear. Of course, neither TV nor the Mac mini has a 12V output port, but both are connected to my home network; hence it is possible to detect over the network whether these are powered on.

Continue reading

Timing and jitter in DMX512 signals

My previous post on building an Art-Net to DMX interface using an ESP8266 seems to be getting a lot of attention. However, from the comments it is clear that a lot of people that build it themselves have difficulties to get it to work, or don’t get it to work at all. This post investigates this in more detail.

We have not been using these interfaces in our performances for quite some time, and started wondering whether there is something wrong my firmware. My implementation goes back to April 2017. Over the course of time there have been some updates to my code. Furthermore, the Arduino IDE has been updated, as well as the ESP8266 core for Arduino.

Recently I received all three interfaces back that I had built for my 1+1=3 collaborators and decided to update the firmware and to test them. One of them did not work at all due to a broken connection between the power supply and the Wemos D1 mini; two of them started just fine. After fixing the broken wire and updating the firmware on all three of them; they started up just fine, showing the green light (indicating a connection to the WiFi network) and on the monitor page of the web interface I cold see that Art-Net packets were being received. However, with my DMX controlled light it did not work at all.

Testing and initial diagnosis

Using an Enttec Open DMX interface and the very nice JV Lightning DmxControl software (which supports both Art-Net and the Enttec Open DMX), I set out to debug the issue. Since DMX is all about timing, I connected my DS203 mini oscilloscope to pin 2 and 3 of the DMX connector.

I found detailed schematic information about the timing of the DMX protocol on this page. Searching for oscilloscope images of DMX signals, I also found this page with information.

Comparing the output voltage with the DMX512 schematics, it became clear that something was wrong in the signal. To make it easier to see the full signal on the oscilloscope, I configured only three DMX output channels, all set to zero. The oscilloscope shows 5 similar blocks; changing the value for DMX channel 1, I see that the 3rd block changes – that is apparently the first channel. Prior to that should be a “start code” with value 0, so the last 4 blocks make sense. But the first block is too short; there is also a very short pulse all the way at the start which does not match the specification.

Output voltage with the initial firmware:

Continue reading

Touch-proof enclosure for OpenBCI

The OpenBCI Cyton and Ganglion boards are open hardware and maker-friendly biosensing systems. Although there are alternatives, such as Bitalino and OpenEEG and some companies and/or projects are currently working on new hardware (see e.g. EEG.io), the OpenBCI boards are in my opinion at this moment still the best.

The maker-friendlyness of the OpenBCI boards is somehow also a disadvantage: the OpenBCI systems come as bare PCB boards with a Dupont-style header. OpenBCI (the company) focusses on using it in combination with dry electrodes mounted in a 3D printed headset. I personally don’t value dry electrodes that much; I don’t see the problem with a little bit of gel in the participants hair, and I don’t like the pressure needed on dry electrodes to provide a decent signal. Electrodes with gel or Ten20 paste usually provide better and more robust signal quality. However, it depends on the situation: dry (or saline, like the Emotiv Epoc) electrodes are great if you quickly want to swap the EEG system from one participant to the other.

For the 1+1=3 performances using the EEGsynth setup, we not only use EEG recorded from the scalp, but also EMG recorded from muscle and ECG recordings from the heart. The standard in research and clinical applications is to use touch-proof connectors, technically known as DIN 42802 connectors. These are available in many versions, such as cup electrodes for EEG and snap electrodes for EGC and EMG.

The Dupont-style headers are ubiquitous in the Arduino scene, therefore I previously designed an 8-channel head-mounted system based on a sweat band with the amplifier mounted at the back. It is comfortable and works quite well during performances, but it is still a bit fragile, especially when replacing the battery (see below). Furthermore, after prolonged use the gold-plating of the electrodes wears off, and replacing the electrodes is a hassle. The advantage of touch-proof connector is that it is much easier to switch between different types (cup versus stick-on) and to replace worn-out electrodes. I guess this is also one of the motivations for OpenBCI also selling a Touch Proof Electrode Adapter. Connecting the adapter to the correct pins of the 11×2 header is not trivial, and results in a relatively fragile and bulky setup, i.e. not ideal in demonstrations/performances where I want stuff to be robust.

Another issue that I have with the OpenBCI boards is that they use a two-pin JST connector to connect the LiPo battery to the board. These JST connectors are not designed for frequent connect/disconnect cycles. To disconnect the battery for recharging, you have to pull the cable and I have accidentally pulled off the header from the cable more than once…

Based on these experiences I decided to make an enclosure for the OpenBCI boards that is robust in performance/demonstration settings, that uses touch-proof connectors so that it can be used with EEG/EMG/ECG equally well, that is compatible both with the Cyton and Ganglion, and that includes an easy to charge LiPo battery.

The 8-channel Cyton board exposes a lot of the flexibility of the ADS1299 analog frontend like common reference versus bipolar, and normal ground versus active bias, but I typically use it with a common reference and the normal ground. Consequently it needs 10 connectors (8x active, REF, GND). The Ganglion board has 4 channels and can be configured with jumpers for either unipolar and bipolar reference schemes. It hence needs 6 (4x active + common REF + GND) electrode connectors, or 9 (4x active + 4x bipolar REF + GND) electrode connectors. An enclosure design with 10 connectors (4x active, 4x bipolar REF, 1x common REF and 1x GND) therefore supports both reference schemes for the Ganglion.

The external dimensions of the enclosure are 100x100x30 mm. The height is needed for the 10 connectors, but also has the advantage that it should be possible to mount a WiFi shield on top of the board.

The internals of the enclosure are shown here. At the top you see a 850 mAh LiPo battery, connected to a LiPo charger/protector module with micro-USB connector. The on/off switch is this one and the LED is 5 mm diameter. I used a RGB LED, since that was the only that I had available, but I am only using a single color (green) connected through 470 Ohm resistor to the on/off switch. Both the OpenBCI board inside and the lid are secured with 2.5 mm screws. I purchased the touch-proof connectors from Medcat; these are actually the most expensive component of the enclosure.

Here you can see it with the OpenBCI board mounted, but still without the leads between the OpenBCI header and the touch-proof connectors.

The 3D design for the enclosure can be downloaded in STL format or as Fusion 360 project from ThingiVerse.

PCB etching with HCl and H2O2

As my electronics designs are getting more complex and my patience for soldering air-wires for all connections on a perfboard is decreasing, I started looking into making my own PCBs. Although there are professional PCB fabrication companies that are not very expensive, I am not so confident yet with my Eagle PCB design skills. Hence I decided to start fabricating some simple PCB boards myself to get a better insight in all aspects relevant for PCB boards.

Reading about the different options for etching PCBs, and following a instruction evening organized at the Hackerspace Nijmegen on using a small CNC mill for PCB fabrication, I opted for toner transfer using a laser printer and using HCl and H2O2 as described here.

My first attempt was with 10% HCl from the local hardware store (dat zeg ik, Gamma!) and 3% peroxide from the drugstore. Directly following mixing, etching went OK-ish, but rather slow. It took some 10 minutes for the 1-sided PCB board to be clean. The etchant turned into a nice green color. The second time (a month later) the etchant would not really work any more, and th ePCB only got dark. Rejuvenating the solution with some additional H2O2 as per instruction did not change anything. I guess the concentrations were too low, and after a few hours I abandoned the attempt and took the board out.

For the second attempt I ordered 30% Hcl and 10% peroxide in an online store. Using my old etchant solution, I diluted the H2O2 to approximately 3% and mixed that with the HCl in a 2:1 ratio (adding the acid to the HO2O, to prevent a strong exothermic reaction). I popped in my board (from the previous attempt, which had gotten quite dark). The result was a very nice etching process. The process was clearly visible and there were no bubbles.

You can see that half of the copper of the PCB board has been etched away

The result of the etching is quite nice.

Resulting PCB board. It is about 2×3 cm large and will contain a 6 pin DIP optocoupler with some resistors and a diode to implement a MIDI filter.

I am happy with the result of the etching. The ill-defined traces on the board are due to poor toner transfer; I had to make some corrections with a permanent marker (fine liner) on the board. Measuring the connection between all pads revealed that there was one short-circuit (on the left side of the board). I was able to remove that with an x-acto knife.

The next time I will design the traces in Eagle to be slightly wider and to have more space between them. In the Eagle design rules I used a 6 mil minimum trace width (the default), and a 12 mil clearance. And I have to practice more with the toner transfer… to be continued.

First steps with a €20 single-channel EEG system

My friend Vladimir recently demonstrated a single-channel EEG system that he got at a hackathon in London. When he mentioned that it only costs €20 (or actually 20 GBP to be more precisely) I immediately decided to order one myself. The ICI-BCI system is a low cost open source brain computer interface.

The bag clearly and rightfully indicates that it is a totally experimental system, and that it should be used with caution.

The basic idea of the amplifier is that it takes an 1000 Hz analog audio signal from the computer or mobile phone, which is amplitude modulated by the ExG signal and subsequently fed back as microphone signal. So the system is fully analog and requires the DAC to be done by the audio input of the computer or phone.

Continue reading