Random-access memory (RAM)

It's better to have as much as possible.

Sony VAIO Laptop

Good performance.

Windows 7

Today the most common Operating System (OS).

Power switch on motherboard

Today it comes with almost every motherboard.

Graetz

AC to DC converter on board.

Pages

Friday, April 27, 2018

Mbed vs Arduino Uno speed of AD & DA Conversion

While i was playing with Mbed i noticed difference in speed of Analog to Digital & Digital to Analog Converter which is expected due to heart of Arduino (ATmega 328) and Mbed (32 bit ARM Cortex). With that in mind it's pretty obvious that Arduino it's not suitable for Digital Signal Processing while Mbed gives a bit more space to work as DSP filter, Audio mixer, effects...


Here is some results directly from Tera Term and Arduino IDE

Mbed:

****All measurements are in microseconds (us)****

  • Time of AD conversion = 21.2990 us
  • Time of DA conversion =  1.5833 us
  • Total Time AD & DA conversion= 22.9167 us
  • Max AD Sampling frequency: 46.95 kHz
  • Max DA frequency: 631.59 kHz

It's possible to use Mbed for DSP up to 23kHz which is enough for audio mixers, effects...

AD & DA time on Mbed 


Arduino Uno:

****All measurements are in microseconds (us)****
  • Time of AD conversion: 112 us
  • Time of DA conversion: 12 us
  • Time of AD & DA conversion: 125 us
  • Max AD Sampling frequency: 8.9 kHz
  • Max DA frequency: 83.3 kHz
Unfortunately Arduino is capable to use frequency up to 4kHz which is too low for any kind of DSP usage. 










Sunday, February 11, 2018

Altium Designer Tutorials

ALTIUM DESIGNER TUTORIAL SERIES

Altium Designer Tutorial [1]: How To Make Default Template [SCH] 



Altium Designer Tutorial [2]: How To Make Default Template [PCB]


Altium Designer Tutorial [3]: How To Place Component Value On PCB Top Overlay 


Altium Designer Tutorial [4]: How To Print PCB On Foil For Homemade Etching 


Altium Designer Tutorial [5]: How To Create Polygon From Selected Primitives 


Altium Designer Tutorial [6]: How To Define Board Shape 


Altium Designer Tutorial [7]: How To Create Polygon Clearance RULE 



BoomBox v1.0

This is homemade designed speaker box, popular today as boombox. It has 2 LOW, MID (Monitor Audio) and 1 HIGH speaker. Amplifier is 25W with bluetooth on it (Ebay, Chinese crap)  which I will replace with my D class Amplifier (TPA3116d2) I posted earlier.
For LOW  and HIGH speakers - passive crossover was used
For power supply I use 12V /12Ah  Lead Acid Battery with charger implemented from old Laptop charger
Running time with full charged battery is about 24 hour constant playing.
AC plug and 2x 5V USB connectors are on the back side for charging MP3,Smartphone etc.
Design was made in SolidWorks 2016, files will be available on request.

Price list:
  • wood - MDF 16mm  - 0.61m2 - 7$
  • cutting to requested size -  2$
  • speaker corners 8x  - 10$
  • wood screws 30x - 5$ 
-------------------------------------------------------------
TOTAL:  24$






Battery holder

Inside the box



Battery charger on the right side



Finished BoomBox coverd with speaker fabric





Sunday, January 7, 2018

Coil Counter

This is new/old project - Coil Counter
The idea of Coil Counter is to replace mechanical counting of turns with electronic device which will provide precise implementation of coil. Also I wanted to show that you can make diy, reliable&useful device with minimal costs, this device cost me around 20$. I have to mention that I just made electronic implementation while mechanical isn't finished yet.




How it works?
It works on quite simple way. First when you turn it on, you will see message Coil Counter then it will switch to menu Number of turns: now it's your turn to write how many turns you want via 3x4 matrix keyboard. Next, when you finished writing using navigation button # confirm your data. Next menu will ask you to write speed of motor in a way PWM: -30%+ ,  plus and minus are navigation buttons (- ==4, +==6) so with 4,6 buttons you can increase or decrease PWM by 5%. Also when you finished confirm it with #. The next menu is final it shows you all your written data (Nmbr of turns, PWM) So if you are satisfied confirm it with # or cancel it with *. It's possible to cancel data at any menu.

Maybe you wonder why PWM is set to 30%?
Well, I came to 30% empirically, testing motor speed at various PWM percentage. In that way 30% seemed just great to be initial value.

Take a look on Schematic.

Coil Counter Schematic



Assembly layer

Bottom Layer PCB

3D

3D

3D

As for sensors I used simple sensor with IR diode and photodiode aka. IR Sensor



