Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

signal detection

Status
Not open for further replies.

bme.rayan

New Member
hello guys
m new here in this forum and i want an urgent help:confused:
m having a project for EEG and i want to use a 16f877a microcontroller
my aim is to detect the analog eeg signal on the portA of the pic. once this signal is detected by pic i want the portb.0 to give 1.
i dont need to calculate any frequency just to detect the presence of the signal

i tried the following program:
Device 16F877A
XTAL = 4
Output PORTB.0
ADCON1 = %00001110

While 1 = 1
If PORTA.0 = 1 Then
PORTB.0 = 1
Else
PORTB.0 = 0
EndIf
Wend
End


plz can anyone check if i have any error in this program knowing that the simulation of this program on PROTUES is not giving the desired result
thnx for any help:)
 
The ADC doesn't work quite like that. If you wish to measure an analogue signal then you need to know a few things:

1) What is the maximum voltage that you might see?
2) What voltage would you consider a trigger point? 0.1v? 1v? 4.99v?
and
3) What language are you using?
 
The ADC doesn't work quite like that. If you wish to measure an analogue signal then you need to know a few things:

1) What is the maximum voltage that you might see?
2) What voltage would you consider a trigger point? 0.1v? 1v? 4.99v?
and
3) What language are you using?

the maximum voltage might be 6 volts and the minimum volt is 4.5 volt
the used language is PICBASIC
but what about the trigger point?what do u mean by it?
thnx
 
my reply was delayed cz m new
anyways il try to post my reply again
the language m using is picbasic
the lowest voltage is 1.2 volt with 12volt as maximum volt
regarding the trigger point i couldnt get u well!would explain it more plz!
tnx
 
OK, don't forget that you cannot put 12v into a uC pin. You will need to lower your signal, probably by using a resistor divider. Take a look at the following image from Wikipedia:

**broken link removed**

You could use a resistance such as 10k/10k or 22k/22k for R1 and R2. This will halve your input voltage, so 12v becomes 6v, 5v becomes 2.5v etc. Still a little high for the microcontroller, but easy to double in software.

By "trigger point" I mean what voltage would you like the microcontroller to detect? e.g. if your input is 1v to 4.5v and you want it to come on at 3.25v, that is your "trigger". Not an official term, but I think it describes it.
 
ok got it.m not intrested too much with this trigger point,i just wanna detect the presence of the signal or not.
anyways lets take our trigger point 2 volts.
what will be the solution for this program?
:)
 
Hello am quite new here am having a project for EEG sleep detector and input the signal output(biomedical sensor pad) to a 16f877a micro controller.Am kindly asking if there is anyone who can help me with circuit of the EEG module and signal processing module
 
Sylvester, you should start your own thread; not hijack a resurrected ancient thread!
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top