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.

Strange things with an oscilloscope

Status
Not open for further replies.
Hello. I would like to ask help from you people that are more experienced in electronics.
I will present first the situation and then the problem. Even if you dont have experience with the micros or boards described in the situation please read the problem because I suspect that it is purely a electronics problem in general.

  • The symptoms
A pin changes values depending if I probe it with an oscilloscope or if I don't. Nothing else changes (the circuit, the program etc are the same)
  • The situation
(Read this just as a reference- I think the problem is more general)
I have a STM32 board (that works with 3.3V) and a CC3000 shield (Wifi shield) https://learn.sparkfun.com/tutorials/cc3000-hookup-guide?_ga=1.84372252.442459916.1462925819

I also have an Arduino Uno (works with 5V). When I connect the arduino to the shield (or the breakout) (and use its libraries) it works without problems
When I connect the STM32 nucleo to the shield, it does not work.

I have identified the problem to be in the INT (interrupt) pin of the shield.

  • The problem
I am using an oscilloscope to see the behavior of this pin. However a strange thing happens. There is a simple part of code that goes something like
Code:
pinvalue= pin.getValue();
printf("%d",pinvalue);

When there is no oscilloscope it prints "1". However when I probe the pin with the oscilloscope it prints "0".

Why this could be happening? A friend suggested that maybe there are some unstabilities in the shield, some open drain, and that I should put some pull up or pull down resistor somewhere. He mentions something about CMOS (stuff that I havent been able to learn well yet)

Any idea why this could be happening. Any help, advice , comment or pointer will be greatly appreciated

----------------
The rest of this post is just for reference. and it points at another strange thing that is happening.

  • More info
I suspect this is the key of the problem because my program stops at this point
Code:
while(spi_irq_state != 0)
        {
          spi_irq_state=_spi.wlan_irq_read();  
        printf("*");    //<-------GETS STUCKED HERE!!!
        }
        printf("\n OUT\n");

I thought that the INT pin never changed therefore being on an infinite loop, but neither the infinite loop or going out of the loop happens. The program just dies there.
So I am suspecting it is more of an electronics problem than a software one.
 
KEEP THE PROBE IN HIGH IMPEDANCE
I FEAR SCOPE PROBES MIGHT ALSO BE CONFIGURABLE TO 50 OHMS !!
 
You better watch Dave's EEV blog on scopes... https://www.eevblog.com/2012/05/18/eevblog-279-how-not-to-blow-up-your-oscilloscope/

The scope pin shouldn't affect the INT pin atall.. A normal impedance of 1Meg is spec'd by most scope datasheets..

I get this when I use my cheap power supply to power the test circuit... I have bought an isolating transformer for such problems ... My frequency generator and ( better PSU ) are both isolated from the scope!!
 
KEEP THE PROBE IN HIGH IMPEDANCE
I FEAR SCOPE PROBES MIGHT ALSO BE CONFIGURABLE TO 50 OHMS !!
No, you can´t make an oscilloscope probe that has 1MΩ or 10MΩ series resistance act like a 50Ω load.

KansaiRobot, can you show how is the int pin connected? I suspect you have no output connected, so the pin is just floating in the breeze and when you connect your probe you essentially ground it. Like your friend said, you need a resistor to either ground or vcc to keep the pin in a known state. This is essential to each and every input that is not driven by a push-pull output such as a normal output from a microcontroller.
 
mvs sarma said:
KEEP THE PROBE IN HIGH IMPEDANCE
I FEAR SCOPE PROBES MIGHT ALSO BE CONFIGURABLE TO 50 OHMS !!
Click to expand...
No, you can´t make an oscilloscope probe that has 1MΩ or 10MΩ series resistance act like a 50Ω load.

Some scopes have a switch on the front panel to set the input impedance to 50 Ohm, I have never seen a 50 Ohm selector on the probe itself.


KansaiRobot, can you show how is the int pin connected? I suspect you have no output connected, so the pin is just floating in the breeze and when you connect your probe you essentially ground it. Like your friend said, you need a resistor to either ground or vcc to keep the pin in a known state. This is essential to each and every input that is not driven by a push-pull output such as a normal output from a microcontroller.
This is very likely.
Input should not be left "floating". It they are they will take up any voltage they like.
If you have unused inputs to a micro-controller, it is sometimes easier to set them as outputs in the configuration and so avoid having to connect resistors to +vdd or 0v.

JimB
 
As others have pointed out, this is how open drain is connected; it needs pull-up resistor to work properly (same applies to open collector also)
https://i.stack.imgur.com/6b9WT.png
and for record, open collector:
**broken link removed**
Even small wire can cause funny readings as when pin is floating, loose wire acts like antenna and even scrope's high-impedance probe can cause trouble (other trouble that scope can cause is s/c via scope probe ground clip, which I don't encourage to try out :D....in fact, one of mine s/c's happened when fooling with open collector. Also, be very careful when you have more than one probes in use at 'scope; all ground clips are the same stuff so you can accidentally short some resistor or stuff) If all else fails, draw schematic, that can show problem very clearly just when you look at it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top