analog to digital with opamp and NAND inverter; LTspice ultraslow

Thread Starter

patpin

Joined Sep 15, 2012
401
Hello, I am trying to sim a conversion of a analog signal as in .ASC included and LTSPICE gets ultraslow from about 25% on. Extrapolating the speed Ltspice progresses, it could take hours. Any idea?

cranksensorV05  nt- inverterend OK.gif


Mods Edit:
Please upload the normal image file as 800x600 *.jpg or *.gif, so all our members can see the circuit.
 

Attachments

Thread Starter

patpin

Joined Sep 15, 2012
401
One more question. If I use a CD4001BD (QUAD NOR) as invertor and the input voltage on A and B is a sinus from 2.520 to 2.480V, will the real circuit effectively give 5V and 0V pulses at the NOT (A+B)?
And what do I do with not used input and output pins.
And do I add 10K in series at the inputs to protect the CMOS?
 

Alec_t

Joined Sep 17, 2013
12,248
If I use a CD4001BD (QUAD NOR) as invertor and the input voltage on A and B is a sinus from 2.520 to 2.480V, will the real circuit effectively give 5V and 0V pulses at the NOT (A+B)?
Depends on the particular IC. In theory the trip point is half the supply voltage, but because of manufacturing tolerances it may be some way off that.
Tie any unused input pins to either +ve rail or ground (no resistor needed). Leave unused output pins floating.
 

Thread Starter

patpin

Joined Sep 15, 2012
401
Depends on the particular IC. In theory the trip point is half the supply voltage, but because of manufacturing tolerances it may be some way off that.
Tie any unused input pins to either +ve rail or ground (no resistor needed). Leave unused output pins floating.
Thanks Alec_T !! I Guess putting an extra opAmp would resolve the possible problem.
And do I add 10K in series at the used inputs to protect the CMOS?
 

eetech00

Joined Jun 8, 2013
2,595
One more question. If I use a CD4001BD (QUAD NOR) as invertor and the input voltage on A and B is a sinus from 2.520 to 2.480V, will the real circuit effectively give 5V and 0V pulses at the NOT (A+B)?
Logic gates are not normally used that way. A comparator, like an LM393, would be better as it behaves as a 1 bit ADC;)
Add some hysteresis to prevent oscillation for slow rise and fall times.
And what do I do with not used input and output pins.
Output pins can be left open. The unused input pins should be connected to +5 or ground to prevent spurious switching or oscillation from external noise.
And do I add 10K in series at the inputs to protect the CMOS?
No..not really needed.
 
Last edited:

Thread Starter

patpin

Joined Sep 15, 2012
401
Logic gates are not normally used that way. A comparator, like an LM393, would be better as it behaves as a 1 bit ADC;)
Add some hysteresis to prevent oscillation for slow rise and fall times.
.
I meant CD4001 as an inverter after the LM324 (or LM358) in order to have a smaller risetime. Expected frequency is 30-200Hz.
The sinus is in fact a Hall sensor capturing a magnetic field (from a magnet). I use 9 volt because the other half of the LM358 is needing it, for another purpose.
On the simulation of what I eventually planned to build this schematic (as included) looks good (checked from sinus of 10mV to one of 1V). Where did you advised to use the LM339 exactly. Instead of the CD4001?
 

Attachments

Last edited:

eetech00

Joined Jun 8, 2013
2,595
I meant CD4001 as an inverter after the LM324 (or LM358) in order to have a smaller risetime. Expected frequency is 30-200Hz.
The sinus is in fact a Hall sensor capturing a magnetic field (from a magnet). I use 9 volt because the other half of the LM358 is needing it, for another purpose.
On the simulation of what I eventually planned to build this schematic (as included) looks good (checked from sinus of 10mV to one of 1V). Where did you advised to use the LM339 exactly. Instead of the CD4001?
The LM393 would replace the opamp comparator you are using to drive the CD4001.

What type of Hall sensor are you using? Do you have a part number?
 
Last edited:

eetech00

Joined Jun 8, 2013
2,595
Honeywell SS495A1 Halsensor 4.5 - 10.5 V/DC
Hi

Unless I've misunderstood the data on the datasheet, the sensor outputs a DC voltage in the range of 0.2v to (Vs-0.2v), depending on the polarity of the magnetic field. So if Vs is equal to 5v and the input is equal to +670 gauss, the output will be +4.8v (or +4.6v worst case).
 

ericgibbs

Joined Jan 29, 2010
13,827
hi tech00,
I am wondering if the OP has aligned his permanent magnet along the direction of rotation relative to the Hall sensor,?
That is the only way I can see a full wave sinusoidal voltage swing +/- about +2.5V.
E
 

Thread Starter

patpin

Joined Sep 15, 2012
401
hi tech00,
I am wondering if the OP has aligned his permanent magnet along the direction of rotation relative to the Hall sensor,?
That is the only way I can see a full wave sinusoidal voltage swing +/- about +2.5V.
E
I have tried moving the magnet manually near the Hall. Without magnet I measure always 2.5V. When I am at 1cm of it I get 200mV less. More than anough to make my pulsed wave with the comparator and do the timing of the motor. Direction of magentic field was at 90° of the imprinted face of the Hall. When circuit is ready. I 'll post a Scope trace and a picture. Thanks to all!!!
 
Last edited:

eetech00

Joined Jun 8, 2013
2,595
hi tech00,
I am wondering if the OP has aligned his permanent magnet along the direction of rotation relative to the Hall sensor,?
That is the only way I can see a full wave sinusoidal voltage swing +/- about +2.5V.
E
Hi E

Good question.
From post#17, looks like the proximity of the magnet to the sensor is causing it to detect a negative Gauss?...output voltage is less than +2.5v.
 

Thread Starter

patpin

Joined Sep 15, 2012
401
Hi E

Good question.
From post#17, looks like the proximity of the magnet to the sensor is causing it to detect a negative Gauss?...output voltage is less than +2.5v.
Hello, Have tried this sensor to make a current probe a year ago. When field changes fron North to South, so does the direction of the voltage change.
 
Top