I have a 8 Mhz signal that I want to use on my Arduino's serial ports. As a result, I need to use a low pass filter to reduce the frequency. I am using the following calculation to figure the low pass filter:
Cut off frequency = 1/(2pie r c)
5.89 hz= 1/(23.14152,700*.00001)
So that would be a 2.7k Ohm resistor and 10 uf capacitor. I am planning to use a baud rate of 9,600 on the Arduino Uno. Do you think this low pass filter would work well for Arduino's serial port?
That makes no sense.
The serial port is expecting clean digital signals switching between 0 and 5V, at bit rate of 115,200 max.
Putting an RC filter on an 8 MHz signal will just make some analog signal that will not be interpretable as valid serial data.
at bit rate of 115,200 max.
Where does that limit come from ?
On atmel data sheets I see that with a 16MHz atmega328 Hardware Serial could easily do 1,000,000 Baud.
Preferring binary fractions of 1MBd ( 500000 , 250000 , 125000 )
rather than those odd multiples of 9600
RxTxComm.jar (or it's native library part) does limit it to 115,200 for IDE uploads and the SerialMonitor, true.
But my PC and Serial via USB can easily go beyond this 115,200 limit, too ...
BTW: I fully agree with your "RC filter makes no sense", and 8 MHz is beyond the possibilities of the integrated UART.
As the others have stated, what you ask makes no sense.
So, please furnish some more information, as what you are trying to do is either badly described (so we don't understand it), or you are going about it all the wrong way.
- What is this mystery 8MHz signal?
- What do you want to actually do with it?
I'm asking for high level stuff here. Not "I want to read it with the serial port", but "I want to do tell if it's pink, or if it's cheese flavoured".
Thanks. To answer your questions:
I will be reading an analog signal at 8Mhz from a test computer peripheral. It will not be a digital signal at the point where I will read it. It will be around 3 volts. The signal is not encrypted
I just want to be able to read the information from this signal. I want to be able to read the magnetic encoder information it sends out.
You guys mentioned this doesn't make sense. I appreciate the feedback and wanted to ask:
-if I use analog to digital converter after the low pass filter, can I then read it on my digital ports on the arduino UNO?
-If I use a different faster Arduino board, will that help?
Ok. So is the signal a lower-frequency digital signal encoded into a higher frequency analogue carrier wave? Kind of like a radio signal? If so you will need to de-modulate the signal, and for that you will need to know the modulation technique used - AM, FM, PSK, FSK, ASK, QPSK, etc...
Do you have a data sheet available for the device that is generating the signal?
Tell us what kind of "peripheral" or "magnetic encoder" you want to connect to the arduino (type, name, or link to it, etc.)..
The computer accessory is still being developed (not on the market yet) . They have been a bit tight on information. I'm just a contractor is how they call me.
The computer accessory that I'm communicating with is exactly that a higher frequency analog carrier wave. I have asked for more details on it.
They called it an amplitude modulated signal. It does appear to be AM.
So how would I demodulate the am modulated signal?
I looked through the info I got from the company. They do mention that it's a AM modulate signal. How would I demodulate it?
Find an appropriate demodulator chip? - this is a standard RF technique. A multiplying decoder might not be needed,
a simple envelope detector might be enough. Is the signal of known amplitude or will an AGC be needed?
At 8 MHz, that will need a pretty fast recovery low pass filter or envelope follower to avoid becoming just some blah average level that tells you nothing.
What you really need is a demodulator.
See if you can follow this:
If not, google "am digital demodulator circuit" and do some reading.
Thanks. It seems the more I research this- the more I realize I don't know. I am still researching for our time CrossRoads. It may take me more research time than I realize.
To answer your question, I don't know the amplitude. From what I read from the company docs, I would take the signal highest amplitude for the signal. How would the AGC (not sure what it stands for) help with this process?
So my plan right now is to demodulate the signal, then low pass filter it and then use analog to digital converter on the signal. This will be sent to my digital pins on my Arduino. Does this sound like it could work and would the low pass filter I mention work in this set-up? A long standing question is- can I use my Arduino Uno for this or a different Arduino board? I am not sure if the Arduino Uno has enough speed.
Automatic Gain Control, you probably won't need that as you not tuning in some varying level radio station.
We don't know what the frequency of the recovered signal is, so its hard to say if an 8-bit processor running at 16 MHz is going to be fast enough.
Also there is the underlying data encoding to worry about - is it a straight serial signal, or is it something like a manchester coding, or 8b10b, or what? Without those kind of details it's not possible to do your job.
It's not encoded at all is what I have been told other than modulated to AM. The company I contract with did provide me with a device that sends out a sample signal. Not a full working unit as they are still working on it (and seem a little too secretive). I am working on the receiving portion. I just need to read the signal.
i was thinking to ask the company to provide me with a Tektronix Oscilloscope. I think they have the 2225 model (50 Mhz). Would that help with this building process or is this not worth asking for? Does the digital pins work at 16 Mhz on the Uno?
It’s not encoded at all is what I have been told other than modulated to AM.
Yes it is encoded, it has to be. The fact that the encoded signal is amplitude modulated has no bearing on the sort of encoding it could be.
I am working on the receiving portion. I just need to read the signal.
In order to read the signal you must know what it is doing.
Does the digital pins work at 16 Mhz on the Uno?
No the processor works at 16MHz. The pins work as fast as you can read them, but reading the pin is only one operation, you then have to do something with the result, that takes clock cycles as well.
(and seem a little too secretive)
That's often the case... Have you signed an NDA?
i was thinking to ask the company to provide me with a Tektronix Oscilloscope. I think they have the 2225 model (50 Mhz). Would that help with this building process or is this not worth asking for?
A scope is one of the basic pieces of equipment all proper EEs should own. I have a rather aged OS-9020A analogue scope (it was free). I could do with a decent digital one to complement it too. I prefer a proper analogue one for working with analogue signals, but you can't beat a digital one for working with digital signals - analysing protocols etc.
I use my scope daily - I think more than my DMM.
Yes, I signed paperwork and some non disclosure was signed. That's why I try to say in general things without giving too many details. I try to answer the questions asked here. Frankly, I have not been given a lot of details too.
I could open the test unit (sample signal generator). I have been told it was straight serial just modulated. Would that tell me if it's encoded or try different encodings- what should i look for? Would the low pass filter design I posted work after it's demodulated? I plan to use a digital to analog converter after the low pass filter. That's all I need to know for now
Right - it sounds like after demodulation you will have a serial signal.
However, "serial" is a very generic term. Most of the time people say "serial" when they mean "rs-232", so connecting it to the RX input of the Arduino's serial port might work.
If it is rs-232 they should have provided you with baud rate and byte format (8-N-1 is most common - 8 bits, no parity, 1 stop bit, but it could be anything really).
The simplest demodulator is an envelope detector - this is basically what was used in early AM radios. The output of the envelope detector may need some cleaning up before entering the Arduino to get it to the right levels - maybe a simple Schmitt Trigger buffer may be all that's needed.
I checked the company docs say ASCII code, 10 bits of information with start, stop and parity. I guess this would mean it's straight serial. Right? How would you suggest I demodulate this?
The information comes in bursts. So would I need a storage oscilliscope or just one with memory function. These are too expensive and not surprisingly not available from the company. Maybe a frequency counter..