Electronics > Microcontrollers

Voltage spikes on PIC ADC PIN.

<< < (6/7) > >>

SajjadBro:

--- Quote from: IanB on February 09, 2012, 07:54:27 pm ---
--- Quote from: SajjadBro on February 09, 2012, 07:36:50 pm ---Its a good excuse to say " i dont mean any disrespect" and disrespect the other.
I don't mean any disrespect (and i mean it)but if you can't contribute then don't bother to comment. thanks.

--- End quote ---

I meant no disrespect about you being fresh and having much to learn. We have all been in that place. It is no shame to admit your inexperience.

But if you don't realize that if a device has a ground pin on the plug, then that pin is meant to be used, then surely I think you are very foolish. There is no other way to put it.

--- End quote ---

The power cable came along with it has only two pins, but i had the one with three pins. So i think i did a wise thing, we purchased this house so i am assuming that there is no ground. As many people (electricians)here don;t bother while doing wiring(Its not my mistake) that's why i made a sure short assumption and considered the worst scenario. 

One more thing don't say something which demoralize other to excel. I have no shame to say that i am inexperienced for what i don't know but what i understand, i go to its depth.

I think i have found one person in this community who likes to criticize instead of giving suggestions and bucking up. It is a request not to post for me ever, thanks and God bless you.

IanB:
OK, I apologize for my tone.

But you must understand there is a danger to life here. There is a possibility, if something goes wrong, that you could die.

An oscilloscope, if properly designed and manufactured, should have a three pin grounded mains connection. It is essential to connect the ground pin. Without it the oscilloscope may not work as well as it should, and may be dangerous to operate in some circumstances.

There are often other electrical devices that have a three pin grounded mains connection. If they have one, they also must be connected to a grounded mains socket with a good earth.

In many houses and homes, the electrical outlets may only have two pins. This was for a long time true in America, where electrical safety standards have historically been weak.

However, houses and homes should at least have some outlets with a three pin grounded connection. If there are none, it would be necessary not to use any appliances or devices with three pin plugs, or to have an electrician install some grounded outlets.

amspire:

--- Quote from: SajjadBro on February 09, 2012, 12:30:19 pm ---Wow just sitting there you almost analysed my problem correctly.
Well one thing is sure that Spikes occur when PWM is on and when probe is connected to it. When i remove the blue channel then there are no spikes.
There is noting connected to PWM channel, later i will only connect it with LCD LED via transistor.
To some extent you are right that PWM has nothing to do with ADC, so i removed The scope probes and displayed directly the reading i am getting from ADC i.e. 0-1023. Now when i set PWM to 20kHz then i get error of 4-6 bits max. setting it  to 10KHz gives 2bit error and setting it to 1KHZ gives only 1 bit error. What do you think?

Well right now oscilloscope has 3 pins in its power jack, hot wire, neutral, and earth but my line connection has no earth.

Unfortunately i just passed out of my University and this is my first scope and its only 25MHZ as i thought it will fulfill my requirements.

Yes when i unplugged the supply (both +/-) from the bread board, even then there is noise upto 3mV. when scope probe is attached to its ground plug and nothing else then -800 microvolts. while they are still attached and i connect to any metal or wire then there is error up to 3mV.

--- End quote ---

SajjadBro,

First, a 25MHz scope is a very useful scope. I have no problem with that.

I hope you will not get upset by comments on safety from some people. There are many people in this forum who would be absolutely devastated if they heard that one of our members was badly hurt due to a lack of an appropriate safety warning. The motivation for warnings is a genuine concern for people, even if the concern comes across in the wrong way.

The reason that the lack of an earthing system is a problem for oscilloscopes is that they are not "double insulated" so they are not designed to be safe without proper earth wiring. A single fault could make the ground on the oscilloscope live. In an normal earthed power system, this would blow a fuse, or trip an earth leakage breaker. Without a proper earth, an oscilloscope is just not designed to be safe. In this respect, test instruments like oscilloscope's are very different from double insulated appliances like TV's.

