micro input question / new digital scope requierments - Page 1
Forum section: electronics / beginners

author: poot36
author_rank: Frequent Contributor
timestamp: August 11, 2014, 04:00:09 am
content: I am wondering if someone could help me choose a oscilloscope to help me debug a project?Mods if necessary please move this topic to the appropriate place.Here is a general description of what my project looks like. I have a adjustable duty cycle 555 timer circuit that has a 25% duty cycle signal with a 83Hz frequency at around 12 Volts peak to peak. I am inputting the 555s square wave into a Atmel micro through a 100Mhz ferret bead, 4.7K resistor, 1uF ceramic cap to ground and a 2.4K resistor to ground. The 4.7K resistor and cap form a low pass filter. This setup occasionally causes the output of the micro to go high.I am wondering if my scope would be fast enough to catch the occasional pulse to the micro input that would cause it to trigger or would I need a digital storage scope to catch the pulse? If I need a digital scope how many samples per second and memory would I need to catch this event?Everything is well decoupled and was working fine with a older pcb board layout and the same value components but the manufacturer of the cap was different. The new board layout and different manufacturer but same value cap I think are to blame. I cannot easily swap the cap with the old board due to the SMT footprint been different. The 555 timer circuit is just on a breadboard and is independent of the micro pcb. I can hook up the 555 timer to the old board and it does not cause the output to occasionally go high.The 555 timer circuit is simulating a can-bus tail light signal so it can not be changed. The Atmel micro (a 90usb162) runes at 16Mhz from a external crystal oscillator and I can see a lower frequency micro square wave of it on the input lines as well as the 5 Volt regulated and filtered input. This signal is more pronounced on the new board layout then the old one.The output signal of the micro only changes in duty cycle not frequency when it goes high (it is driving some LEDs) so I presume that this would be harder to trigger on.I have been looking at some HP 5400 series scopes and I found one that is 100Mhz with 20Msa/s for $100 no probes and the auto set button is broken and it is not calibrated from 1997. Would this work or should I be looking at one of the $350 china made scopes with 1 to 2Mb of memory 1Gsa/s and 100Mhz instead? I could also get a Tek TDS320 for $300 but there are no pictures of it working nor probes. These are all scopes that I have found on Kijiji or Allsold.ca in Calgary so the price may change.

