I am new to electronics and am currently working with an Arduino UNO. I know the basics of PCB manufacturing (Besides, I'm fiddling with mine, very basic of course) Anytime I'm curious about how to get from Arduino to a finished PCB with the same result only on my Arduino prototype?
For example, my project has several components such as leds, An RFID module, a TFT LCD Shield 3.5 ", another 240x320 OLED screen ... How to put all this on a printed circuit board?
Do I need to solder the same components to my PCB?
-Do I need to run my Arduino code on my PCB once it is assembled?
-.......................................
Aamiral:
Do I need to solder the same components to my PCB?
I'm not sure what you mean by "the same components"
If you are content to run the Atmega 328 with its internal 8MHz oscillator then all you need on the PCB is the Atmega 328. 3 x 100nF capacitors and a 4k7 resistor to hold the reset pin HIGH. You can then use a USB - TTL cable for communication with the PC and for uploading programs. See this Arduino to Breadboard tutorial
-Do I need to run my Arduino code on my PCB once it is assembled?
Where else would you run it? I don't know what lies behind your question.
As I already said I have a project in electronics I protitypé on Arduino is to say that it is the Arduino board that controls my LED, my LCD, my RFID module ... I want to wear all this on PCB and make a case for my device using a 3D printer.
-I already know that components such as LEDs, buzzer, resistors will be soldered directly to the PCB.
-But since I can not and do not want to solder an Arduino board on my PCB, I wanted to know if a go bought an AtMega chip, program it and solder it on my PCB or I can program another microcontroller that I solder on my PCB and that would do the same job as the Arduino board (ie connect and control all my components).
Of course, just use the same processor as the Arduino boards and you'll run everything the same way.
You can also simply solder a Nano or Pro Mini on your PCB. Works great, makes prototyping easier. Especially good when you have the space.
Sensors you may solder directly on the board - check data sheets carefully for reference circuits and voltages. Many run only at 3.3V, others require 5V. Breakout boards as used in prototyping often have regulator and level shifters on board.
... and I don't see even ONE bypass cap between VCC and GND let alone one on each side for power stability when the chip is varying current use rapidly.
I see the 16Mhz clock and crystals well away from the clock pins, EE's and datasheet says keep them close as possible, even tell ya why but then they say to use bypass caps!
How it's done right, with step by step pictures and alternate paths shown. Maybe getcherself a 1284P some day:
I wanted to know if a go bought an AtMega chip, program it and solder it on my PCB or I can program another microcontroller that I solder on my PCB and that would do the same job as the Arduino board (ie connect and control all my components).
You prototype with breadboards and jumpers to get the circuit right and THEN you make the PCB with the same circuit.
Does everything have to be on a single board? I use modules wired to a controller (Nano,Micro,Mini and Teensy for small spaces) where they can be arranged as needed. The modules are made in enormous quantities at very hard to match prices. Best part is if one part fails you only replace the failed part.
wvmarle:
Of course, just use the same processor as the Arduino boards and you'll run everything the same way.
You can also simply solder a Nano or Pro Mini on your PCB. Works great, makes prototyping easier. Especially good when you have the space.
Sensors you may solder directly on the board - check data sheets carefully for reference circuits and voltages. Many run only at 3.3V, others require 5V. Breakout boards as used in prototyping often have regulator and level shifters on board.
If I understand correctly you advise me to use a Arduino mini or nano on my project instead of programming my own microcontroller! But I'm curious to know, how did our old electronics work before arduino appeared? How were they programmed?
Aamiral:
But I'm curious to know, how did our old electronics work before arduino appeared? How were they programmed?
Many didn't have microcontrollers, at least hobby projects not.
And the others were programmed the hard way. Though ISP is just as easy as the Serial method, if you have the proper tools (a USBasp programmer + connector with 6 pogopins makes it pretty easy).
Aamiral:
But since I can not and do not want to solder an Arduino board on my PCB, I wanted to know if a go bought an AtMega chip, program it and solder it on my PCB or I can program another microcontroller that I solder on my PCB and that would do the same job as the Arduino board (ie connect and control all my components).
That is to be frank, a silly statement. What on earth do you mean by "can not" mount an Arduino board on your own PCB?
It is neither cheaper, faster or easier to attempt to inventory all the various parts as well as designing a PCB to replicate an Arduino. The only components you do not need that are on a Pro Mini are the regulator and its input capacitor (and arguably, the reset button) and you will certainly not get the remainder of the parts cheaper than one of those pre-made on eBay.
Which you now mount using the header pins provided, as a "daughter board" over your PCB. You can then put other parts underneath its shadow for compactness; you can either solder the headers in or socket them.
Aamiral:
But I'm curious to know, how did our old electronics work before Arduino appeared? How were they programmed?
You built one of the other kits that were current, and you built or bought a programmer - as you now can do for the Arduino chips with the USBASP.
Or you bought some PIC chips in DIL format such as the PIC16F84 and mounted them, having bought a kit programmer for them. Nowhere near as cheap as the Arduino clones though.
Aamiral:
If I understand correctly you advise me to use a Arduino mini or nano on my project instead of programming my own microcontroller!
I think there is a language misunderstanding here. What microcontroller have you in mind when you say "my own microcontroller"
The heart of an Uno, or Nano or ProMini is the Atmega 328 microcontroller. In Reply #1 I explained briefly that you can use an Atmega 328 with very few extra components.
In Replies #4 and #7 suggestions were made for using one of the small Arduino boards if you prefer to start with a ready-made solution.
Whatever solution you choose the microcontroller will have to be programmed. If you have a program working on an Uno it should work on any other board using an Atmega 328 microcontroller.