How do you use electrical components adequately?

AI Thread Summary
The discussion focuses on the design and understanding of microcontroller circuits, particularly regarding the placement and values of components like capacitors in oscillator circuits. Participants emphasize the importance of adhering to datasheet recommendations for component configurations to ensure circuit stability and performance. They highlight the necessity of practical experience and studying existing examples to grasp when and how to use various components effectively. Additionally, resources such as "The Art of Electronics" are suggested for further learning about circuit design. Overall, the conversation underscores the balance between theoretical knowledge and hands-on practice in electronics.
Maniac_XOX
Messages
86
Reaction score
5
TL;DR Summary
I am currently working with Proteus and MPLABX, coming from a physics background, i was always made to follow instructions to which electrical components to use, how many of them, and where to connect them, on the breadboard for experiments. Now I am dealing with PIC mirocontrollers and seek a deeper understanding.
I am aware of the functions of the components, but how do you KNOW when and how you should use them in a real circuit? without looking at already made examples.
1649688720007.png


The image i provided is a section of microcontroller circuit that i used to interface code in C with the I/O port of the microcontroller, in Proteus.

I have realized i was only ever told to learn how to measure the voltage and current across the components, Kirchhoff's rules and all, and respective component values through equations... but was never put to test on creating a circuit from scratch and made to decide on the component placements on my own.

Some questions I have are:
why were capacitors placed in those specific positions with those values?
could you make the circuit simpler? or improve it?
What other components would you add to it?
Any extra info or source suggestions would be awesome.

Thank you in advance!
 
Engineering news on Phys.org
On microprocessor oscillator and reset circuits like these, it's best to follow the recommended component configurations and values that are shown in the datasheet. I've written such directions, and they are there for a reason -- the external oscillator circuit will depend on the oscillator circuitry in the IC, and variations to the external circuitry can cause poor stability and poor tolerance in the oscillator's performance. Similarly for the Reset circuit, the external recommended circuit is based on the internal Reset circuitry and circuit timing, and should not be altered.

Maniac_XOX said:
why were capacitors placed in those specific positions with those values?
It looks to be a parallel resonant crystal oscillator circuit, with the current limiting series resistor inside the IC itself on the CLKO output.

To learn more about crystal oscillators, just do a Google or Wikipedia search. They are very interesting animals. :smile:
 
Last edited:
  • Like
Likes DaveE
Maniac_XOX said:
I am aware of the functions of the components, but how do you KNOW when and how you should use them in a real circuit? without looking at already made examples.
Experience. There's no way to know what to do without practicing and studying the given examples.
 
Interesting. For Atmel μC capacitors in the oscillator (C3 and C4 on your circuit) should be in the 18-22 pF, I wonder if 0.47 μF is not a mistake.

If I am right I will pretend it is "experience" ;)
 
  • Like
Likes berkeman
Borek said:
Interesting. For Atmel μC capacitors in the oscillator (C3 and C4 on your circuit) should be in the 18-22 pF, I wonder if 0.47 μF is not a mistake.

If I am right I will pretend it is "experience" ;)
Good catch! yeah, that's a huge value for a parallel crystal oscillator of any useful frequency. 47pF would be more reasonable.
 
berkeman said:
On microprocessor oscillator and reset circuits like these, it's best to follow the recommended component configurations and values that are shown in the datasheet. I've written such directions, and they are there for a reason -- the external oscillator circuit will depend on the oscillator circuitry in the IC, and variations to the external circuitry can cause poor stability and poor tolerance in the oscillator's performance. Similarly for the Reset circuit, the external recommended circuit is based on the internal Reset circuitry and circuit timing, and should not be altered. It looks to be a parallel resonant crystal oscillator circuit, with the current limiting series resistor inside the IC itself on the CLKO output.

To learn more about crystal oscillators, just do a Google or Wikipedia search. They are very interesting animals. :smile:
Awesome information thank you very much!
 
  • Like
Likes dlgoff and berkeman
Maniac_XOX said:
Awesome information thank you very much!
Welcome. :smile:

The schematic that you posted (modulo the capacitor value error pointed out by @Borek ) is pretty specialized, so as I mentioned, that's not a circuit that I would consider altering the values on.

But there are plenty of example circuits that it's good to think about and consider why certain values were chosen for component values and why they chose a particular arrangement of components. More so in analog circuits, but also true for many digital interface circuits.

Here is an old PF thread that discusses one aspect of circuit design in a fun way:

https://www.physicsforums.com/threads/bad-circuits-test-your-knowledge.178516/

And if you find other circuits that confuse you, feel free to add them to this thread here for now. There are plenty of folks here that can offer their thoughts on circuits that confuse you. But in each case, it's best to say first what your understanding is of each circuit configuration and how the component values were chosen to make it work the best -- that's how we learn. :smile:
 
Last edited:
dlgoff said:
How the heck did you remember this old thread. I remember it but would have never thought to mention it. :smile:
LOL, I mentioned it in my Mentor Biography, so I went to the GD stickie thread with all the Mentor Bios and clicked into my Bio to find the link. Excellent question, though. :smile:
 
  • Love
  • Haha
Likes anorlunda and dlgoff
  • #10
berkeman said:
Here is an old PF thread that discusses one aspect of circuit design in a fun way:

https://www.physicsforums.com/threads/bad-circuits-test-your-knowledge.178516/
That's a great idea for a thread. I hadn't seen it. It looks great, but you know 7 pages...

Anyway the first one with a big RC in front of an inverter (note: not a schmitt trigger) reminded me of my first job. The manager of the digital design group had an absolute rule, never, ever, to be violated: no G&$ D@#^ one shots in his group. It was a DoD house, so they had real design reviews; people learned quickly. If you wanted a delay, you had to have counters. This was back in the days of 74LS123's which really were bad. I was an analog guy so we were exempt, and I've used them some, but he did teach me to be wary. Never use digital logic to do an analog job.
 
  • #11
DaveE said:
This was back in the days of 74LS123's which really were bad.
Yup, I remember those.

They had such a high failure rate that whenever I was called on to fix a 'Was Working' or 'Doesn't Work' design, the first thing to do was replace or at least check functionality of those beasts; and try to force a redesign.

That '173 series certainly belonged in the outhouse!

Tom
 
  • #12
berkeman said:
LOL, I mentioned it in my Mentor Biography, so I went to the GD stickie thread with all the Mentor Bios and clicked into my Bio to find the link. Excellent question, though. :smile:
That reminds me. I often forget to use external search engines with the site:pysicsforums.com qualifier. (duckduckgo is my default engine)

https://duckduckgo.com/?q=site:physicsforums.com+"bad+circuits"&ia=web

brings it up as the first hit.

You can also use the "+", "-", and "inurl:" modifiers.

You can even invoke the PF search engine directly from the duckduckgo engine.
!physics "bad circuits"
returns
https://www.physicsforums.com/search/5841380/?q=%22bad+circuits%22&o=relevance

\physicsforums.com "bad circuits" takes you directly to the thread page instead of a list of hits.

Some PF members use customizable keyboard macros, so they can define physicsforums.com as a keystroke.

Put all those tips together and a popup should appear saying, "Get a life. There's more to the world than Physics Forums."
 
  • Informative
Likes berkeman
  • #13
I am surprised no one has mentioned "The Art of Electronics" in this thread. This is the very widely used "reference" book for how to design real-world circuits.
Some of the chapters are a bit dated, but if you are e.g. designing regular analogue circuits it is still a very good resource,
 
  • Like
Likes dlgoff and berkeman
  • #14
Back
Top