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.

[SOLVED] zero crossing detector, comparator problem

Status
Not open for further replies.

raymundor

Newbie level 5
Newbie level 5
Joined
Aug 19, 2021
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
84
I am building a BLDC controller, the sensorless portion of it is giving me fits. I think its something simple but with several versions of it the comparator or op-amp doesn't give me an output. My test circuit gives a good 1V pk-pk AC wave biased to 1.6V at its 0. but when the inverted input crosses the noninverted input the output doesn't respond. am I missing something? the datasheet for the LM339N that I have on the test bench says the the supply voltage can be 2V - 36V, I am powering with 3.3V supplied from a pi pico. and verified that the signal and supply voltages are reaching the chip. I rarely work with comparators but this is how I understand that they work. I tried using a LM324N (without the bias resistor on the output) and still no joy. however I used a LM358 and it worked, but it is a duel package. thanks for your help. the oscope pic is from pins 5 and 4 of the comparator input.

1631893756014.png
1631895595476.png
1631895807466.png
 

Try moving the diodes so they clamp the input signal at the ICs between 0V and the 3V3 supply. You may face problems with the present design because the half supply from the potential divider will change if any of the diodes conduct. You probably also want a resistor in series with each of the inputs and a decoupling capacitor across the supply.

Brian.
 

ok , I am so friggen retarded! I didn't connect the ground to the voltage divider. well, this circuit works pretty well at voltages from a few volts to hundreds without adjusting the values. so someone might like to use it. I don't know one like it is already out there so I cant reference the design to anyone. if the moderator wants to take it down, my question is answered. thanks,

thanks, betwixt, the divider uses 220 ohm resistors for that reason. the stored energy of the dc blocking capacitors only shifts the voltage by a small amount. at least in my simulations, I will see in practice. I started out with biasing it to 0 instead of half the supply voltage and at least with the LM358 it was unstable when the wave form was below 0. but like this debacle of a circuit build I might have connected something wrong.
--- Updated ---

Try moving the diodes so they clamp the input signal at the ICs between 0V and the 3V3 supply. You may face problems with the present design because the half supply from the potential divider will change if any of the diodes conduct. You probably also want a resistor in series with each of the inputs and a decoupling capacitor across the supply.

Brian.
I just checked it with your suggestion again, and it works fine without the divider. thanks
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top