Burned Speaker coil 
New Speaker coil


Wednesday, January 3, 2018

D-Class Amplifier THD, Output Power, Efficiency - TPA3116d2

After quite a while I have some time to make few posts on the blog. I'm starting with Amplifier

This is homemade D-Class Amplifier with IC TPA3116d2 (Texas Instrument). I made it for my new boombox but also to verify/confirm datasheet measurements/results. My interests were to check maximum Output Power, Total Harmonic Distortion (THD) and Efficiency. All results are shown below.
As for PCB design I used Altium Designer 17, whole design was made according to guides from official datasheet. PCB itself is 2 layer where polygon pours on both layers are used as heatsink
All components are 0805 size footprint, capacitors are X7R and LOW ESR, everything ordered from FARNELL.com all order codes are below as well.


List of equipment used:
  • ·         Oscilloscope – Siglent SDS1000L
  • ·         Function Generator – FeelTech FY2300A
  • ·         Bench power supply – Focus DC Power supply HY3005D-2
  • ·         Artificial Load  - 4Ohm/500W




Here is the internal schematic and Altium schematic



Altium Designer Schematic 

Bill of Material


N Designator Value Footprint Manufacturer Farnell
1 C16, C17, C18, C19 220nF/50V 0805 Kemet 1288261
2 C26,C27,C28,C29 680nF/50V 0805 Kemet 1414702
3 C20,C23,C30,C31,C32,C33 1nF/50V 0805 Kemet 1414660
4 C57,C34,C37,C38,C40 10nF/50V 0805 Kemet 1414662
5 C21,C24,C58 100nF/50V 0805 AVX 1740673
6 C11,C12,C13,C14,C15 1uF/50V 0805 Multicomp 1759502
7 C22,C25 220uF/35V 0805 Panasonic LOW ESR 1219473
8 U1 TPA31162 TSSOP-32 Texas Instruments 2144259
9 R10,R15,R16,R17,R18 3R3 0805 Multicomp 2447656
10 R13, R11, R14 100k 0805 Yageo 9237879
11 R12 20k 0805 Multicomp 2074395
12 L1,L2,L3,L4 10uH Bourns 2374152



Top Assembly Layer



Bottom Assembly Layer

Top Copper Layer

Bottom Copper Layer

3D Top 


3D Bottom






How it looks when printed out




Toner Density Spray 
Toner Density Spray is awesome for those who have old printers or printers with 600 DPI but also saves the thing if you don't want to print 2 pcs then glue it to fit perfectly.

Definitely RECOMMEND! Search in your store or on the internet. 

Price is around  15-20$




This is my illuminator with broken VTF125 bulb


Actual finished PCB




Measurement setup


 THD measurements were conducted under this conditions:
  • Supply Voltage U=12V
  • Sine wave frequency  f=1kHz
  • Input Signal Amplitude Uin=0.5V
  • Output Signal Amplitude Uout=1.5V
  • U1, U3, U5 is 1.st, 3.rd , 5.th Harmonic
FFT - Fast  Fourier Transformation




U(Supply Voltage)
Input signal Amplitude(sine f=1kHz)
Uout
U1
U3
U5
12V
0.50V
1.5V
580mVrms
6.3mVrms
3.3mVrms




According to datasheet difference in THD is 22% .


Output Power, Efficiency is shown below:

Supply Voltage(U)
Supply Current(I)
Uin(sine, f=1kHz)
Rt (Load)
Up-p
Uout(peak-peak
P

Pout
h
12V
1.46A
1.3V
4Ω
10.6V
17.52W
14.04W
80.16%









According to datasheet 15W I measured in real environment 14.04W which is 0.96W or 6.8% less than manufacturer said. Which is quite good

You probably noticed the difference between Pout and P (all power) that's because of dissipated power which converts to heat on components with real impedance (parasitic resistance).
Dissipated power in my measurement can be calculated in 2 ways:





While I was doing my measurements I've also noticed that there are no maximum Amplitude of  Input Signal in datasheet so I measured that as well.
Maximum Amplitude is a bit smaller than we can see Clipped signal on Oscilloscope

As we can see firstly there is cutting on the negative half-periode than positive half. That's happening due to low bias voltage.

Input Signal Amplitude
Clipping voltage
Half periode
1.3V
4.4V
Negative
1.5V
5.2V
Positive


First cutting negative half

Cutting positive and negative

Total cut off


To summarize we can see that there are some deviations from official datasheet due to lack of mathematical analytic formulas we can't confirm our measurements nor design amplifier to meet our special requirements. That's not reason that this amplifier is not good enough to use for your boombox, speaker box, bluetooth, bigger audio systems (2.1) etc. on the contrary is Perfect due to price and easy to use.