Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How difficult is it to make an EEG?

Status
Not open for further replies.

Daniel404

Newbie
Newbie level 2
Joined
Sep 23, 2020
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
24
Im gonna make my first MCU project and want to make an EEG with atmega328p. I know how to program it. I know DSP to the level of Oppenheims book.
I would like to know how hard of a project it is and wether it is accomplishable with my level of knowledge.
 

The key is the interface hardware - you need a good high gain, low noise amplifier as the typical EEG (or ECG or similar) pickups tend to be in the uV range.
My strong recommendation as this is your first MCU project, is to start with something much simpler. I know you can program but setting up a microcontroller is not trivial - getting the programmer set up, the oscillator right, and the ability to debug whatever code you have is essential. Even if you use something like the Arduino framework, there is a lot to get started. Therefore I'd suggest that you at least do a 'flash a LED' project which will make sure that you have the basics right, and then start working with the UART (assuming that is how you want to output for text), the GPIO and ADC modules etc..
Also remember that you either need to know how to use fixed point integer arithmetic or have an MCU that has a floating point processor (don't know if the one you mention does). If you are used to programming on a PC or similar, then an MCU is a VERY different proposition - slower processor, often single core (although better these days), limited FLASH and RAM, normally limited floating point capability if any.....
And of course, make sure that you run from a battery for safety sake.
Susan

Edit: Just looked up that device - I don't think you have much hope: 8-bit CPU, 32KBytes of Flash, 2K bytes of RAM, definitely no floating point processor (any floating point will use code from a library so will be slow - you MUST use fixed point or integer maths only).
Also remember that the instructions are 16-bit wide so you only have 16K of those at most. Further the RAM maps over the working and IO registers so you have a little less than the 2K bytes in reality.
The 20MHz clock may not be an issue for you but it makes it even more important that you do your coding VERY carefully.
S
 
Last edited:

if all you want to do is display a captured eeg signal, you should be able to do that. If you want analyze those signals , that’s quite a bit more difficult.
--- Updated ---

The key is the interface hardware - you need a good high gain, low noise amplifier as the typical EEG (or ECG or similar) pickups tend to be in the uV range.
My strong recommendation as this is your first MCU project, is to start with something much simpler. I know you can program but setting up a microcontroller is not trivial - getting the programmer set up, the oscillator right, and the ability to debug whatever code you have is essential. Even if you use something like the Arduino framework, there is a lot to get started. Therefore I'd suggest that you at least do a 'flash a LED' project which will make sure that you have the basics right, and then start working with the UART (assuming that is how you want to output for text), the GPIO and ADC modules etc..
Also remember that you either need to know how to use fixed point integer arithmetic or have an MCU that has a floating point processor (don't know if the one you mention does). If you are used to programming on a PC or similar, then an MCU is a VERY different proposition - slower processor, often single core (although better these days), limited FLASH and RAM, normally limited floating point capability if any.....
And of course, make sure that you run from a battery for safety sake.
Susan

Edit: Just looked up that device - I don't think you have much hope: 8-bit CPU, 32KBytes of Flash, 2K bytes of RAM, definitely no floating point processor (any floating point will use code from a library so will be slow - you MUST use fixed point or integer maths only).
Also remember that the instructions are 16-bit wide so you only have 16K of those at most. Further the RAM maps over the working and IO registers so you have a little less than the 2K bytes in reality.
The 20MHz clock may not be an issue for you but it makes it even more important that you do your coding VERY carefully.
S
I think there are modules you can buy that do all the front-end analog processing so that you don’t need to design your own micro-volt level amplifier.
 

Essentially you have to do the analog signal conditioning, then digitize and display the waveform, and
any specific attributes you want to examine. The later part easy but can be tedious programming, eg.
construction of a graph and its scaling....for example.

The analog portion a bit challenging due to the high common mode environment, but well under-
stood. And ready available parts to do that.


The FFT either a library or write from scratch.


General DSP, filtering, display can be done on a single chip -

Capture1.PNG



The above is just a small part of the resources onchip. PSOC 5LP. A partial catalog of its onchip resources -

1642473151290.png


Arm M3 core in it.


Regards, Dana.
 

Hello!

I've done a multichannel (4 channel) EEG logger in the past. I used a MSP430F5529. It can run at 25 MHz, but
I think I had to limit it to 24 for USB reasons. The 5529 has a USB stack, and I used a Li-ion battery charged from
USB using a microchip charge management chip. Not sure of the product ID, but I think it was MCP738xx, something
like that. It used a spi flash for temporary storing data because it uses less current than an SD card. And it was flushing
into SD every xx MBytes.

As for the analog interface, I used an instrumentation op-amp (INA333).

Dora
 

Hi,

There are a couple of discussions here about EEG signal conditioning (analog).
Constant, interrupt or hardware driven sampling is the key to good data.
You may use SPI RAM, I've done Atmega128 designs with a lot of low power parallel SRAM.

Difficult?
For some people setting up a continously sampling ADC is too difficult, for others anything else is no option.
It really depends on your skills, the requirements in timing and complexity.
It surely can be done with an ATMega328.

Klaus
 

@danadakk
when you wrote PSOC 5LP, did you meant CY8CKit059?
Yes that would be the low cost dev board to use in my opinion.

If you need more I/O than that has -


or


If you go for the ebay unit make sure they tell you what chip part number is onboard
to make sure its not one of the early engineering boards.

Regards, Dana.
 


Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top