Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

An odd issue with half wave rectifier.

psecody

Member
So I've got a circuit that I'm working on where I've got a tach generator outputting AC signal (0-~70V) that I'm trying to measure the frequency of using a ATTiny328P. I've gotten the ATTiny programmed and working on the bench testing with a function generator set to square wave with a DC offset so that the signal is between 0V and ~5V, all that's working as it should. The sensor unit is where I've run into some issues that I can't really explain and was wondering if anyone had any thoughts on it, it's probably something little and stupid that I have overlooked but I just can't seem to figure out why it's behaving the way it is.

Disregarding the rest of the system for a minute, I have an 80Hz sine wave (20V peak to peak) coming in to a 2:1 transformer(TY-250P) then going through a 1N4007 diode and a 10kΩ resistor. My issue is that on the oscilloscope I'm still reading negative voltage instead of the diode cutting the waveform off at 0V like I was expecting. I've tried a ton of different configurations and am still having negative voltage (which the MCU doesn't like, which is why I'm trying to figure this out.) Anyone have any thoughts as to why this might be happening? I've attached photos of the schematic, of the circuit on a breadboard, and of the oscilloscope. Using the falstad circuit simulator it works as I would expect but in real life I'm seeing a negative voltage on the circuit. (EDIT: In the pictures the voltage will be different because I have the transformer reversed right now for 40V peak to peak since my function generator maxed out at 20V peak to peak. Also the ground reference for the probe is connected to the ground bus running up the middle of the breadboard and is not in the picture but it's the blue row on the breadboard.)

Any help would be appreciated because I am just befuddled with this. It's been a while since I've worked with electronics in any serious sense so I'm trying to refresh my memory on things and may have just missed something. Thanks in advance for any thoughts on this, they are much appreciated.
 

Attachments

  • PXL_20240405_170945379.jpg
    PXL_20240405_170945379.jpg
    3 MB · Views: 54
  • PXL_20240405_170957251.jpg
    PXL_20240405_170957251.jpg
    2.3 MB · Views: 55
  • PXL_20240405_171003348.jpg
    PXL_20240405_171003348.jpg
    345.4 KB · Views: 52
  • PXL_20240405_171131092.jpg
    PXL_20240405_171131092.jpg
    2.2 MB · Views: 52
I agree with Diver, set the scope to DC Coupling.

JimB
 
Thank ya'll for the advise. About the ground on the probe, I probably explained that wrong, I was measuring across the resistor, just from the ground bus rather than the lead directly. I finally got it worked out good enough to do what I'm needing it to do. The AC coupling was one part of it for sure, I switched to DC coupling and had a totally positive reading. The problem I had then was that the waveform was from ~1.5V up to 3V which the Schmitt trigger did not like since it was all above its VT+ value so it was never seeing a low. On a hunch I added a resistor to ground (I made a schematic of what I've got now) to help pull it down and I'm now getting a 0-4.8V square wave that I can run into the MCU. The resistor values aren't calculated or anything, I was just grabbing resistors I had on the desk and throwing them in there. I'll have to go back and check the values for those.

Thank ya'll for the help, that got me back on the right track with this.
 

Attachments

  • new schematic.jpg
    new schematic.jpg
    570.6 KB · Views: 33
If you think that you may have possible transients out of the
transformer this will protect input for that :

1712364901649.png

The R can be more like in the K region if needed and speed is not an issue.


Regards, Dana.
 
Interesting, I hadn't thought of transients from the transformer.... I'll have to look into this and try adding that to the circuit just in case.

I don't have detailed specs on the tach generator so there's some guess work going into this. The tach is from the 1940's and I've got the overhaul manual but that doesn't really help me in this case. Originally the status light I'm controlling worked off of voltage from the tach but due to the way I'm having to implement this and the lack of information on everything I'm just using frequency since it was easier to figure out.
 

Latest threads

Back
Top