Removing 60Hz from ECG using digital band stop filter

Let’s make a filter, which filters off the 60Hz frequency from the ECG signal. As we know, the American power supply is 60Hz. This is a common noise in biomedical signals while the industrial power supply powers them. This type of noise can be defined easily and can be filtered as parameters of noise are known.Here is one example of how to implement an FIR filter using mathematical tools, like Matlab. This can be done using a microcontroller, like ARM or even AVR, because the frequencies are up to 1 kHz.Initial conditions: f0=60Hz – power supply frequency;fs=500Hz – sampling rate;frequencies who define complex zeros: we get w0=0.754;Positions of complex zeros: Zeros and poles in z plane System Function From it we can calculate filter coefficients: And filter coefficients: b3 = 1; b2 = -2cos(w0); b1 = 1 Also we know that: And here we get filter characteristics: We have a band stop filter at 60Hz, and its jam at 60Hz is -300dB. Bellow is a filter structure: Now using this filter we can filter ECG signal: As you can see, this is a simple FIR filter. In other words, there is nothing more than an average function that doesn’t need…

Continue reading

Imaging system with four different wavelengths obtained from LEDs

To evaluate skin pigmentation in different skin layers, a special light adapter is needed to take multispectral pictures of the skin. As there are different optical properties of skin pigments, four different light sources have been chosen. blue λ= 470 nm – highly absorbed by epidermal melanin green λ= 576 nm – hemoglobin peak red  λ= 660nm – epidermal-dermal boundary IR λ= 865 nm – low absorption, sensitive to scattering to measure papillary dermis thickness. There was a lighting source for the “Nikon Coolpix E3100” digital camera developed to take multispectral images of skin. Making an adapter The drawing of  lighting adapter The lightning adapter isn’t tough to build. It would help if you made a circular PCB and solder LEDs with protective resistors. The PCB image:

Continue reading

Skin spectral properties

Understanding how light interacts with skin can assist in designing physics-based dermatological image processing. The key is to understand how light interacts with skin tissue. The skin consists of different layers with different spectral properties. When the incident light is applied to the skin layer, it is absorbed, and another part is scattered. The main layers of skin are as follows: Stratum cornea practically doesn’t absorb light but diffuses it; Epidermis consists of cells producing the pigment melanin. Melanin strongly absorbs light wavelengths towards the ultraviolet part; Dermis is next to the skin layer, consisting of collagen fibers. It can be split into two sublayers: The papillary dermis and the dermis itself. The papillary dermis consists of a high density of collagen fibbers who are strong scatterers of light. The primary requirement for the model is that light has to be scattered. Stratum cornea is supposed a scattering filter. Skin can be characterized as follows:

Continue reading

Histological Skin Structure Diagram

Skin is a brilliant structure of our body. It is very elastic and pretty strong to protect internal tissue. It also acts as a thermoregulator of our entire body protecting us from overheats when we sweat and when there is cold, the blood flow is reduced to skin tissues to save heat to the body’s inner organs. Skin is pretty resistant to harmful chemicals, microorganisms, and if dry, it has high electrical receptivity. From the biochemical side, the skin can produce vitamin D when exposed to sunlight, which is essential for our bones’ growth and maintenance. The extensive network of nerves within the skin feeds information continuously to the brain concerning our surroundings. So it is full of sensors to know the external world like temperature, pressure. Don’t even let me start about skin importance in the fashion industry. About how much there is the attention paid to cosmetics, beauty shine. Skin can show you if you’re shy or cold, or afraid. As you see, your body’s top layer of skin can tell you so many things; get to know it. Skin structure diagram Mainly people used to name only two layers of skin epidermis and dermis. But in reality,…

Continue reading

Pointers to structures in embedded C

Sometimes you might like to manipulate the members of C structures in a more generalized way. This can be done by using pointer reference to structure. Normally it is easier to pass a pointer to a structure than passing the entire structure to function. Structure pointer can be declared very easily: For instance: we can assign the first structure address to the structure pointer like this: now we can access the first structure members by using structure pointer: or we can write Structures can contain member pointers to other structures or structures of the same type. This way, we can create lists – dynamic structure: This way, you can assign the pointer with the address to another structure: Read more about dynamic structures in C tutorials on the internet.

Continue reading

Interfacing MPXV5100 pressure sensor to Atmega8

The MPX5100 series piezoresistive transducer is a state-of-the-art monolithic silicon pressure sensor designed for many applications. Still, particularly it is convenient to interface to a microcontroller or microprocessor with ADC inputs. This is thin-film metallization and bipolar processing to provide an accurate, high-level analogue output signal proportional to the applied pressure. More details can be found here MPXV5100 This sensor measures differential pressure comparing to atmospheric so when there is no pressure applied it shows 0kPa;

Continue reading

Analog Devices Digital temperature sensor AD7416

There are many situations when you might need to measure temperatures or trigger some events due to temperature changes. It is very convenient to have these values in a digital format. Then you can transfer digital values to the microcontroller to process data or just to display on the LCD screen. AD7416 Sensor description This is a 10-bit digital temperature sensor that can measure temperatures in the range interval -40 to 125ï‚°C). Temperature conversion ADC has 15 conversion times. The sensor can be supplied from 2.7 to 5.5V, so it is no problem to connect directly to ARM microcontrollers. Data is transferred through the I2C serial interface. The more detailed description and datasheet can be downloaded from Analog devices page: AD7416. Here you find a simple routine where the Atmega8 microcontroller reads sensor data decodes temperature value and displays it on a 2×16 LCD display.

Continue reading

AVR ISP

AVRISP is a very popular Parallel port programmer for flashing AVR type microcontrollers. Earlier I used programmer connected to com port, but frequently I needed this port for other purposes; I decided to make it work on the parallel port. The programmer on a parallel port is much simpler than connected to a serial port because there is no needed voltage adapter like MAX232. You can only connect your MCU directly to the port. But for safety reasons, there is good practice to use buffer ships like 74HC244. The header for programmer I used standard 6 pin ISP header.

Continue reading