Electronic Basics #6: Standalone Arduino Circuit
HTML-код
- Опубликовано: 20 авг 2024
- Twitter: / greatscottlab
Facebook: / greatscottlab
Previous video: • Video
In this video I will show you how to use your Atmega328P without an Arduino Board.
Music:
Killing Time, Kevin MacLeod (incompetech.com)
I like this a lot, but there are two thing's I'd like to mention:
First off, you should add 100nF caps between the +5V pins and GND of the ATmega. This is something one should always do when an IC is involved, which I learned the hard way some time ago.
And then I want to mention that the Arduino IDE supports the use of an external programmer without a hitch - you only have to use the menu option "File/Upload with programmer" instead of the toolbar button when uploading your code. That approach also has the advantage of working without the Arduino bootloader which can come in handy if you have to ditch the bootloader in order to get some more free space on the chip, so I prefer ICSP to serial in my projects.
I did not realize that the Arduino IDE can do this. Thanks for telling me ;-)
Does that mean that I can use the FTDI chip like he said to programm a bought Atmega also if I have no Arduino? Because a bought Atmega comes without a bootloader on it, right?
No, it only means that you can use the IDE for programming with an ISP programmer. You will need a bootloader for programming using the serial line.
Gregor Ottmann
Thanks! Do you know if there is a possibility to use the Arduino to programm a atmega without removing the atmega of the Arduino? Because I have a fake Arduino and you can't remove it there...
There should be a 6-pin ISP connector on your Arduino. Using that and a programmer, you should be able to program the chip without desoldering. If you have a second Arduino lying around, you can use that as a programmer. There are instructions for that on the Arduino website.
Other videos/articles make this look so difficult, but as usual, GreatScott! made a good quality, simple, easy to understand video
Simply explained, clearly detailed, very concise and really helpful. Thanks!
check this ruclips.net/video/fOOgrehTZVg/видео.html
I love the fact that you synced almos every take with the lights on the background with the music itself
That was so good, I thought it really was sound reactive.
"This is not a FTDI chip, but it does the same thing. But it's BULLSHIT!"
LMAO
This is the best video for Arduino on a breadboard.
I didn’t even realize you could do this, this video alone is worth a subscribe
The best professor ! Thanks for sharing and keep this good work. Subscribed !
i just wanna know where i can get that "gadget box"
BrainDead Media 3d print it
I want to know that too
search for project box
BrainDead Media *And here he only came for the gadget box*
Conrad.de
I must say your videos are always very direct and detailed.
check this ruclips.net/video/fOOgrehTZVg/видео.html
YOU'RE THE MANNNNN. Couldnt figure this one out for weeks..!
i hope you hit 1 millions subscribers wish you all luck.
all your video are great, thank you for taking the time to put together these demonstrations
This is a great video, It really help me put together my own Arduino. I saw some of your videos and they are very easy to follow. Keep up the great work and thanks
Nice video! Thank you for the information! I like that the video is on point, short and comprehensive! :D
Thank you. I always learn a lot from your channel.
Thank you for this excellent presentation.
This video is one o f the best.Looking forward to more.
Scott, I've recently learned that is possible also to use an Arduino Nano as an ICSP to program a bare Atmega328P. Just upload Arduino ISP sketch on Arduino Nano, (you can find it in the provided examples), change line 73 to use pin 6 instead of 10 as reset line in case of Arduino Nano. Then connect Arduino's usual ISP pins: 6, 11, 12 and 13 to Atmega328's reset, MOSI, MISO and SCK, in order, and, of course, gnd and 5V. Then you can upload you code to Atmega328 from menu "sketch/upload through a programmer". NOTE: Atmega328 need to have a bootloader loaded, already. Ciao!
1:26
Dude, that's no 10K resistor, that's 120 ohms!
Oh wait... nevermind, I was reading the color code backwards... or at least I think so. Damn.
In all seriousness now, if you have a 10K ohm (brown black black red brown) and a 120 ohm (brown red black black brown; same sequence as before but backwards) metal film resistor, is there any quick and easy way to tell which is which without using a multimeter?
The widest ring is the tolerance ring
@@Werede thanks for this!
never mind :-)
I binge watch this channel like a Netflix show
I like that ;-)
When programming with ftdi and the wiring you showed, dont forget to put a capacitor between the reset of the atmega and the ftdi to shorten the reset pulse!
Great video! However, when I tried it myself nothing would work and at some point I thought I've had fried the microcontroller. Then, I decided to experiment using a normal Uno R3 (GEEKCREIT china clone) and an FTDI. It still wouldn't upload, so I thought that something was wrong with the connection. To all people that had the same problem with me, here's what you have to do to get the thing working:
1) Do the same as GreatScott! did for the breadboard part except that the 10kOhm resistor goes to 5V!
2) Take the ftdi programmer.
3) DTR goes to one side of a 100nF ceramic capacitor and the other side of the capacitor goes to reset.
4) TX, RX and vcc go like normal.
5) CTS goes to GND (GreatScott!'s ftdi I think didn't have a CTS port).
6) GND goes to GND.
In the Arduino IDE, select "Arduino UNO" as your board and the port is the FTDI's one.
Thanks for reading and for those who had the problem, I hope they managed to solve it and didn't throw the ATMega away as I was about to do :).
I didn't have an oscillator on hand, but puttting both chips od a breadboard and connecting the oscillator pins from the socket in the Arduino to both in parallel worked.
Method 1 & Method 2 are really working , thank you. Please mention how to buy ftdi programmer as shown here.
Hello, thank you for this video. It even works with Atmega8 as Arduino NG.
For some reason I had to pull down RX, because program would never boot. Updating code with ftdi works normal, no need to diconnect pulled down RX. Also during upload manual reset is needed.
OR OR OR OR OR OR OR OR OR
use an arduino nano or pro mini (cheaper and easier!)
(just suggesting)
great video!
Very Cool Gadget. Keep up the great work. Nick.
I like the humor in this
You could left the whole right site open because GND and VCC are connected inside the controller. The only thing that might be needed is soldering vcc and aref together (the pins directly next to each other) if analog reading is used.
Du könntest auch die ganze rechte Seite frei lassen weil Masse und 5V innerhalb des Mikrocontrollers verbunden sind. Wenn analoge Werte eingelesen werden sollen muss Aref noch mit 5V (direkt daneben) kurzgeschlossen werden als Referenz.
2:55 got the new way to upload..thanks
Why at about 2:44 was the chip pulled off of the prototype board, and plugged into the Uno, while the Uno was on?
In fact there is nothing what can go wrong in this case, just bad habit..
There is another way of programming your Arduino if you keep the original Atmega in the Arduino and use a 2nd Atmega for your project. You need to flash the "Arduino As ISP" Sketch, select the Arduino as a programmer and then you can upload the sketch on the standalone arduino using specific pins ( I don't know which, it stands in the arduinoasisp sketch). But this only works, if the 2nd atmega already has the arduino bootloader on it. You can flash it, if you plug in the empty, new atmega in the arduino and press burn bootloader in the IDE.
btw: Nettes Video. Wie immer halt :)
Thanks bro, thats a game changer
ICSB... haven't used that in over a decade. I thought the industry was moving away from that stuff. Funny enough, I used ATMEL when programming it back then too. Guess that was good enough software to survive a 6th edition.
Nothing wrong with ICSB as such, it's just a pain to program and I was basically hired by the company to make a firmware upgrade for each product at least once a month, because of bugs they kept finding (I did not make the original firmware, I just patched bugs as they were found by Q&A). It would've been fine if that was it, but the company is an industry leader and moved over 500 units a day, and they were all assembled and programmed in China. It takes about 8 months to move the units from China to EU, so I spent most of my days unpacking 500 units, plugging a cable into each of them, clicking a button on the computer, repacking it and whenever I had time left, I'd work on bugfixes in the firmware.
With the new way of doing it, you get an easier overview of the programming and can test it on-site, which leads to fewer bugs. It's also quicker to update the firmware. That would've saved the company a lot of time, and any semi-skilled worker could've done the updates. Also, the new system uses USB or SD cards, so you can use just about any laptop to reprogram it. No need for expensive separate programmers, so you can have 2 people updating firmware twice as fast (or more than twice, since the new one is much faster). Plug in, hit button, unplug, done.
Very interesting, but the Arduino Nano seem to be only a little bit more expensive than the ATMEGA328P I found on Alixpress. For learning something it might still be useful to build that but to cut the costs and size not so much anymore.
Thank you for your videos
?i have a question: How can i build the short circuit protection
Thanks
Easiest way is a fuse
HUSSAM KAMEL ! just use voltage regulator ic lm 7805
Thanks :)
All these tutorials mess up the crystal capacitor values, typically they use 20pf caps for a crystal with a load capacitance of 20pf, WRONG, there is a formula to work out the correct cap values. To put it as simple as possible, you are using 2 caps in series that halves the total, also the crystal with pads and tracks has a few pf built in capacitance, so it becomes 40pf minus the built in capacitance will give 36pf as the value for the two load capacitors for a 20pf crystal !
How can I do the same for ATmega 8?
gawd of electronics THE GREAT SCOTT
reset to pin1..rx to pin 2...and tx to pin 3...I guess Vcc and Gnd should also be connected.
ICSP is just as simple. Requires 6 wires - 4 to MISO/MOSI/SCK/RESET and 1 to VCC and 1 to GND. Yes you need a +5V pullup on the reset line but there are tons of simple diagrams in Google Images.
@1:21 One of the 22pf capacitors has a sweepover.
once again, you've saved my bacon. Thx.
You are really great the greatscoot
always wonderful !
That was awesome. Subscribed!
I used the first method to upload simple blink sketch yet nothing work. I also add reset push button to ground and my atmega328 doesnt do anything. What can be the problem?
Could you please make a video about how to flash an arduino bootloader to the ATMega without an arduino board, only using the FTDI or something else (maybe ICSP)? Essentially a tutorial about how to make an arduino Uno clone...
0:00. I see You got a great musicality too. Keep it up.
Thanks for promoting Malaysia
What is problem in my Atmega328P-U microcontroller. I am using external 16mhz crystal . I am using this setting 0xFF, 0xDE, 0xFD, 0xC0 and write by avrdude.
my project stuck or hang after some hour...
how to solve my problem...plz tell me
hi, could you make some videos about electronics components like transistors, resistors... to explain how do they work and how should we use them?
But we can also use arduino nano to build led color organ which can fit in the gadget box
I am a bit too late :(.
Hope you reply....
Can I control a relay with this standalone microcontroller?
yes, you can control a 5v relay
Mine goods up slower than normal and the twilight begin to do the weather alert sound but it's just baking load of beeping sex that's kind of annoying
Wonderfull explaned
can i use it without reset connection when it upload i will click the rest button it will work??
What exectly 22pf does??
And can i use another value.
If no why??
.
If yes what is the range?
Those are used with the 16Mhz crystal oscillator, you can use a capacitor between 18pf to 22pf.
Where can I finde how big capacitance is need for the clock crystal?
Is it possible, to get out native ATMEGA328 chip from Arduino Uno, put in new clean ATMEGA328 chip with loader, program it, then put it out and use separatly as shown on video?
Simply - using Arduino Uno as programer for other ATMEGA328?
Nice video length!
You can program 328p using Arduino and without programmer device, thank you
It's so helpful, thank u so much.
Well now is it possible to burn an atmega bootloader using USB to TTL only without an arduino uno chip ?? and if so how?
I have 328p-u so I'm facing 1e 95 0f problem.while uploading (without crystel) ....
.
Can you help me? .
.
.
(i ordered crystal for now.... )
.
What is the problem plese explain it..
And tell us if any solution available
Hi, as you know, a ftdi converts a USB signal into a serial signal.
by connecting to a "powered serial Port (a PS2 connector as a power jack)," it did not work, the problem comes from the DTR pin but I do not know how to fix it.
thanks
Nicolas
Thx ^^ ¤_¤
Why not use an Arduino Pro Mini (that fits nicely inside your gadget box)?
Probably because he would like a reason to make this video and share with us but people always have some stupid questions.
hello
iam using the red ft232 chip wich has dtr pin i have problem wich is the program stuck at uploading
pls help
Why is just plugging the atmega328 into an uno the "most annoying" way? Is prying out the original arduino chip and hooking up the jumpers to program it really less annoying than prying out the arduino chip and inserting the other one?
Sven Haaijman because your code wont work the first way around. You have to program, test, reprogram, test, and so on. Prying the chip out of the socket every time would probably get enoying fast. You can also solder female headers to each input to the chip, so you can test it with the chip still in the arduino, and place the chip into the socket of your setup once youre shure it works
@@Evi3142 and note that too, pins bend.
vodka!
definitely
what does this code mean ( w10647Asz113 ) ???? i read it on a pcb board under the ATMEGA328P-PU
Man, i reverse the voltage of atmega. the circuit was ready in beardboard. all 5V to 5v column, Ground to ground column. But i didn't notice the colour cable of column 5v and ground,
When i was uploading, the IDE said the programmer not responding. The i realize it, put the right cable. Reupload the coding and every still work fine, awesome!
how are you able to solder such complicated circuits on a perf board? what editor do you use to make the schematic and how do you solder components using that?.
as long as you know your project it's really easy
He uses easyEDA as schematic and PCB layout maker
2:20 nailed it 😂❤️🔥
I would have used the Pro Micro, which is quite compact.
Looks like pin 5 (DP3) is PWM, not pin 6 (DP4)
I really like the gadget box, could you tell me where I could find those?
SibertD www.ebay.com/itm/Universal-Kunststoff-Gehause-Plastic-Case-mit-Lochrasterplatine-PCB-A117-/251543434650?
How would you use serial communication in a standalone circuit like this? Or, how would you connect it to a PC through USB?
A question: I'm implementing this on a PCB instead of a breadboard, so Im building my own reset button on the PCB, if I don't connect the reset pin of the arduino to chip pin 1 can I still upload code through the 2nd method?
Great tutorial.....
Will the atmega328p itself work like an Arduino? Digital / PWM pins and analog pins will work normally?
00:24 Is it ok for the separate solder pools to touch each other from other tracks(I don’t know what you call the lines connecting the resistors the components to each other. Lanes? Is there a term for it?) just as long as the actual wire and components legs don’t touch each other? Because man idk how people solder things so close to each other without the individual solder pools touching each other. Does the solder itself not conduct electricity so the flow of electricity not hop onto another circuit/nearby resistor/capacitor etc?
Off topic, but you seem like an electronics wizard & I wanted to ask if you can re-program ATtiny (ATtiny84, ATtiny85, etc.) chips & aren't stuck only being able to upload one sketch to it?
Erik E. Yes you can. I've had to reprogram ATtiny84s many times for a school project.
how about avr and hex ....can i use this in hex without another arduino
i'm working on atmega328p project. i use fast pwm at the 16 bit timer. so i want to output 2 pwm at OCnA and OCnB. both of them have a same top value and same OCRnA and OCRnB. does anyone how i can toggle OCnA and then OCnB repeatedly
Hey Scott! Can you make a space shuttle?
What is the ftdi you shown at 3:15 will you please share this product link
Hi to which pins do I need to connect serial clock and serial data for I2C ?
There are special pins for is on Arduino boards.
Thanks
To power the ATMEGA with 5V....is there some current constraint as well?
How do we know what external components we need and how to wire them up for a specific AVR Microcontroller? I couldn't find a diagram with the crystal / capacitors in the ATmega328 datasheet, so how can we figure out how we should set it up with different microcontrollers?
dude, he is not going to read this comment. this was 6 years ago
Datasheet explains everything
Nice job.I have a question.How can I upload code on atmega 328P on breadboard using arduino board wich has atmega 328 smd and I can't remove chip from breadboard?Thanks a lot.
can anyone provide me a link to the first part of the video
That's awesome!
Can I use arduino pro mini 3.3v /8MHZ board if I want to use 8MHZ on my standalone board and change 3.3V to 5V on the FTDI board.
I will try as you do,thanks
That's a hairy 22 pF capacitor at 1:21!
What’s wrong with the first reprogramming method, all you have to do is attach the microcontroller.
Merci beaucoup
Hello! I'm wanting to make a standalone circuit like this but with USB communication. I searched through your videos but couldn't find a video showing this (Maybe I missed it). Would you happen to know how someone would do that? Would I just connect the TX and RX pins to D- and D+?
I have a chinese arduino .. and its chip is very tightly mounted .. can i remove it safely?
Work done above is absolutely Great but I am looking to apply whole process on atmega2560
Does it still the same or something additional is required?