Why the wave would come like this ?

Hello everyone
i've tried the AC to DC circuit and Sine-wave to Square-wave
The figure shown below is the circuit that i used for conversion.

however, the oscilloscope showed me like this... :cry:

so... what is wrong with my circuit ?
the transistor that i used is PN3569, and the resistor is 20K
Input voltage is around 10V and Alternating Current

Ok, I presume you are wanting to rectify AC. In which case you want to look for a full wave rectifier circuit.


If you stick a smoothing capacitor on the "DC" output then it will turn out much more DC (straight line) like.

If I am mistaken and you are actually wanting to turn that sine wave into a square wave then I'm afraid I have no idea. :-/

Mowcius

If you want a square from a sine, then probably a comparator is the answer.
Iā€™d imagine it would be a bit jittery though.

Reply Mowcius :
Thanks Mowcius :slight_smile:
i will try with the capacitor

Reply AWOL:
AH, the comparator, last time i tried, it is a disaster, lol
i don't know where the circuit is wrong.
umm, if i may, could you help me a little please?
For the input, there is a speed sensor detecting the speed of motor,
and the sensor will generate around 10V in alternating current.
For the output, i would like to have a direct current in square-wave that could interface with the arduino to calculate the motor's speed.
what kind of comparator should i use? and what is the schematic, can you show me please?

HELP PLEASE

Why not just hook up a DC motor and use the analog inputs to detect the voltage produced as it turns and use that to determine the speed?

Or use a stepper motor as a rotary encoder.

you only have to count the V+ pulses not the v- part of the sine so if you put a diode on the 10V and a cap to smooth it a bit you should get a pulsing signal to count with. might want to ground the -10V part with another diode reversed and to the ground.

The arduino only takes 5V though :wink:

you only have to count the V+ pulses not the v- part of the sine so if you put a diode on the 10V and a cap to smooth it a bit you should get a pulsing signal to count with. might want to ground the -10V part with another diode reversed and to the ground.

The arduino only takes 5V though

I am sorry
i am not so sure that your statement, cause i am not so good at english :-[
could you mind drawing a circuit for me? please :slight_smile:

--diode reversed---ground------
+-10V----!diode----/ /---cap--- +10V--voltage divider(pot)---Arduino pin
Diode passes current only one way! ok so after diode you only get half of the sine wave
Two diodes not facing same way catch different part of the sine wave
one part you direct to the ground, the -10V part.
one part you direct to a capacitor to even out the half sine wave, then you divide the voltage with a potentiometer to read +5V

it is only half of mowcius circuit, use ony one output, other output goes to ground.

if you do not understand use

to translate this site to your language.

David
edit:

like this ?

the block is written as Oscilloscope/Arduino

try it and find out, you can leave the cap out to get more distinct on off signal.

search
half wave rectifier circuit
on google and you will find good schematics

David

Edit: do not put full 10V to arduino!!!