# How to split an Analog input signal into two ( +ve and -ve )singals

#### Circuit Raj

Joined Sep 13, 2020
1
I am using Arduino UNO for my learning. Frequency of an input analog signal from a sensor let say 50Hz or any acceptable range of frequency Amplitude/voltage may vary.
I wan get two output signals: one is signal of all +ve halfs and another is all -ve halfs from an input analog signal.
For example:
input analog signal is =50Hz(for example) which means the signal contains 50+ve and 50-ve halfs.
time taken for one cycle=0.02sec(1/50Hz)
time for one half cycle( +v or -ve ) is =0.01sec(0.02sec/2)
I wan to two output signals.
one is signal of all positives (0 to 0.01, 0.02 to 0.03, 0.04 to 0.05 .................... so on)
another is signal of all negatives (0.01 to 0.02, 0.03 to 0,04, 0.05 to 0.06.........................so on )
Please help me to write a Arduino C program for this condition. I could not proceed further from here. I dont know how to write for this condition but I can read an input analog signal from sensor and write/get one output signal. Please suggest the book or material where can I find instead of scratching from internet.
Your help makes me learn further.

#### ronsimpson

Joined Oct 7, 2019
1,166
Software:
Normally we look for "zero crossing" points. Or look for Positive to Negative crossing points and not look for (-) to (+).
If you are only looking for what frequency, then you do not care what the voltage is.
..Else than at zero crossing point.
Then measure the time or how many samples from crossing point(1) to point(2).

Hardware: Do you have the hardware working?
Where are you getting the "signal" from?
.. Is it referenced to ground? (-3V, 0V, +3V, 0V)
..How big is the signal? RMS, or Peak to Peak, or Peak .....
..Do you have to go down to 0hz? (DC)
I ask these questions because the Arduino can not read voltages below 0 volts, or above some amount.