Now lets get to how this can affect your measurements.

What you are seeing on the scope is a lot of phantom noise that it seems can be triggered by low energy transitions. Without a proper scope earth, then the scope's circuitry is linked back to the mains via paths like the switching transformer's winding-to winding capacitance in series with its leakage inductance. The power supply for the test circuit also is similarly coupled to the mains. The behaviour of these types of couplings are unpredictable, but they definitely could ring in the way you are seeing in the spikes. It is possible that it will be hard to trust what you are seeing on the scope without some common earth connection.

So what if your work bench had all the all the earth connections of the powerpoints shorted together, but not going to switchboard earth?

Your scope may behave much better, but your whole bench is now far more dangerous. A failure in any one instrument can make the earth of everything on the bench live. If you then somehow touch something that is in electrical contact with the actual ground under the house you while you are using an instrument and you can get a shock.

For now, as a next step in tracking down this noise problem, I think it is worth trying to power the test circuit from a battery rather then a power supply, and see if the waveforms become cleaner.

When you were talking about the ADC, I didn't quite understand what kind of errors you meant. Is this the ADC variation with a constant applied voltage?

Richard.

Mechatrommer:

--- Quote ---I think i have found one person in this community who likes to criticize instead of giving suggestions and bucking up. It is a request not to post for me ever, thanks and God bless you.
--- End quote ---
you havent seen worse yet! not only one person, but many! :D

SajjadBro:

--- Quote ---
SajjadBro,

First, a 25MHz scope is a very useful scope. I have no problem with that.

I hope you will not get upset by comments on safety from some people. There are many people in this forum who would be absolutely devastated if they heard that one of our members was badly hurt due to a lack of an appropriate safety warning. The motivation for warnings is a genuine concern for people, even if the concern comes across in the wrong way.

The reason that the lack of an earthing system is a problem for oscilloscopes is that they are not "double insulated" so they are not designed to be safe without proper earth wiring. A single fault could make the ground on the oscilloscope live. In an normal earthed power system, this would blow a fuse, or trip an earth leakage breaker. Without a proper earth, an oscilloscope is just not designed to be safe. In this respect, test instruments like oscilloscope's are very different from double insulated appliances like TV's.

Now lets get to how this can affect your measurements.

What you are seeing on the scope is a lot of phantom noise that it seems can be triggered by low energy transitions. Without a proper scope earth, then the scope's circuitry is linked back to the mains via paths like the switching transformer's winding-to winding capacitance in series with its leakage inductance. The power supply for the test circuit also is similarly coupled to the mains. The behaviour of these types of couplings are unpredictable, but they definitely could ring in the way you are seeing in the spikes. It is possible that it will be hard to trust what you are seeing on the scope without some common earth connection.

So what if your work bench had all the all the earth connections of the powerpoints shorted together, but not going to switchboard earth?

Your scope may behave much better, but your whole bench is now far more dangerous. A failure in any one instrument can make the earth of everything on the bench live. If you then somehow touch something that is in electrical contact with the actual ground under the house you while you are using an instrument and you can get a shock.

For now, as a next step in tracking down this noise problem, I think it is worth trying to power the test circuit from a battery rather then a power supply, and see if the waveforms become cleaner.

When you were talking about the ADC, I didn't quite understand what kind of errors you meant. Is this the ADC variation with a constant applied voltage?

Richard.

--- End quote ---
Thanks for make me more clear for the noise related to earth. So i opened  an electrical socket and yes there was a green earth wire. My assumption was wrong and i will install another wire in my sockets which are on workbench. As you can see in the image the original power cable has an option for the earth pin but its not installed actually. but i will do as u said.

I have tested my circuit on batteries even but same noise. Its just as i increase the PWM frequency the error goes up to 6 bits. under 2K frequency i only get hardly 1 bit error.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version