2024-11-12 BMW I4 Subwoofer update


These cars are often delivered with a pretty good Harman Kardon sound system but as always the subwoofer is a small low power and cheap element which cannot produce high volume. At first the idea was to change the stock subwoofer with it's casing and add a good 600Wrms amplifier. The original subwoofer and its casing where taken out and used as a form when molding a new subwoofer housing of resin/ epoxy and glassfibre. 

The audio signal to my aftermarket amplifier was taken from the original subwoofer highsignal connection. There is a big fusebox in the trunk where i could steal 12V from. But since it's an electrical car  there is i disconnect process that must be followed. First the high voltage is disconnected and thereafter the 12v battery. When reconnecting the 12V first and the high voltage finally. There is a small connector in the trunk that you just pull apart to disconnect the highvoltage, so it's actually really easy but it was somewhat hard to find this info on the net. 

So how did it sound? Basically nothing :(

What i found was that the audio signal to the original stock woofer was heavily processed in the DSP and only really low subsonic frequencies was output to the subwoofer. 

The I4 has 8" midwoofer speaker elements in the front doors that i wanted to extract and send it to my external amp. I somehow found a schematic on the stock amp wirings but after some time i realized that i hade the wrong schematic. Using my PhazeSpy instrument i did identify the cables to the front door woofers. Now i hade the full subwoofer audio signal information. My intent was to add both subwoofer signals and then forward it to my external amp.

When measuring the signal to both the trunk and door woofers i could see that the output exceeds more than 65Vpp. The low level input to my amp could handle 5Vrm. So needed to design a cicuit that adds/ sums  the two signals which are diffrential and output them as max 5V to my amp. 

As bonus i needed to have some amplifier that can deliver 65Vpp since my tonegenerator on could produce 20Vpp. I found a OP  (OPA552) that can be powered by +-30V which would be enough to test my design.

Simuleted alot with LT Spice on how to solve the tranformation from differential to single ended,

how to sum the two channels and how to divide 65Vpp to 5V.

In simulation i used the OP113 amplifier but in reality the design was used on the Audi specifk amplifier from Burr and Brown OPA1604. The design also had a auto on trigger to enable external amps

Below are the signals Ut1 and Ut2. on the input it's 60Vpp 50Hz and 100Hz. They are dieived down to around 3Vpp and then the sum of them are showed in the red curve

As seen in the picture below the measurent shows that the real live signals are equal to the simulated. Input is around 60Vpp and output is 4.6Vpp. Note that ch1 and ch2 is showing the same signal but in different places in the amplifier chain. In reality there is one signal input of 60Vpp/50Hz and one of 60Vpp/100Hz and the sum if them are displayed on ch3 and ch4. The reason for testing mainly with low frequencies up to 100Hz is due to fact it will be used for subwoofer.

So how does it sound now. Well good and nothing!

I have probably miscalculated something because my design doesn't output anything when connected to the car. Checked with my USB scope and it seems that signal voltage level from the car actually is much lower then i measured before. I did this last test in the evening, it rained and it  was cold so i might have measured or connected something wrong. But i didn't want to damage the car so i stopped and will take a look at it again when the weather is better. 


The signal to my external is now fed from the left front door woofer and sound quite good so i'm not really missing base either anymore.


2024-10-03 Devboard 


MikroE decided several years ago to stop supporting their C compiler which i find sad but this forces me to learn and use a new compiler which will give more benefits. It felt naturally to choose Microchips own MPLAB X. I designed with a friend a simple developmentboard for PICs to experiment on. 


Found a really great MPLAB tutorial Microesque on Youtube which is a great start on how to use MPLAB but also really good information on how to set up registers and getting started with MPLAB and PIC.





2024-09-11 DIY ESD gun


Often when designing a board i would like test if it can withstand ESD. Buying one is not an option and using a piezo electric lighter will just give a rough estimat.


My goal was to design a ESD gun with following specifications:


- Contact discharge only

- 2-8kV output with 1000V/step

- Positive discharge 

- Single pulse mode

- 10 pulses @1Hz mode

- Discharge curve as close as possible to ESD standard IEC-61000-4-2


Now when the gun is finalized it has the following features:


- Both contact and air discharge

- 7 and 8kV output with 1000V/step

- Positive discharge

- Single pulse mode

- 10 pulses @1Hz mode



IEC-61000-4-2 standard claim that a capacitor of 150pF shall be fullly charged and then discharged into the DUT thru a 330ohm resistor!





The concept is to use have a HV (high voltage) module and to use this to charge the capacitor. The primary voltage to the HV module is powered from an adjustable voltage regulator. To controll the regulator a digital potentiometer is setting the feedback. 


When the capacitor is fully charged the HV module is disabled and at the same time the energy is swithed to the DUT thru a HV relay.


At first atempt i tried to design the HV module and controll it with a MCU but i never achieved more than 1.1kV output at most. Realized that im not really in to HV designs.


Purchased a complete HV module on EBAY for 3USD and it just works as expected.


The biggest downside with this HV module is that it outputs just  below 7kV at startup. Therefore i cannot have lower output voltage than 7kV. The HV relay is specified up to 8kV so these two parameters sets the output span. I might lator on try to find a module with lower output.


The casing is 3D printed and consists of totally 7 part. For isolation teflon screws are used. A collegue is really good at mechanical work and he made me a couple of great tips. One for contact and one for air discharge. The 330ohm dirscharge resistor is housed in the barrel of the gun

Biggest issue during the development is that i experienced alot of contact bounces at each discharge. Contact bounce at 7kV are almost impossible to sort out. Even my computer screen restarted time to time. The first relay i used was a Pickering 67-1A-5/2D and it did not work at all.


I solved it by using a real vacuum relay and found the TE-Connectivity Kilovac K47A-01. Due to the vacuum there will be no or very little arching and electrical fields.


All HV components are fitted in the main casing. One issue whit the Kilovac relay was that sometimes at disharge it arched over to the coil pins. The solution was to isolate the coil connectors with epoxy glue!


On the mainboard the MCU is fitted as well as display, buzzer, 2 buttons, local power, digital potentiometer and the adjustable regulator to the HV module primary side. As can be seen there are som ferrites around the cables but i really don't know if they do any good. I had them and thougt " well they can't hurt"

The more i tested the gun teh more i realized that there were issues with stability. Mainly the display communication was disturbed and also the digital potentimeter used for setting output voltage lost it settings. As seen below the wiper on the POT sets the adjust pin on the voltage regulator. The OP is used as buffer and also to be able to manipulate the voltage level if needed. Added copper tape inside tha casing as an atempt to create a Faraday cage and also introduced a function in SW that resent the latest settings to the display and to the digital POT. The gun is stable after the introduced fixes!

Final measuerment. As can be seen the discharge curve is not fully identical to the standard but as a hobby isntrument it will do quite fine. Also the BW of the diffprobe and my oscilloscope might have some impact on the measured signal

A real early test run with the gun. Here i actually dont use the HV Relay but only enabling the HV module.

2024-06-25 Epilink IoT HUB 4.


The NanoIot Board is now progressing into a more mature state and getting closer and closer to being a real user friendly product.

A big challenge with a real product is the mechanical housing and the connection interface that need to be cheap enough but be easy to use/connect and have high enough quality.


The guys at Epilink have worked a lot with the mechanical solution and it looks beautiful!