author: random13
author_rank: Newbie
timestamp: August 12, 2014, 12:22:27 am
content: I am very new to electronics (can't make a recommendation for you), but...Can I make a suggestion that you break up the text of your postin to paragraphs? It is very hard to read as one large block.

author: Bukurat
author_rank: Regular Contributor
timestamp: August 12, 2014, 12:35:56 am
content: +1 on the formatting.A mud map of the circuit will convey more than a word description of it.Do you have the source of the code running on the Atmel chip? Do both boards run the same code?

author: poot36
author_rank: Frequent Contributor
timestamp: August 12, 2014, 02:17:29 am
content: I have fixed my first post. I have attached to this post a part of the circuit. I forgot to mention that I had added some 5.6V zener clamp diodes to the new circuit to protect the micro against over voltage on the inputs. Also the ferrite beads are not shown in this partial schematic but are there. I have found out that if I input a DC voltage directly into the micro from 1.475 to 1.775 with this circuit connected it will cause the output to occasionally go high as well. This correlates to around a 5V input to the clamping/ low pass filter circuit. The code between the two circuits is the same. Is it possible for this circuit to oscillate based on the micros input pins characteristics?

author: vk6zgo
author_rank: Super Contributor
timestamp: August 12, 2014, 05:30:07 am
content: Quote from: poot36 on August 11, 2014, 04:00:09 amA DSO would be nice,but you can almost certainly find this fault with your existing Oscilloscope.You have the best test instrument available--------Another working unit.Ideally,you would run both units & swap the probe back & forth,but as you only have one 555 generator circuit,you will have to do the following:Check all the inputs & outputs of your good one,as well as the power supply pins.Now check all the same points on your faulty one.If your memory is poor,draw the waveforms on paper,or take screenshots with a digital camera.(Not near as easy as DSO storage,but life wasn't meant to be easy!)If there is a fairly major difference in the waveforms,you will be able to find out why,& probably fix the problem.If there is no discernible difference,it must be something which occurs rarely,rather than a cumulative effect due to some difference in the observed waveforms.You said the"setup occasionally causes the output of the micro to go high."How occasionally?------Every 10 seconds or so?,Every half hour?,every few days?If it is a reasonably short period,I would suggest you hang the 'scope across the supply pins of the micro,with its input "DC coupled",set the horizontal timebase to a convenient setting to give a continuous horizontal line,adjust the line to the centre line of the 'scope graticule,& wait.If there is a "glitch" on the DC line,it should manifest itself as a deflection up or down on the display.If "occasionally" is a very long period,you may be better off with a Logic Analyser rather than either an AnalogorDigital 'scope.It can still be done with a 'scope,but be prepared for a bit of a boring wait,staring at that screen!P.S: Are you absolutely sure it isn't a programming error in your micro?

author: poot36
author_rank: Frequent Contributor
timestamp: August 12, 2014, 05:58:23 am
content: The output will go high every few seconds to under a second depending on the voltage applied within the range that I specified in my last post (ie higher voltage faster blinking of the output leds). I am almost 100% sure of the programming of the chip is the same (the micros are preprogrammed so I do not think that it would change). I have noticed that I have put in resistors that are 10 times smaller then the original design (stupid smd parts) ie 4.7K instead of 47K and 2.4K instead of 24K. Even though this would result in the same voltage devision would it cause problems or would it just draw more current and require a higher input voltage to overcome the pull down resistance? I have noticed some more ripple on the micros 5V input as well as the input signal pin but I do not think that it would be enough to cause problems. The scope that I am using is a Tektronix 465, is this good enough for this work?

author: Bukurat
author_rank: Regular Contributor
timestamp: August 12, 2014, 07:17:04 am
content: Quote from: poot36 on August 12, 2014, 05:58:23 amThis will change the cutoff frequency of the low pass filter. As to what it will do to current, it depends on what is outside the bit you have shown. Increased current can increase ripple.

author: poot36
author_rank: Frequent Contributor
timestamp: August 12, 2014, 07:33:28 am
content: Ah, I see. I will try to replace the wrong resistors with the right values. On the schematic the input is on the right hand side and the output to the micro is on the left sorry for not clarifying that. Would having the micros internal pullup enabled affect this circuit?

author: poot36
author_rank: Frequent Contributor
timestamp: August 13, 2014, 04:25:35 am
content: I think that replacing the resistors has fixed the problem! Thanks for the help. I am still curious as to why the smaller resistors caused this problem though?

author: Bukurat
author_rank: Regular Contributor
timestamp: August 13, 2014, 04:35:42 am
content: Quote from: poot36 on August 13, 2014, 04:25:35 amThere are a number of reasons why the smaller resistors would cause a problem but without seeing the rest of the circuit it's hard to pin it down.You might have been sinking enough current to pull the supply voltage down, it may have been the change in low pass filter cutoff frequency. Who knows. One thing is for sure, the resistor values were calculated to work with the circuit as a whole.

author: poot36
author_rank: Frequent Contributor
timestamp: August 13, 2014, 04:57:42 am
content: The rest of the circuit is really simple just a 5V regulator to power the micro and some mosfets on the micro outputs driving some LEDs. The input is from a vehicle so I do not think that the current draw of the circuit would be significant factor in the overall picture. I did plug the capacitor and resistor into a online low pass filter calculator and got around 33Hz cut off for the original wrong components and 3Hz for the correct components. The correct components also made the micro trigger voltage go up from the original 1.475V to 1.880V and no funny output occurring.

author: Bukurat
author_rank: Regular Contributor
timestamp: August 13, 2014, 11:06:48 am
content: The cutoff freq decreased by a factor of 10 which is to be expected when you reduced the resistors by the same factor. The micro specs will give you a minimum voltage required to register as a high. I suspect it is close to the 1.47V you had prior to the resistor change so it was occasionally triggering.

author: poot36
author_rank: Frequent Contributor
timestamp: August 16, 2014, 01:35:15 am
content: I can confirm that the input voltage is around 1.580 and it cuts out at 1.550 or so (I can't get a good reading because my meter loads down the cap in the input mosfet enough that it turns off too quickly). I have attached the graphs of the input voltages to this post.