Creating a microcontroller circuit board
"Is there a way a dummy in electronics can create a microcontroller circuit board?"
- Not quickly.
I really love your interest and desire to take this on. I seriously do applaud your interest and your desire, as well as your willingness to lay it out and just ask.
I will tell you, having nearly caused my copy of the 2nd edition of "The Art of Electronics" to fall to pieces (and it is a well bound hard copy, too... or was), that as good as the book is (and it is good), it is NOT for you at your level right now. You'd just beat your head in the ground with it. That said, I'd recommend getting a copy anyway. You will want it, someday. (And the authors will not live to produce a 4th edition, so buying the 3rd edition is safe.) If you do buy it, look for the Student Manual for the 2nd edition (and if there is one for the 3rd edition -- you can hope), get it. The Student manual is a BIG HELP and I highly recommend it, if you are going to struggle with the excellent AofE book.
Don Lancaster used to write some excellent tutorials on microcontrollers and memory, but the book pair (two volume set) is a bit dated now. But you could learn from it, for sure, even today.
But let's look at what's in front of you:
- Power supply design. You can cheap out on this by just buying power supplies, wall warts, and the like. But nothing is going to protect you from needing to understand the meaning of voltage and current compliance and the possibility of shorting things out if you don't understand what various terms mean and how they are used. And you won't be able to take advantage of some really cheap buck or boost modules from ebay, either, if you can't figure out what the specs mean. You just need to understand the ideas of a shared common, voltage, current, power, ripple, issues related to connecting one system using one power supply to another system using a different power supply, how long it takes a power supply to come up to full operation, and a few other things I'm too lazy to add right now. And it can be very detailed, if you actually try and design a simple, basic one on your own. It's surprising just how much a very simple idea can involve, when you get serious about it.
- Power-on reset. One thing I mentioned above is that a power supply can take a while to come to full operation. Some microcontrollers can do some really crazy-minded things if the power supply comes up too slowly. There are ideas you can use to solve it, holding the microcontroller into some fancy "reset mode" until the power supply comes up, properly. But you might have to design one of these. They aren't complicated and there are specialized ICs you can buy, too. But it's just another issue to know about. You can't just always assume everything starts up okay because you applied a power circuit to it.
- Clock. You've got power and you've got the micro held at bay until the power is ready. What else? Well, it needs a clock. Some micros have internal clocks. Some micros only support external ones. Some external ones can be handled using a module for the purpose. Others, have to be carefully crafted either for parallel-cut or series-cut crystals. Don't know what those are? You might need to. And if it has an internal clock, it might have several. An MSP430, some of them, will have a VLO, an RC, and a DCO internal clock. Plus the ability to support one or two external crystal clock sources, as well. Do you have any clue how to manage all that?
- Program. Okay. By the time you have power, a proper reset, and a clock, you are getting close. If only there was a program in the micro, it might run. But ... how do you get the program in there? A board design may require a method by which you can download programs. And a method, perhaps still different, to allow you to debug those programs, too. JTAG? Heard of it? You might need to. Or various methods to develop sufficient voltages internally (or externally) to program one? There are dozens of ways this happens. Some of them require a fair comfort with electronics. Some don't.
You mentioned you cannot even begin to read a datasheet. So this means you need some help from someone who can walk you through these things. Or you need to take some time to study and think and let ideas settle in. Best would be to find a local group of people who are interested in helping you get started along your journey. So I'd probably first recommend something like that. A robot society, for example, might be one way. There are meetup groups in many local areas, which may bring talented people close to you. I think that's the best way to start out these days. Perhaps a group focused on making 3D printers (which involve micros) or ... well, something like that.
Do it. Really. You can pick this stuff up and get really good at it. But allow yourself some time and try and make a few contacts, if possible, locally. You need access to the minds of people who can interact with you and hear what you are missing and respond to that with descriptions that address your misconceptions as you go along.
Regardless of any or all of that, DEFINITELY get yourself a decent book on DC electronics -- I'd recommend looking for a textbook, as they will cover DC, AC, mesh and nodal analysis, and a few other basics you really need. And get a good one on bipolar transistors. (Mosfets are almost too easy, so you can pick that up from the people you meet.) And yes, get the 3rd edition of AofE. But just don't expect it to be a cakewalk. It's more a wonderful collage of interesting ideas, which inspire you in various directions, expose you to intriguing ways of doing things, and otherwise just make a lot of sense. But only if you have the basics down.
So lets say your project consists of Arduino, a power supply, few sensors and the code that you burnt. Right now these are wired up using jumper cables and you want to put them on a PCB.
Start with understanding the circuit of Arduino UNO and then PCB circuit that will give you same functionality as the Arduino UNO board. This page will help you with that: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard
Don't bother about switching to a new micro-controller right now. There are enough items on your plate. Follow that article. You should be done with first two sub-topics: (1) Burning the Bootloader and (2) Uploading using an arduino board. You can go further if you are able to understand what you are reading/doing, otherwise stop there.
Once you have the bootloader burned and you are able to upload the code, its time to figure out the pin mappings between arduino and atmega328p, which is like this:
Now, you can go ahead and try blinky sketch. You need to add an LED to D13 i.e. pin 19 of atmega328 with a current limiting resistor (470 ohms will suffice). If your sketch is uploading and working, then you can go ahead with hooking up sensors and wifi module and program accordingly. Once you have everything working on breadboard, you can convert it to PCB now. you just need to convert wires into traces. At this point you will notice that your circuit is way smaller than what it was with arduino UNO board. The reason being Arduino UNO having a lot of extra circuit which you don't need for all projects.
Once your circuit is working, you need to figure out a way to power it up. You might want to look into voltage regulator circuits because you will not find a 5V battery which you can directly connect to your project.
To convert this to PCB, you need to select any PCB designing software. I have worked with eagle and I think that its easy for beginners. There are many tutorials available online which you can refer to. Here are two nice ones by sparkfun:
https://learn.sparkfun.com/tutorials/using-eagle-schematic
https://learn.sparkfun.com/tutorials/using-eagle-board-layout
One point not mentioned so far is that in addition to basic electronics knowledge, you'll also need to know how to use PCB CAD programs and get the knowledge of the design flow for hardware. Many beginners start out with Eagle and you'll find lots of tutorials for it. I personally started out with KiCAD, which is, unlike Eagle, free software. Both are available for major operating systems. There's a nice non-overwhelming tutorial series for Eagle on Sparkfun.
In general, the PCB programs are divided into at least two "sections": The schematic, where you place the components and connect them on paper, and the layout, where you actually specify the dimensions of your real PCB, then place the components on the real PCB, route traces, so that components are connected and so on. Both sides come with their own issues. For example, you'll often need to create parts that are not in the software's library. So you'll need to draw the schematic representation, then you'll need to create a footprint for the layout part of the software etc. You'll need to learn about the drill sizes for different types of pins, about the pad types and sizes for different type of SMD components and so on.
You'll need to both learn how to make a clear and easy to read schematic and then how to translate that schematic from paper (or well, computer screen) onto real PCB layout that also works as well.
Fortunately, if you're only working with relatively slow AVR microcontrollers, you most likely won't have much of high-frequency problems that can be encountered in more complicated circuits.
Then there's the mechanical side. You'll need to see what sizes of PCBs you can easily have manufactured, how much board space you need, how much board layers you need. Then, you'll need to find PCB housings that are suitable for PCB sizes that you can find, then make sure that they can all actually fit together properly. You'll also need to find someone willing to manufacture the boards for you (or make your own, if you have enough time), then, when you have the boards, you'll need to populate them with components, or find someone who will do that for you. You'll need to test the boards out, to be sure that they're working and for that, you'll need to make a test plan.
Then, on the yet another side of the story is the support equipment you'll need to have all of this running. The AVR microcontrollers you get from a normal parts distributor won't have Arduino bootloader installed, so you'll need a programmer to burn the bootloader. Should you have any issues, you'll need an oscilloscope or a logic analyzer to debug the issues.
All in all, don't underestimate the problem. It can easily take many months until you actually produce a good simple device. Also don't expect everything to work at the first attempt. You'll most likely need to make several PCBs until you fix all the issues. Be sure to plan and expect that.