Hi Ralph, I've been away, but always good to get back and find you've uploaded!...This particular topic is great, you demonstrate all the options like what package should I chose and do I need a bit of extra memory and leave out the bootloader, also how many different hardware options you have, and you have explained the two methods of uploading a sketch, which are SPI and UART, and now as you point out it's now possible for us to design boards just using the "chip" itself, which is great fun (most of the time!) I have just sent an order off for 10 more of my own TQFP 32 pin breakout boards (JLPCB) which now have pads for the decoupling caps (VCC and AVCC) and also optional LED's on the power and PB5 (arduino pin 13) I used the JLPCB voucher that you that you gave away and the whole lot came to £3.20p delivered! so in about 10 days I will be getting my Hot Plate out and doing some more SMD work. Will E-Mail those pictures of my humble set up to you for your opinion...Cheers and I look forward to the next Vid's.
I'm looking forward to the pics already, Andy, I'm glad the voucher game in useful. I'm bowing to my viewers' requests and I'm just doing an absolute beginners' video on Schematic to PCB using EasyEDA, LCSC and JLC as the power of those three should not be underestimated for the beginner. Trouble is, it's 60 minutes long, I shall have to split it. Drat.
Great video AGAIN! Every day is a school day. I wasn't aware of bootloader been wiped off via ISP programming. Thank god the one I ordered about a year ago didn't work lmao. 🖥️🔨 Your public showing of your first PCB was brilliant. Look at all the help your followers through your way! Love how your working so hard to help your channels mascot (Benny) 🐈
I had loads of help and pointers regarding SMD soldering and PCB design, Gordon. I'm always amazed at the breadth of experience out there, and the willingness of people to help their peers. I look at my first PCB now and don't cringe quite as much as maybe I should, as I know what I did, what I did wrong, why it was wrong - in fact, they say you only learn by your mistakes so I learnt a whole encyclopedia of how (not) to design a PCB! Benny sends his regards, he hates the colder, wetter weather, he's definitely a warm weather creature!
Hi Ralph love the videos, how PCB design and production has moved forward. I used to work for a PCB company designing PCB’s, we used black tape at 2:1 then photography to reduce it to exactly 1:1 size. Double sided boards where designed using Red and Blue overlapping tape then using photography method to separate both sides of the board to produce a Positive and a Negative. The silk screen and solder mask was designed using Black tape and the letters/numbers we used letraset, the production another story, a little bit of history
That might explain, then Keith, why PCB traces on the front and rear of the PCB are red and blue respectively by default on most PCB CAD programs? Yes, things have moved on, and now is the time to take advantage, ditch the stripboard and make it look professional. I mean, for the price of a cup of coffee you can get 5 PCBs. Oh, I've already used that analogy, I must think of another cheap item we all buy regularly, almost without thinking of the cost.
Keith, I remember going down to the Acorn drawing office in early eighties to see such things being made for the likes of the BBC Computer and the Electron. Simpler days in some ways.
@@keitholiver3981 As an Acorn employee I had a much nicer time of it. I don't think I ever loaded anything from tape, ever. But I know people who did and I've seen the psychological damage. I was involved with Econet so I had other problems. And we also got access to the tech early, sometimes even before it worked properly, which was a boon and a pain. I've been the one with a bucketful of EPROMS going round saying "Can I change your ROMs please?" as well as having co-workers doing the same to me. Not only were we eating our own dogfood, but sometimes before it was properly cooked. en.wikipedia.org/wiki/Eating_your_own_dog_food
@@RalphBacon I'm a beginner and learning fast. Probably because of my engineering background in precision machining. I also have the FTDI232. Due to your tutorials, any projects I make will be easier now. I am also just about to learn about the ATTiny85, got some in stock.
Not so long ago In circuit serial programmers used to be expensive. I think it also allowed you to debug your program "emulator" comes to mind. With a bootloader you could skip the cost of one of those. I have been following your series on low power, stand alone videos and they have been absolutely awesome. It segways right into designing your own boards so the Kicad videos go hand in hand. You have a good insight into what does matter as far as content that is needed. Most of my projects are battery powered so a normal arduino board is going to be just for prototyping as you have explained. Thanks for taking your time to do this. I think you are an awesome engineer.
You are very kind in your assessment of my skills, thank you. I'm building a couple of battery powered devices now, so this Real World experience sort of spills over into my videos! Mainly, that means I make mistakes like everyone else, and am not too afraid in washing my dirty laundry in public, as it were, as sometimes videos make it look sooo simple when in reality we all have hurdles. Thanks for posting, Joey, appreciated.
I've been using EasyEDA for my first attempt at designing a PCB. I've started over about 6 times and I'm finally getting something that actually looks like a circuit diagram. Just getting ready for the 7th do-over now because I've realized I need a 6-pin header for the ICSP connection. It's a simple circuit really. An Atmel 328P DIP and your MOSFET circuit from video #123 that allows the 328 to power itself off. Plus an NRF2401 radio module. I think if someone were to see me working on the diagram they would say something like, "hey, you there! Stop fapping about with things you don't understand before you hurt somebody!" Oh well, at least I won't need a canned laugh track because I'll have the real thing. Waiting for the nickel to drop. Thanks Ralph. I'm looking forward to your step-by-step demonstration.
Simple, as a first step, is good, DIrk. As you all saw, my first PCB was a discrete component multivibrator (flashing LEDs), as it was the entire process I had to learn not create NASA on a PCB! As you are using EasyEDA (still my favourite CAD) if you ensure you pick your components from the LCSC Assembled (Basic) list you can even get them to build it for you. Even if you want to build it yourself (yes, some hobbyists want to do this) at least you can buy the exact components you need from LCSC, which is what I'm doing right now!
Five years ago I made my own programmer. ZIF socket, 8 dip socket, crystal , 10uf cap, leds, and neopixel. So I can program 328p, or attiny85. I made it on a arduino proto shield.
@@RalphBacon I use ftdi and ftdi clones. I have tl866a also. I wasn't able to get the usbasp to work .My spi programmer is awesome. I also have the adapters for 328 tqfp and attiny85 smd . I should make a video of my programmer.
Funny enough I've just received and built one of the PCBs I designed and had made for my ATTINY programming sheild for the 8/14/20 pin ATTINY processors I want to play with :) Its incredible what you can do with this "tiny" microcontroller.
I'm having big problems getting an ATTiny167 to accept ICSP programming. Getting chip ID of 0x0000000 or 0xFFFFFFF all of which indicate it is not reading the chip, hence my wiring is not correct. But I've gazillion-checked it all (and redone it) so I'm beginning to suspect the chips!
I think coffee is way to expensive outdoors these days. But than. I was at a place once where a bottle of water was more than a can of beer. What a world.
I remember those far off days when a programmer (usually for a PIC back then) was something you plugged into your computer's printer port. How times have changed for the better.
Still got one, pic start plus...... still hate the fuse work, it's configuration bits.8-) fuses were for pal's. Still a nice range of options for programming. Boot loader is getting in the way on a project, I want to set bits as soon as power is applied but the boot loader seems to be creating a delay. Maybe I'll need to go back to a pic as you always know the first line of code is the first bit to run and no delays. Still a nice vid Ralph.
I remember using the parallel port for programming something at some point, but that's all I remember. I think it was a one-off thing where I had to flash a device I had no programmer for.
@The Embedded Hobbyist If you do not use a bootloader in your Arduino project, then the code runs instantly on power up, no delay, just like a PIC. I'll be re-emphasising the ICSP vs USB method of uploading in a future video.
I love your content. I have two young men, my son and his best friend whom I have watching your videos to get up to speed on this stuff. And I eagerly await the "how to make a pcb" videos. I hope to build a little business selling a specific widget which will require making a pcb. Anyway, good stuff.
I may have already mentioned somewhere in my channel, John, that to be "good" at anything requires about 1,000 hours of actual use (apparently). To become an _expert_ about 10,000 hours. Luckily for us, we can create a passable PCB without about 20 hours of dedicated practice, so keep tuned, I do want to show everyone the easy steps to make one.
@@RalphBacon awhile ago I purchased a raspberry pi 4. I just purchased one each of the starter kits from elegoo, one for each of my boys and for myself. It seems that each kit has a different uno board and mix of io stuff. The uno ide downloads and runs on the pi 4. I will work through the exercises for the io devices. Looks like fun. In 1996 I built a vending machine using a z80 sbc using c and rtos. The most fun of my career. Somewhere around 2011 I discovered atmel and pic chips and I played a lot but it was a very different and pretty basic / crude environment. What is available today, hardware software and internet makes for a better experience. I have you, dronebot workshop and lots of others to learn from. As I mentioned previously, I got back into this in order to build a little widget potentially to sell. It is way easier this time around.
@@RalphBacon lol I hear you. I drive a truck because my brain is slowing down. I am building a widget which I want to assist me with sliding the tandems on the trailer. I have to do it twice for every load. It is a very imprecise process which requires precision. In and out of the truck several times getting the tandems where they need to be. The device is intended to allow me to reduce or eliminate all the times I climb in and out. It does not sound like a big issue until it is pouring rain and I still have to do it. Or it is 30 below zero and I still have to do it. It's something that I want to make my life easier. Beyond that, if any of the other six million (us) truck drivers want to buy it I'll be happy to take their money.
The red FTDI dongle uses a fake ft232r chip. You can tell by trying to use the proprietary FTDI Chip Utility -"FTDI Prog " In one instance I had the need to invert the Rx and Tx lines for updating the FW in an 2.4Ghz RC receiver made by FrSky, a very well known maker, and found that I had placed a little too much faith in the Aliexpress vendor. I could not modify these variables at all. And their answer to my questions about lineage was " well what can we say,.. it is all made in China" .....such unabashed honesty! :-) You have to spend $10 for a proper one. But for many applications I believe the knock-off will work just fine. As for the ZIF programmer, vundabah ! Bravo!
Agreed, and my look to camera at that point in the video should have given the game away that I was saying it all very tongue-in-cheek! The FTDI FT232RL chip alone costs $3 so a genuine FTDI programmer cannot be had for less than $6 - $7. But now that FTDI-gate is behind us, and no more bricked chips, the 'cloned' or 'alleged fake' ones work fine too, just as you say, Chris. Unabashed honesty from our Chinese resellers, indeed! Glad you liked the ZIF programmer, that's pretty cheap (about the price of a cup of coffee, or have I already said that?)
Ah! I’m glad that I’ve watched this video. I’m using a stand alone chip, the 328p (although some 328pb chips have arrived and I’m now going to use your pcb, thanks again). I’ve been having problems getting it working, although I’ve not been able to test it for over a month, due to being busy. But I may have over written my bootloader with the sketch, although I did not use that hat for the uno, just directly to the breadboard and chip. Interesting. Once the hat arrives, I’ll have to check that out and see if that is the case.
If you write a sketch to a bare chip using ICSP (so not via the USB method, using an FTDI USB-to-Serial adapter) then you will definitely overwrite the bootloader. And, frankly, good riddance on standalone circuits as they just add a layer of complexity and delay. But you can re-add the bootloader again using ICSP and then use the USB method to upload the sketch if that is your preferred way. Glad you got the PCB and will use it, quite interesting using a 328PB, very powerful but you run out of analog pins quickly (as that is where they have added the extra functionality)!
Ralph S Bacon thanks for the advice, Ralph. I’ve got all my bit to program now, the shield etc and I’ve just soldered a 328pb chip to the pcb. Now lets have a dabble. I put it onto instagram and hash tagged your name, hope you dont mind. Not sure if you are on the platform.
comment from the future: Quick ... go order some AVR now .. in 2 years all stocks will be missing and you'll have to wait 1 year for refill 😭 Great video btw !!!! Thank you !
Ralph, I am working on a project that will run on a ESP12E (or F) and I am using a NodeMCU board to test my code and hardware. But, when I finalize it, I'll have a PCB made for it and I literally don't have enough space to put a NodeMCU on the board. So, I want to put a barebone ESP12F module which is a lot smaller. I also want to include a programming header for initial and further code uploads, so, I have been researching on how to program a barebone ESP12E using an USB to serial adapter like FTDI FT232 (apparently both DTR and RTS are needed to put the ESP12 in auto program and reset after upload is done, this can be done with a CH340 too, as it is done in NodeMCU but I have a lot of FTDI boards at hand) There is a bit of external hardware like 2 transistors and etc. needed too. I think this can be a good subject for a video like this one. I am including links for a barebone ESP12 and a schematic I found for you to look at. I am sure I will figure it out myself but I would love to get your input too on this. raw.githubusercontent.com/nodemcu/nodemcu-devkit/master/Documents/NODEMCU_DEVKIT_SCH.png www.aliexpress.com/item/32633529267.html
You're dealing with the same issues as me, Bora, with my new Arduino Uno Plus ATMega328PB board! Do you include the complete CH340G circuitry or just expose the necessary pins to be able to program it, that's the question? Well... In your case, you need to connect RST, GPIO with those transistors *on your PCB* . GPIO0 must be brought low to program hence VT2 in that diagram. It interacts with the RST pin, hence VT1. The bases of those transistors need to go (via the 12K resistors) to DTR and RTS pins on your board. You do need to include the two resistors R10, R12, 470 ohm in line with the RX and TX lines though, on your PCB, and bring those out to RX and TX pins on your board. You will also (probably) need VCC and GND (NB 3v3 device!) brought out to the pins on your board. So now you have a six pin VCC, GND, RX, TX, RTS and DTS header on your project board ready to plug into the USB-to-Serial converter (FTDI, CH340G, CP2102 etc) of your choice, over USB. Make sure they are in the same order as the device you're programming with and it will just plug in! You definitely need to prove this on your breadboard before committing to PCB though! Perhaps I ought to include this when I do the follow up video to Flashing Your ATMega328P? Final thought: if this were my project (it isn't, I know) I would seriously consider use of the ESP8266 D1 Mini that I used in my Home Alone project. It's small, you can plug it into two header strips and it has all the USB circuitry on board. Have you considered this? It's not going to be much bigger than the ESP-12 especially as it can sit _over_ the board with some other components underneath it. And it 'just works'.
The dearly beloved rejected my change request to install a cat flap in the airing cupboard door, can't understand why. And it is held close by a sprung latch so Benny isn't strong enough to push it open. This way, using an ATMEGA328P I get to play with PCBs, solder up a board, do a video - I mean, Jyv, where's the downside?
@@RalphBacon the sprung latch can be disabled and the weight connected by wire at the top of the door would pull it closed, but she who must obeyed : dilemma ...
Ralph use Diptrace as rocks if pin count is low. Pulled the trigger on a JLCPCB order whilst your video was playing. Personally not getting on with Kicad, so need to look again. We all have choices and makes the hobby fun - again I would say.
I've never used DipTrace and have no reason not to think it's great but it's not cheap is it, Michael? Luckily, there is a *freeware* version (not hobbled, but limited to 300 pins - not sure what that means, chip pins?) but you can't then use it commercially. Not a problem for most hobbyists. See diptrace.com/download/download-diptrace/
To be fair, Ted, this was aimed at experienced beginners who at least understood the bootloader loading (see my previous videos on this) but I am very sorry you found it confusing. When I do my next video on this subject I will do my very best to make it much clearer. Thanks for the feedback, always good to know where I can improve.
Certainly some do Ed, not sure if it increasing but it would not surprise me as they are trying to sell in a very competitive market. I'm trying to order a different programmer just to see what it does, but the shipping is more than the device itself. Feels wrong to me.
@@RalphBacon true. Also if there is a dispute, at max you only get the cost of the product returned, not the shipping cost. Another trick o e sees is that a product t shows up as very cheap.... but that then turns out to be only a connector or something
I've seen that recently. $5 item with $33 shipping. Makes me wonder if the item has a $35 price tag and is priced so as to keep it close to the top of a "cheap stuff first" list.
@@Ed19601 I tend to primarily choose AliExpress Standard Shipping mainly as it's very often trackable from the Finnish post office site after just few days. But I've learned it also has the property of AliExpress receiving/handling the disputes. I don't know if I'm lucky or not but I've only had to do a dispute on around 2-3% of my purchases. Usually it has been a single item missing on a multiple item delivery. From the disputes I've done, more often than not I've been refunded for the shipping cost with the same shipping method + the cost of missing item.
Those USBASPs are something like CP2102s to me: you buy as many as you think you need and then at least 2 more so they can stay connected to the different projects for some time (which lead to me having more than 10 CP2102s and 4 USBASPs XD ). I have one USBASP for example where I stuck *pogo pins* into the 6-pin adapter. That way I can easily program those small boards by just pushing the adapter against the pads of the ISP without needing to install a pinheader at all. Programming is a 15 second job with that, although 3 hands would sometimes be nice in that case ;) . Pick pogo pins that are pointy, but at the same time have a tip wide enough so they can't go into the through holes. I think I got P75-E2 shape. The names seem to be somewhat standardized; P75 meaning the pin shaft is about 1mm diameter and thereby fits into the adapter and E2 being the tip shape, in that case being conical. I think I have one Arduino board left that still has the bootloader for testing purposes when I develop stuff that other people will need to flash onto Arduinos. But the bootloader is gone on all others. I don't see any point to it as soon as you got an ISP programmer. One of the main reasons for me is actually that you don't have to share the serial port with the programming of the chip. Arduino's serial monitor is a joke (as is pretty much the rest of the "IDE", which is why I use platformIO). I use a standalone terminal program (hterm). But having to disconnect there to free up the COM port, then programm the chip in another program, then reconnect the terminal is such a hassle that I rather use ISP for that reason alone. And because I often use "Arduinos" that don't even have an USB-to-serial chip in them in the fist place (like the pro minis), I'm so used to ISP that it's actually more difficult for me to get the programming via bootloader going ;) . Do you know of GUIs for avrdude btw.? I use AVRDUDESS for all the things that aren't easy to do from an IDE (like check/set the fuses, read back the EEPROM). Another thing many of those USBASPs come with old firmware. I suggest updating it in case you get some errors from avrdude that mention setting a clock.
The USBASP that I have uses a PIC18F25K50 microcontroller; I don't know if they are all supposed to have this or whether any one would do as long as it provides the functionality. I like the idea of a pogo connector but I've always been put off by the price but you've now given me a nudge to look into them again, thanks for the heads up! Finally, I often use the native (command line) avrdude to program fuses; perhaps I should include this method when I delve deeper into programming Arduino-type chips.
@@RalphBacon Are you sure you got an USBASP? The USBASP firmware is written for an atmega8/88 and not PICs. That's why you can use one USBASP to update the firmware on another one.
Hmm, the first one I picked up to check was, in fact, for programming my new ATMega328PB board from Pololu. But it certainly contains a PIC chip as the microcontroller. It says it's a USB AVR v2.1 (not a USBASP) but those terms seem synonymous (on most websites I've seen anyway).
@@RalphBacon No, they are definitely not synonymous. The dongles look very similar (they aren't much more than a micro with an USB connector after all). But they work differently and you have to select a different programmer with avrdude ("-c" option). The additional com port of the USB AVR looks like a nice feature though, saves one USB cable (I had cases where I had all seven ports of my USB hub in use at the same time).
Great explanation. For that kind of money it has to a fantastic cup of coffee :) Any way i will be ordering a set of those boards very soon, might need them some day I wonder if there is a bord or adaptor for the flat pack?
OMG, Flemming, tell me where you buy your coffee (other than the supermarket). Here, in the not-so-sunny UK, Costa Coffee sell me a soya latte for £2.65 which is $3.26. God forbid you should want a Gingerbread Frappe from Pret (my favourite), as that will set you back £3.45 which is $4.24 - more than enough for an Arduino programmer certainly. And which you get to keep it for longer than the 20 minutes it takes me to glug down that yummy frappe! Yes, I researched all this before I dared say that we could buy these wonderful devices for the price of a cup of coffee! Ha Ha! But as you are ordering a couple of devices I guess you have also been convinced of their value, just like me. Not sure what you meant by the flat pack... I feel stupid now.. did you mean the ATMega328PB board, no USB socket?
@@RalphBacon LoL -that just show my expertise on coffee prices. You do good research, that's part of why your channel is great -thank you. I don't usually buy coffee , i much rather spend the money on those great thing you show us. -yeah a cheap low blow but sound good in danish :) The flat pack, i ment the ATMega chip in a SMD housing. I know, it would be an adaptor on an adaptor on an adaptor ...........
@@RalphBacon I think i found an adaptor I went looking for something like this : www.banggood.com/SOIC8-SOP8-To-DIP8-EZ-Socket-Converter-Module-Programmer-Adapter-With-150mil-p-937407.html?rmmds=myorder&cur_warehouse=CN Didnt find anything so far Then i found this : www.banggood.com/PLCC32-To-DIP32-Programmer-IC-Adapter-Socket-for-Arduino-p-1416448.html?rmmds=detail-left-hotproducts__10&cur_warehouse=CN Enjoy your coffee :) lol
That is so very interesting and pertinent to what I am doing I've ordered a couple, thanks for the heads up, Flemming. In due course they may make an appearance in one of my videos.
You said you can use the USBASP to load onto the flash of the Uno. If you have one of the older style Unos, with the socketed DIL ATMega328P, can you program that Atmel via the the USBASP, and then remove the IC from the Uno socket and use it as a standalone chip in your builds?
In a word: yes. But in my designs with "standalone" ATMega328p chips I always create the ICSP socket so I can flash directly to the finished product. Of course, if you are using those pins (mainly SPI) then it may not work.
The ftdi programer, I installed the pins on the sides, now when I program certain ESP32 boards that require 5 volts to run but have only 3.3 volt tolarent input/output pins, I can plug in the 5 volt to vin to run the board, while having the FTDI chip set at 3.3 volts to run the software and protect the I/O part of the board. My new ESP32CAM board is like that.
Sounds great, Jerry. You should post pics somewhere of all these things you do. Sharing is caring, as they say. Sharing is also a lot of work, so it's merely a hint of a suggestion.
Hi Ralph Thanks for all your great videos. I've been following your video on burning ATMega328P chips. When I plug my AVR ISP Shield on to the uno I noticed pin 14 of the zip socket shorts on the casing of the usb connection. Is this usual?
I'm assuming you have a genuine Arduino UNO with a full sized USB socket, Doug, is that right? It's not supposed to do that. Either use a clone UNO with a micro USB socket or try a stiff piece of card on top of the USB socket to prevent shorting. I've just checked and my board also has a full-sized USB socket but the ZIF socket misses that socket by about 0.1" (2mm) - but it's close! A piece of card between the two boards will prevent you pushing the shield too far down and should do the trick.
@@RalphBacon Many Thanks Ralph. I'm using an genuine UNO with a full size USB socket. I'll ad a piece of card. Thanks again for great videos. I'm going to launch myself into EasyEDA. Best regards
Hi Ralph, Iove and have enjoyed a few of your videos. I have a question about this video... The breadboard in the video seems to be special... it seems to use some sort of pins? did you buy this or build it yourself... Do you have a source for the pins? I am building a special Arduino Breadboard system that will almost totally eliminate those pesky jumper wires... and your breadboard looks like a good complement to my development. my cicuit boards are in production right now...
Did you mean that (sort-of) transparent breadboard, James, or something else? The transparent breadboard is not great. The larger ones I now use (and which are great, which explains their higher price) are these AD-11 ones: coolcomponents.co.uk/products/ad-11-advanced-solderless-breadboard They are comparatively 'great' because so far (I have 3 of them) I can get the components into the holes without struggling or bending the component legs. Regarding the 'pins' you mention I suspect you mean these breadboard jumpers amzn.to/3HZPGkU although I have to admit I've bought similar ones for a quarter of Amazon's price from the likes of AliExpress. If you get your breadboard system up and running don't forget to share!
@@RalphBacon I was referring to the transparent one that I saw in the video, I found your other video about breadboards and realized that it was using the same kind of contacts as other boards. I was looking for a different contact like a solderable pin similar to what you find in a dip ic socket, but larger guage than the typical ic leg. I will definitely share my breadboard system with you when I get further along... My design is to use minimal dupont style jumper wires in the breadboard area... to keep it easy to see what is going on ... I am having simple logic testers on each of 29 rows on both sides of the breadboard with 15 common contact per row on each side of the divided sections.
Ralph, I have a question and I kind of know there may not be a single correct answer to that. So I want to a few simple projects using ATTINY13A chip. No bootloader required no serial of course. Can I still use that red AVR ISP Shieldy thing or am I best off using one of those USB to ICSP boards for programming the chips.
Good that you are not trying to get any kind of bootloader onto the ATTiny13A as there just isn't room. Even if there were then there would be no room for your sketch. The "red shieldy thing" that I show now and again is fine for uploading via ICSP (you could even use the Arduino with the ArduinoISP sketch without the red shieldy thing) and you use nearly all the pins on the ATTiny13A to program it. Best to get a tiny adapter for the ATTiny13A so you can plug in a proper ICSP cable otherwise it will be very frustrating and error-prone to upload a sketch. I'm not sure to what you're referring when you say USB-to-ICSP board - got a link?
4:41 I have exactly the same shield from Ebay. But I could not get it to work without a 10uF capacitor between ground and reset of the Arduino Uno. If you search on the Internet, some people can use the "Arduino as ISP" without this capacitor, some people not. I never found out why. This would be a perfect video, if you could find out what is going on here. Must I sing a special Arduino song when I press the button "Burn bootloader"? ;-)
The reset line of the chip to be programmed or the reset of the atmega of the Arduino below it? If it's needed on the programming Arduino it would be really weird because its reset pin has got nothing to do with it being used as an ISP programmer.
You might have to hit the reset button on your host micro when the Arduino IDE show "Uploading..." in the console log. The capacitor generates a small reset pulse which simulates this button push
@@azyfloof The capacitor is on the Arduino that is used as a programmer. It is not for generating a reset signal but for avoiding it! If the programming Arduino gets a reset it restarts the software for the programming and the whole programming fails. The question is: What does generate this reset signal? My guess is that the Arduino IDE does not know that in this special case the Arduino is used as a programmer and wants to reset the Arduino to run the program? Maybe is depends on the version of the Arduino software? The whole problem is weird - computers should be deterministic, or not? ;-)
Perhaps the Arduino as ISP sketch is slightly different to the Open Smart one and behaves a little differently? Have you tried the Open Smart version and see if it makes any difference?
@@birnodin You do use "upload using programmer" and not just the normal "upload" button, right? And you also have the correct port and programmer selected? It sounds like you are doing a normal upload where the Arduini IDE pulls a pin low on the USB-to-serial converter to create a short reset pulse (through a capacitor). The big capacitor you added means that the pulse can no longer go low enough to reset the Arduino (that is supposed to be the ISP programmer). Other than that, if i is really hardware related, maybe the shield is connecting something back to the programming AVR's reset pin (which it really shouldn't).
Great video, and very topical. I'm in the process of tying together a USBasp, PlatformIO, and a DIY version of your OPEN-SMART module. All this to put some better infrastructure behind my AVR programming. The one question I have concerns the use of the 16MHz crystal. I've gathered that we are able to program the atmega without the crystal. Do you know if the processor could then be plugged into an applications that employs the crystal (program without xtal, run with xtal), or would I have to change the fuse in between. (the program being uploaded would be 16MHz compliant of course)
The clock source you set with the fuses has to be present to program and run it. If you set the fuses to external crystal/clock but there is none, you won't be able to program the chip anymore. If you set it to use the internal oscillator it will use that no matter if there is an external crystal or not. What I did not try is if you can set the clock fuses to external and still finish that single programming session even though there is no external clock.
Yes, indeed Dale, that's caught me out a couple of times, wondering why nothing is running and then remembering I haven't change the fuses to the internal oscillator. Which is why there is a 16MHz crystal on the Open Smart shield, so you can _always_ program the device. Assuming the device is running on an external Xtal and you flash it to run on the internal oscillator, it will do this on the next reboot. Ditto, vice versa. On this subject, I'm not convinced that running on the internal oscillator is so great. It's not that accurate for one, saves no power to speak of, and saves at best 3 components (just 1 if you use a less-accurate resonator). Although I've designed a few boards now without the Xtal, the jury is still out on that topic.
@@RalphBacon thanks for confirming my thoughts. When I get my chips in I'll do some extra poking about. I am working on a programmer that would allow me to load ATTINY85/84/861s as well as the ATMEGA328. This doesn't leave a lot of free real estate on my board for extra components, and I'd prefer to keep the xtal close to the MEGA (should I choose to use it :). Thanks for your reply and thanks once again for your informative and thought provoking videos.
Hi! I have purchased a few Atmega328p with bootloader installed already with 16MHz as I am working a stand alone project and want to use the Atmega328p instead of dedicating a whole arduino board to the project. You said you can flash the fuse to 8MHz as my project will be not using a crystal. How do I do this? I am okay with attaching the chip to my ardunio and programming it then detach it and solder it to my board. Can someone advise? I am very very beginner so please explain like i am 4 :) Thank you
You can certainly do it that way but you will need a crystal and two caps to run at 16MHz. to run at 8MHz using the internal oscillator you will need to change the fuses. Use the device I show here, I still use it all the time.
@@RalphBacon yea i bought one. I dont know which fuses to set as i have tried the calculator, but i dont know which ones to set :( so using the device seems mich simplier thank you!
@@RalphBacon so im using the device shown here. And I was able to send the uno the sketch, but after attaching my new avs isp and setting the board and programmer as ardunio as isp then clocking bootloader, it fails Using Port : COM7 Using Programmer : stk500v1 Overriding Baud Rate : 19200 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03 avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x66 avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0 avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x66 avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0 avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x66 avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0 avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x66 avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0 avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x66 avrdude done. Thank you.
@@pouncerminned863 You have loaded the Arduino as ISP sketch on your other Arduino in the usual way? Then you are using _that_ board to program another Arduino (chip) using Arduino as ISP - not just Upload but Upload Using Programmer?
I have a question about LCSC - I need a very niche component, which they seem to have in stock. I only need one or two of them, what are their shipping rates like to the UK?
Shipping is always going to be the most expensive part of the order, Mahla, although if you don't choose a fast courier such as DHL ($24.76) or FedEx ($25.42) then it will be cheaper. From LSCS you can choose from Royal Mail ($3.75) or even DHL eCommerce for $5.70. That all said, it would be a very good idea to stock up on lots of components at this point because they are very, very cheap and hardly make a difference to the postage. I hope this helps!
@@RalphBacon Thanks for that. I don't need the parts in a hurry and RM, though more expensive than Ebay is faster and using LCSC means I get precisely the part I want, rather than taking a gamble. (The chip I need has two 48qfn packages that differ only slightly in size - Ebay sellers seem to be vague on that). Either way it's better than and less hassle than Farnell or Mouser - no account required and no minimum order quantity as well as being significantly cheaper for parts. As you say, it makes sense to load up on parts to offset the postage costs. I'll give them a go (using your discount link, natch :D ).
Looks great; I wonder how easy it is to set up and actually use? Let us all know when you've completed that little task, hey, John! I've bookmarked the link so I may look at it in due course, thanks for the heads up.
@@RalphBacon it's a pita. I'm still working on it. Just looking for something that allows debugging. I understand that the one you use allows debugging. And from your comments is a pita. 😁
It is good you are addressing this subject! Plainly, too many folks feel married to their Arduino boards. I had an unhealthy obsession, making AVR ISPs, with mostly Atmega8a's, as they are inexpensive ($0.50) You need a 12mhz crystal to use the pre-built binaries, if you want to make one of these yourself with a Mega. www.obdev.at/products/vusb/usbasploader.html The original docs call for the 10-pin interface, which the Chinese copied without question. Most home hobbyists use the 6-pin interface. It is possible to do serial debugging through the 10 wire interface, but a special patch is needed, as well as a special serial-debugging client. Have done it, but it is a lot of trouble. More compact, and perhaps easier, is to use a Digispark with Adafruit's USBTinyISP code. Fuse-ing out reset, of course, because you need that 4th output pin to pull the target's reset low.
Yes, I'm hoping that my viewers will see there is nothing magical about an Arduino Uno/Nano and that they can build projects using the same chip. Takes a leap of faith, some dedicated practice, but it is sooo worth it!
@@RalphBacon I use my AVR, ESP, and STM32 MCU's without commercially-made programmers ... but have yet to figure out if there is a way to do this with PICs. Any advice?
or if you buy some cheapy cheap nanos off ebay from china that are missing bootloaders... you'll need to program them too. that drove me nuts when I was a noobie.
Probably a good idea to _always_ replace the bootloader anyway, Scott, to ensure you are using the small Optiboot one, and you can change the fuses (eg BOD, Erase EEPROM etc at the same time).
Now, Brian, you and me both understand that the circuit diagram is a schematic. When I used to design databases for a living, the Schema was the logical database design, quite different from anything electronic! Fine. Unfortunately, KiCAD insists on calling it a Schema (the program is even called EESchema). But EasyEDA gets it right. Chinglish is what we must accept, these days, it seems. Go with the flow, roll the dice and other nonsensical sound bites...
@@RalphBacon I did wonder if XML and Db were part of your brain, making "schema" come out by mistake. My brain has similar problems after many years of embedded and assembler programming. :-) But for the beginners, surely we owe it to them to be accurate and precise with our terminology. (One of my bug bears is others on YT who seem oblivious to the difference between energy and power. And the even more exasperating ones who use "amperage" and can't distinguish that from power either. Grrr) On a helpful note, perhaps a video about the bootstrap with diagrams of memory layouts etc. would be helpful for those trying to get a handle on options other than the pure Arduino IDE world?
OK, what do you want? Seriously, I have lost some weight, but it always shows in the face first before coming off the middle. But you're pretty close, thanks for noticing!
I always like to think that my videos are informational first and foremost, and if there is an element of edutainment in them so much the better. But you obviously don't like my style, which is fine, everyone is different, so we'll agree to disagree and part ways.
@@RalphBacon hi Ralph didnt mean to offend but i like your vids in general , but i was looking for info on bootloading atmeg328p au 32pin surface mt they not easy ,cant find anyone that has a full go to wo on bootloading them " THAT WORKS"
Hi Ralph, I've been away, but always good to get back and find you've uploaded!...This particular topic is great, you demonstrate all the options like what package should I chose and do I need a bit of extra memory and leave out the bootloader, also how many different hardware options you have, and you have explained the two methods of uploading a sketch, which are SPI and UART, and now as you point out it's now possible for us to design boards just using the "chip" itself, which is great fun (most of the time!) I have just sent an order off for 10 more of my own TQFP 32 pin breakout boards (JLPCB) which now have pads for the decoupling caps (VCC and AVCC) and also optional LED's on the power and PB5 (arduino pin 13) I used the JLPCB voucher that you that you gave away and the whole lot came to £3.20p delivered! so in about 10 days I will be getting my Hot Plate out and doing some more SMD work. Will E-Mail those pictures of my humble set up to you for your opinion...Cheers and I look forward to the next Vid's.
I'm looking forward to the pics already, Andy, I'm glad the voucher game in useful. I'm bowing to my viewers' requests and I'm just doing an absolute beginners' video on Schematic to PCB using EasyEDA, LCSC and JLC as the power of those three should not be underestimated for the beginner. Trouble is, it's 60 minutes long, I shall have to split it. Drat.
Yeah a new Ralph video is always garantees a good watch!
Great video AGAIN! Every day is a school day. I wasn't aware of bootloader been wiped off via ISP programming. Thank god the one I ordered about a year ago didn't work lmao. 🖥️🔨
Your public showing of your first PCB was brilliant. Look at all the help your followers through your way!
Love how your working so hard to help your channels mascot (Benny) 🐈
I had loads of help and pointers regarding SMD soldering and PCB design, Gordon. I'm always amazed at the breadth of experience out there, and the willingness of people to help their peers. I look at my first PCB now and don't cringe quite as much as maybe I should, as I know what I did, what I did wrong, why it was wrong - in fact, they say you only learn by your mistakes so I learnt a whole encyclopedia of how (not) to design a PCB! Benny sends his regards, he hates the colder, wetter weather, he's definitely a warm weather creature!
Putting the meaning of commonly used acronyms in was a nice touch, thank you!
Glad it helped!
Hi Ralph love the videos, how PCB design and production has moved forward. I used to work for a PCB company designing PCB’s, we used black tape at 2:1 then photography to reduce it to exactly 1:1 size. Double sided boards where designed using Red and Blue overlapping tape then using photography method to separate both sides of the board to produce a Positive and a Negative.
The silk screen and solder mask was designed using Black tape and the letters/numbers we used letraset, the production another story, a little bit of history
That might explain, then Keith, why PCB traces on the front and rear of the PCB are red and blue respectively by default on most PCB CAD programs? Yes, things have moved on, and now is the time to take advantage, ditch the stripboard and make it look professional. I mean, for the price of a cup of coffee you can get 5 PCBs. Oh, I've already used that analogy, I must think of another cheap item we all buy regularly, almost without thinking of the cost.
Keith, I remember going down to the Acorn drawing office in early eighties to see such things being made for the likes of the BBC Computer and the Electron. Simpler days in some ways.
Brian Cockburn My first introduction to CAD was on a BBC micro, program loaded from a tape drive not very successful
@@keitholiver3981 As an Acorn employee I had a much nicer time of it. I don't think I ever loaded anything from tape, ever. But I know people who did and I've seen the psychological damage. I was involved with Econet so I had other problems. And we also got access to the tech early, sometimes even before it worked properly, which was a boon and a pain. I've been the one with a bucketful of EPROMS going round saying "Can I change your ROMs please?" as well as having co-workers doing the same to me. Not only were we eating our own dogfood, but sometimes before it was properly cooked. en.wikipedia.org/wiki/Eating_your_own_dog_food
I used OrCad in the 80s (at work) but after routing I wire wrapped the little projects I was building.
I got an Open Smart one today. This video is a massive help.
I paid £4.40
I'm sure you will find it indispensable in your development work, Richie. Mine's a permanent fixture on my workbench these days!
@@RalphBacon I'm a beginner and learning fast. Probably because of my engineering background in precision machining. I also have the FTDI232. Due to your tutorials, any projects I make will be easier now. I am also just about to learn about the ATTiny85, got some in stock.
Please by all means take us to the next level with the IDE!
Regards
C
Will do, that's the plan, anyway!
Not so long ago In circuit serial programmers used to be expensive. I think it also allowed you to debug your program "emulator" comes to mind. With a bootloader you could skip the cost of one of those. I have been following your series on low power, stand alone videos and they have been absolutely awesome. It segways right into designing your own boards so the Kicad videos go hand in hand. You have a good insight into what does matter as far as content that is needed. Most of my projects are battery powered so a normal arduino board is going to be just for prototyping as you have explained. Thanks for taking your time to do this. I think you are an awesome engineer.
You are very kind in your assessment of my skills, thank you. I'm building a couple of battery powered devices now, so this Real World experience sort of spills over into my videos! Mainly, that means I make mistakes like everyone else, and am not too afraid in washing my dirty laundry in public, as it were, as sometimes videos make it look sooo simple when in reality we all have hurdles. Thanks for posting, Joey, appreciated.
I've been using EasyEDA for my first attempt at designing a PCB. I've started over about 6 times and I'm finally getting something that actually looks like a circuit diagram. Just getting ready for the 7th do-over now because I've realized I need a 6-pin header for the ICSP connection.
It's a simple circuit really. An Atmel 328P DIP and your MOSFET circuit from video #123 that allows the 328 to power itself off. Plus an NRF2401 radio module.
I think if someone were to see me working on the diagram they would say something like, "hey, you there! Stop fapping about with things you don't understand before you hurt somebody!"
Oh well, at least I won't need a canned laugh track because I'll have the real thing.
Waiting for the nickel to drop.
Thanks Ralph. I'm looking forward to your step-by-step demonstration.
Simple, as a first step, is good, DIrk. As you all saw, my first PCB was a discrete component multivibrator (flashing LEDs), as it was the entire process I had to learn not create NASA on a PCB! As you are using EasyEDA (still my favourite CAD) if you ensure you pick your components from the LCSC Assembled (Basic) list you can even get them to build it for you. Even if you want to build it yourself (yes, some hobbyists want to do this) at least you can buy the exact components you need from LCSC, which is what I'm doing right now!
Five years ago I made my own programmer. ZIF socket, 8 dip socket, crystal , 10uf cap, leds, and neopixel. So I can program 328p, or attiny85. I made it on a arduino proto shield.
Excellent work. 5 years ago? Hmm... maybe now's the time to get one of the ones I showed, very good?
@@RalphBacon I use ftdi and ftdi clones. I have tl866a also. I wasn't able to get the usbasp to work .My spi programmer is awesome. I also have the adapters for 328 tqfp and attiny85 smd . I should make a video of my programmer.
Do so, then we all learn something or least have the seed of something planted in our subconscious!
Funny enough I've just received and built one of the PCBs I designed and had made for my ATTINY programming sheild for the 8/14/20 pin ATTINY processors I want to play with :)
Its incredible what you can do with this "tiny" microcontroller.
I'm having big problems getting an ATTiny167 to accept ICSP programming. Getting chip ID of 0x0000000 or 0xFFFFFFF all of which indicate it is not reading the chip, hence my wiring is not correct. But I've gazillion-checked it all (and redone it) so I'm beginning to suspect the chips!
I think coffee is way to expensive outdoors these days. But than. I was at a place once where a bottle of water was more than a can of beer. What a world.
I could not agree more, Hans. In fact, everything is too expensive when out and about.
I remember those far off days when a programmer (usually for a PIC back then) was something you plugged into your computer's printer port. How times have changed for the better.
Still got one, pic start plus...... still hate the fuse work, it's configuration bits.8-) fuses were for pal's. Still a nice range of options for programming. Boot loader is getting in the way on a project, I want to set bits as soon as power is applied but the boot loader seems to be creating a delay. Maybe I'll need to go back to a pic as you always know the first line of code is the first bit to run and no delays. Still a nice vid Ralph.
I remember using the parallel port for programming something at some point, but that's all I remember. I think it was a one-off thing where I had to flash a device I had no programmer for.
@The Embedded Hobbyist If you do not use a bootloader in your Arduino project, then the code runs instantly on power up, no delay, just like a PIC. I'll be re-emphasising the ICSP vs USB method of uploading in a future video.
I was using a serial port... 👍
@@jwcolby54 Actually, I still have a PIC Programmer for the serial port too but no computer with a serial port. It is gathering dust in a drawer.
Ole Ralphie bounces around board houses as he is a hot commodity. Haha lately it seems like you support one than the other then back haha
Lots of quality products out there, Joey!
I love your content. I have two young men, my son and his best friend whom I have watching your videos to get up to speed on this stuff. And I eagerly await the "how to make a pcb" videos. I hope to build a little business selling a specific widget which will require making a pcb. Anyway, good stuff.
I may have already mentioned somewhere in my channel, John, that to be "good" at anything requires about 1,000 hours of actual use (apparently). To become an _expert_ about 10,000 hours. Luckily for us, we can create a passable PCB without about 20 hours of dedicated practice, so keep tuned, I do want to show everyone the easy steps to make one.
@@RalphBacon I play the bass. Believe me I understand the 10000 hour rule.😁
@@RalphBacon awhile ago I purchased a raspberry pi 4. I just purchased one each of the starter kits from elegoo, one for each of my boys and for myself. It seems that each kit has a different uno board and mix of io stuff.
The uno ide downloads and runs on the pi 4. I will work through the exercises for the io devices. Looks like fun.
In 1996 I built a vending machine using a z80 sbc using c and rtos. The most fun of my career.
Somewhere around 2011 I discovered atmel and pic chips and I played a lot but it was a very different and pretty basic / crude environment. What is available today, hardware software and internet makes for a better experience. I have you, dronebot workshop and lots of others to learn from.
As I mentioned previously, I got back into this in order to build a little widget potentially to sell. It is way easier this time around.
Good luck with that this-time-next-year-I'll-be-a-millionaire project.
ruclips.net/video/qp5hxHPlTq8/видео.html
@@RalphBacon lol I hear you. I drive a truck because my brain is slowing down.
I am building a widget which I want to assist me with sliding the tandems on the trailer. I have to do it twice for every load. It is a very imprecise process which requires precision. In and out of the truck several times getting the tandems where they need to be.
The device is intended to allow me to reduce or eliminate all the times I climb in and out.
It does not sound like a big issue until it is pouring rain and I still have to do it. Or it is 30 below zero and I still have to do it. It's something that I want to make my life easier.
Beyond that, if any of the other six million (us) truck drivers want to buy it I'll be happy to take their money.
The red FTDI dongle uses a fake ft232r chip. You can tell by trying to use the proprietary FTDI Chip Utility -"FTDI Prog "
In one instance I had the need to invert the Rx and Tx lines for updating the FW in an 2.4Ghz RC receiver made by FrSky, a very well known maker, and found that I had placed a little too much faith in the Aliexpress vendor. I could not modify these variables at all.
And their answer to my questions about lineage was " well what can we say,.. it is all made in China" .....such unabashed honesty! :-)
You have to spend $10 for a proper one. But for many applications I believe the knock-off will work just fine.
As for the ZIF programmer, vundabah ! Bravo!
Agreed, and my look to camera at that point in the video should have given the game away that I was saying it all very tongue-in-cheek! The FTDI FT232RL chip alone costs $3 so a genuine FTDI programmer cannot be had for less than $6 - $7. But now that FTDI-gate is behind us, and no more bricked chips, the 'cloned' or 'alleged fake' ones work fine too, just as you say, Chris. Unabashed honesty from our Chinese resellers, indeed! Glad you liked the ZIF programmer, that's pretty cheap (about the price of a cup of coffee, or have I already said that?)
Ralph - you are a champion mate
Nice of you to say, thanks for posting, always good to hear from you.
Ah! I’m glad that I’ve watched this video. I’m using a stand alone chip, the 328p (although some 328pb chips have arrived and I’m now going to use your pcb, thanks again).
I’ve been having problems getting it working, although I’ve not been able to test it for over a month, due to being busy. But I may have over written my bootloader with the sketch, although I did not use that hat for the uno, just directly to the breadboard and chip. Interesting. Once the hat arrives, I’ll have to check that out and see if that is the case.
If you write a sketch to a bare chip using ICSP (so not via the USB method, using an FTDI USB-to-Serial adapter) then you will definitely overwrite the bootloader. And, frankly, good riddance on standalone circuits as they just add a layer of complexity and delay. But you can re-add the bootloader again using ICSP and then use the USB method to upload the sketch if that is your preferred way. Glad you got the PCB and will use it, quite interesting using a 328PB, very powerful but you run out of analog pins quickly (as that is where they have added the extra functionality)!
Ralph S Bacon thanks for the advice, Ralph. I’ve got all my bit to program now, the shield etc and I’ve just soldered a 328pb chip to the pcb. Now lets have a dabble. I put it onto instagram and hash tagged your name, hope you dont mind. Not sure if you are on the platform.
comment from the future: Quick ... go order some AVR now .. in 2 years all stocks will be missing and you'll have to wait 1 year for refill 😭
Great video btw !!!! Thank you !
Excellent tip you gave me from the past there Hugo, I've ordered a few hundred thousand. Now I got nowhere to store them.
Ralph, I am working on a project that will run on a ESP12E (or F) and I am using a NodeMCU board to test my code and hardware. But, when I finalize it, I'll have a PCB made for it and I literally don't have enough space to put a NodeMCU on the board. So, I want to put a barebone ESP12F module which is a lot smaller. I also want to include a programming header for initial and further code uploads, so, I have been researching on how to program a barebone ESP12E using an USB to serial adapter like FTDI FT232 (apparently both DTR and RTS are needed to put the ESP12 in auto program and reset after upload is done, this can be done with a CH340 too, as it is done in NodeMCU but I have a lot of FTDI boards at hand) There is a bit of external hardware like 2 transistors and etc. needed too. I think this can be a good subject for a video like this one. I am including links for a barebone ESP12 and a schematic I found for you to look at. I am sure I will figure it out myself but I would love to get your input too on this.
raw.githubusercontent.com/nodemcu/nodemcu-devkit/master/Documents/NODEMCU_DEVKIT_SCH.png
www.aliexpress.com/item/32633529267.html
You're dealing with the same issues as me, Bora, with my new Arduino Uno Plus ATMega328PB board! Do you include the complete CH340G circuitry or just expose the necessary pins to be able to program it, that's the question? Well...
In your case, you need to connect RST, GPIO with those transistors *on your PCB* . GPIO0 must be brought low to program hence VT2 in that diagram. It interacts with the RST pin, hence VT1. The bases of those transistors need to go (via the 12K resistors) to DTR and RTS pins on your board.
You do need to include the two resistors R10, R12, 470 ohm in line with the RX and TX lines though, on your PCB, and bring those out to RX and TX pins on your board.
You will also (probably) need VCC and GND (NB 3v3 device!) brought out to the pins on your board.
So now you have a six pin VCC, GND, RX, TX, RTS and DTS header on your project board ready to plug into the USB-to-Serial converter (FTDI, CH340G, CP2102 etc) of your choice, over USB. Make sure they are in the same order as the device you're programming with and it will just plug in!
You definitely need to prove this on your breadboard before committing to PCB though!
Perhaps I ought to include this when I do the follow up video to Flashing Your ATMega328P?
Final thought: if this were my project (it isn't, I know) I would seriously consider use of the ESP8266 D1 Mini that I used in my Home Alone project. It's small, you can plug it into two header strips and it has all the USB circuitry on board. Have you considered this? It's not going to be much bigger than the ESP-12 especially as it can sit _over_ the board with some other components underneath it. And it 'just works'.
add a cat flap door to the cupboard ...
or add little weight that pulls the door closed but still lets the cat to push the door open
The dearly beloved rejected my change request to install a cat flap in the airing cupboard door, can't understand why. And it is held close by a sprung latch so Benny isn't strong enough to push it open. This way, using an ATMEGA328P I get to play with PCBs, solder up a board, do a video - I mean, Jyv, where's the downside?
@@RalphBacon the sprung latch can be disabled and the weight connected by wire at the top of the door would pull it closed, but she who must obeyed : dilemma ...
Ralph use Diptrace as rocks if pin count is low. Pulled the trigger on a JLCPCB order whilst your video was playing. Personally not getting on with Kicad, so need to look again. We all have choices and makes the hobby fun - again I would say.
I've never used DipTrace and have no reason not to think it's great but it's not cheap is it, Michael? Luckily, there is a *freeware* version (not hobbled, but limited to 300 pins - not sure what that means, chip pins?) but you can't then use it commercially. Not a problem for most hobbyists. See diptrace.com/download/download-diptrace/
For beginners, you leave them *VERY* confused, what to plug-in; when!
To be fair, Ted, this was aimed at experienced beginners who at least understood the bootloader loading (see my previous videos on this) but I am very sorry you found it confusing. When I do my next video on this subject I will do my very best to make it much clearer. Thanks for the feedback, always good to know where I can improve.
@@RalphBacon - NO, not confusing to me, just for beginners. Nice video anyway!
I get the impression more and more shops at Ali charge more and more shippingcost
They have no choice, International postal treaties have been amended to fuck with china...
Certainly some do Ed, not sure if it increasing but it would not surprise me as they are trying to sell in a very competitive market. I'm trying to order a different programmer just to see what it does, but the shipping is more than the device itself. Feels wrong to me.
@@RalphBacon true. Also if there is a dispute, at max you only get the cost of the product returned, not the shipping cost.
Another trick o e sees is that a product t shows up as very cheap.... but that then turns out to be only a connector or something
I've seen that recently. $5 item with $33 shipping. Makes me wonder if the item has a $35 price tag and is priced so as to keep it close to the top of a "cheap stuff first" list.
@@Ed19601 I tend to primarily choose AliExpress Standard Shipping mainly as it's very often trackable from the Finnish post office site after just few days. But I've learned it also has the property of AliExpress receiving/handling the disputes. I don't know if I'm lucky or not but I've only had to do a dispute on around 2-3% of my purchases. Usually it has been a single item missing on a multiple item delivery. From the disputes I've done, more often than not I've been refunded for the shipping cost with the same shipping method + the cost of missing item.
Those USBASPs are something like CP2102s to me: you buy as many as you think you need and then at least 2 more so they can stay connected to the different projects for some time (which lead to me having more than 10 CP2102s and 4 USBASPs XD ).
I have one USBASP for example where I stuck *pogo pins* into the 6-pin adapter. That way I can easily program those small boards by just pushing the adapter against the pads of the ISP without needing to install a pinheader at all. Programming is a 15 second job with that, although 3 hands would sometimes be nice in that case ;) . Pick pogo pins that are pointy, but at the same time have a tip wide enough so they can't go into the through holes. I think I got P75-E2 shape. The names seem to be somewhat standardized; P75 meaning the pin shaft is about 1mm diameter and thereby fits into the adapter and E2 being the tip shape, in that case being conical.
I think I have one Arduino board left that still has the bootloader for testing purposes when I develop stuff that other people will need to flash onto Arduinos. But the bootloader is gone on all others. I don't see any point to it as soon as you got an ISP programmer. One of the main reasons for me is actually that you don't have to share the serial port with the programming of the chip. Arduino's serial monitor is a joke (as is pretty much the rest of the "IDE", which is why I use platformIO). I use a standalone terminal program (hterm). But having to disconnect there to free up the COM port, then programm the chip in another program, then reconnect the terminal is such a hassle that I rather use ISP for that reason alone. And because I often use "Arduinos" that don't even have an USB-to-serial chip in them in the fist place (like the pro minis), I'm so used to ISP that it's actually more difficult for me to get the programming via bootloader going ;) .
Do you know of GUIs for avrdude btw.? I use AVRDUDESS for all the things that aren't easy to do from an IDE (like check/set the fuses, read back the EEPROM).
Another thing many of those USBASPs come with old firmware. I suggest updating it in case you get some errors from avrdude that mention setting a clock.
AVR Studio has its own GUI for programming. Not the modern bloatfest versions but the good old version 4 I still use.
The USBASP that I have uses a PIC18F25K50 microcontroller; I don't know if they are all supposed to have this or whether any one would do as long as it provides the functionality.
I like the idea of a pogo connector but I've always been put off by the price but you've now given me a nudge to look into them again, thanks for the heads up!
Finally, I often use the native (command line) avrdude to program fuses; perhaps I should include this method when I delve deeper into programming Arduino-type chips.
@@RalphBacon
Are you sure you got an USBASP? The USBASP firmware is written for an atmega8/88 and not PICs. That's why you can use one USBASP to update the firmware on another one.
Hmm, the first one I picked up to check was, in fact, for programming my new ATMega328PB board from Pololu. But it certainly contains a PIC chip as the microcontroller. It says it's a USB AVR v2.1 (not a USBASP) but those terms seem synonymous (on most websites I've seen anyway).
@@RalphBacon
No, they are definitely not synonymous. The dongles look very similar (they aren't much more than a micro with an USB connector after all). But they work differently and you have to select a different programmer with avrdude ("-c" option). The additional com port of the USB AVR looks like a nice feature though, saves one USB cable (I had cases where I had all seven ports of my USB hub in use at the same time).
Nice one Ralph
Glad you liked it Mike, thanks for posting.
happy Christmas fella.. hope the move gose ok
Thanks and I hope so too!
Great explanation.
For that kind of money it has to a fantastic cup of coffee :)
Any way i will be ordering a set of those boards very soon, might need them some day
I wonder if there is a bord or adaptor for the flat pack?
OMG, Flemming, tell me where you buy your coffee (other than the supermarket).
Here, in the not-so-sunny UK, Costa Coffee sell me a soya latte for £2.65 which is $3.26. God forbid you should want a Gingerbread Frappe from Pret (my favourite), as that will set you back £3.45 which is $4.24 - more than enough for an Arduino programmer certainly. And which you get to keep it for longer than the 20 minutes it takes me to glug down that yummy frappe!
Yes, I researched all this before I dared say that we could buy these wonderful devices for the price of a cup of coffee! Ha Ha! But as you are ordering a couple of devices I guess you have also been convinced of their value, just like me. Not sure what you meant by the flat pack... I feel stupid now.. did you mean the ATMega328PB board, no USB socket?
@@RalphBacon LoL -that just show my expertise on coffee prices.
You do good research, that's part of why your channel is great -thank you.
I don't usually buy coffee , i much rather spend the money on those great thing you show us.
-yeah a cheap low blow but sound good in danish :)
The flat pack, i ment the ATMega chip in a SMD housing.
I know, it would be an adaptor on an adaptor on an adaptor ...........
@@RalphBacon I think i found an adaptor
I went looking for something like this : www.banggood.com/SOIC8-SOP8-To-DIP8-EZ-Socket-Converter-Module-Programmer-Adapter-With-150mil-p-937407.html?rmmds=myorder&cur_warehouse=CN
Didnt find anything so far
Then i found this : www.banggood.com/PLCC32-To-DIP32-Programmer-IC-Adapter-Socket-for-Arduino-p-1416448.html?rmmds=detail-left-hotproducts__10&cur_warehouse=CN
Enjoy your coffee :) lol
That is so very interesting and pertinent to what I am doing I've ordered a couple, thanks for the heads up, Flemming. In due course they may make an appearance in one of my videos.
You said you can use the USBASP to load onto the flash of the Uno. If you have one of the older style Unos, with the socketed DIL ATMega328P, can you program that Atmel via the the USBASP, and then remove the IC from the Uno socket and use it as a standalone chip in your builds?
In a word: yes. But in my designs with "standalone" ATMega328p chips I always create the ICSP socket so I can flash directly to the finished product. Of course, if you are using those pins (mainly SPI) then it may not work.
Very informative video
I sure hope so, Muhammad, thanks for posting, good to hear from you again.
The ftdi programer, I installed the pins on the sides, now when I program certain ESP32 boards that require 5 volts to run but have only 3.3 volt tolarent input/output pins, I can plug in the 5 volt to vin to run the board, while having the FTDI chip set at 3.3 volts to run the software and protect the I/O part of the board. My new ESP32CAM board is like that.
Sounds great, Jerry. You should post pics somewhere of all these things you do. Sharing is caring, as they say. Sharing is also a lot of work, so it's merely a hint of a suggestion.
FTDI can't burn bootloaders AFAIK.
Great video!
Glad you liked it! Thanks for posting.
Hi Ralph Thanks for all your great videos. I've been following your video on burning ATMega328P chips. When I plug my AVR ISP Shield on to the uno I noticed pin 14 of the zip socket shorts on the casing of the usb connection. Is this usual?
I'm assuming you have a genuine Arduino UNO with a full sized USB socket, Doug, is that right?
It's not supposed to do that. Either use a clone UNO with a micro USB socket or try a stiff piece of card on top of the USB socket to prevent shorting.
I've just checked and my board also has a full-sized USB socket but the ZIF socket misses that socket by about 0.1" (2mm) - but it's close! A piece of card between the two boards will prevent you pushing the shield too far down and should do the trick.
@@RalphBacon Many Thanks Ralph. I'm using an genuine UNO with a full size USB socket. I'll ad a piece of card. Thanks again for great videos. I'm going to launch myself into EasyEDA. Best regards
Hi Ralph, Iove and have enjoyed a few of your videos. I have a question about this video... The breadboard in the video seems to be special... it seems to use some sort of pins? did you buy this or build it yourself... Do you have a source for the pins? I am building a special Arduino Breadboard system that will almost totally eliminate those pesky jumper wires... and your breadboard looks like a good complement to my development. my cicuit boards are in production right now...
Did you mean that (sort-of) transparent breadboard, James, or something else? The transparent breadboard is not great. The larger ones I now use (and which are great, which explains their higher price) are these AD-11 ones:
coolcomponents.co.uk/products/ad-11-advanced-solderless-breadboard
They are comparatively 'great' because so far (I have 3 of them) I can get the components into the holes without struggling or bending the component legs.
Regarding the 'pins' you mention I suspect you mean these breadboard jumpers amzn.to/3HZPGkU although I have to admit I've bought similar ones for a quarter of Amazon's price from the likes of AliExpress.
If you get your breadboard system up and running don't forget to share!
@@RalphBacon I was referring to the transparent one that I saw in the video, I found your other video about breadboards and realized that it was using the same kind of contacts as other boards. I was looking for a different contact like a solderable pin similar to what you find in a dip ic socket, but larger guage than the typical ic leg. I will definitely share my breadboard system with you when I get further along... My design is to use minimal dupont style jumper wires in the breadboard area... to keep it easy to see what is going on ... I am having simple logic testers on each of 29 rows on both sides of the breadboard with 15 common contact per row on each side of the divided sections.
Sorry about that, got the name wrong: www.goldmine-elec-products.com/
Got it, thanks Jerry. I see they ship to both Great Britain and the United Kingdom. Always good to know.
Ralph, I have a question and I kind of know there may not be a single correct answer to that. So I want to a few simple projects using ATTINY13A chip. No bootloader required no serial of course. Can I still use that red AVR ISP Shieldy thing or am I best off using one of those USB to ICSP boards for programming the chips.
Good that you are not trying to get any kind of bootloader onto the ATTiny13A as there just isn't room. Even if there were then there would be no room for your sketch.
The "red shieldy thing" that I show now and again is fine for uploading via ICSP (you could even use the Arduino with the ArduinoISP sketch without the red shieldy thing) and you use nearly all the pins on the ATTiny13A to program it. Best to get a tiny adapter for the ATTiny13A so you can plug in a proper ICSP cable otherwise it will be very frustrating and error-prone to upload a sketch.
I'm not sure to what you're referring when you say USB-to-ICSP board - got a link?
@@RalphBacon Thanks Ralph for a detailed response. I am going build myself little board for programming via icsp as you suggested
4:41 I have exactly the same shield from Ebay. But I could not get it to work without a 10uF capacitor between ground and reset of the Arduino Uno. If you search on the Internet, some people can use the "Arduino as ISP" without this capacitor, some people not. I never found out why. This would be a perfect video, if you could find out what is going on here. Must I sing a special Arduino song when I press the button "Burn bootloader"? ;-)
The reset line of the chip to be programmed or the reset of the atmega of the Arduino below it? If it's needed on the programming Arduino it would be really weird because its reset pin has got nothing to do with it being used as an ISP programmer.
You might have to hit the reset button on your host micro when the Arduino IDE show "Uploading..." in the console log.
The capacitor generates a small reset pulse which simulates this button push
@@azyfloof The capacitor is on the Arduino that is used as a programmer. It is not for generating a reset signal but for avoiding it! If the programming Arduino gets a reset it restarts the software for the programming and the whole programming fails. The question is: What does generate this reset signal? My guess is that the Arduino IDE does not know that in this special case the Arduino is used as a programmer and wants to reset the Arduino to run the program? Maybe is depends on the version of the Arduino software?
The whole problem is weird - computers should be deterministic, or not? ;-)
Perhaps the Arduino as ISP sketch is slightly different to the Open Smart one and behaves a little differently? Have you tried the Open Smart version and see if it makes any difference?
@@birnodin
You do use "upload using programmer" and not just the normal "upload" button, right? And you also have the correct port and programmer selected? It sounds like you are doing a normal upload where the Arduini IDE pulls a pin low on the USB-to-serial converter to create a short reset pulse (through a capacitor). The big capacitor you added means that the pulse can no longer go low enough to reset the Arduino (that is supposed to be the ISP programmer).
Other than that, if i is really hardware related, maybe the shield is connecting something back to the programming AVR's reset pin (which it really shouldn't).
Great video, and very topical. I'm in the process of tying together a USBasp, PlatformIO, and a DIY version of your OPEN-SMART module. All this to put some better infrastructure behind my AVR programming. The one question I have concerns the use of the 16MHz crystal. I've gathered that we are able to program the atmega without the crystal. Do you know if the processor could then be plugged into an applications that employs the crystal (program without xtal, run with xtal), or would I have to change the fuse in between. (the program being uploaded would be 16MHz compliant of course)
The clock source you set with the fuses has to be present to program and run it. If you set the fuses to external crystal/clock but there is none, you won't be able to program the chip anymore. If you set it to use the internal oscillator it will use that no matter if there is an external crystal or not. What I did not try is if you can set the clock fuses to external and still finish that single programming session even though there is no external clock.
Yes, indeed Dale, that's caught me out a couple of times, wondering why nothing is running and then remembering I haven't change the fuses to the internal oscillator. Which is why there is a 16MHz crystal on the Open Smart shield, so you can _always_ program the device. Assuming the device is running on an external Xtal and you flash it to run on the internal oscillator, it will do this on the next reboot. Ditto, vice versa.
On this subject, I'm not convinced that running on the internal oscillator is so great. It's not that accurate for one, saves no power to speak of, and saves at best 3 components (just 1 if you use a less-accurate resonator). Although I've designed a few boards now without the Xtal, the jury is still out on that topic.
Thanks@@superdau . Looks like I have some experimenting to do :)
@@RalphBacon thanks for confirming my thoughts. When I get my chips in I'll do some extra poking about. I am working on a programmer that would allow me to load ATTINY85/84/861s as well as the ATMEGA328. This doesn't leave a lot of free real estate on my board for extra components, and I'd prefer to keep the xtal close to the MEGA (should I choose to use it :). Thanks for your reply and thanks once again for your informative and thought provoking videos.
Hi! I have purchased a few Atmega328p with bootloader installed already with 16MHz as I am working a stand alone project and want to use the Atmega328p instead of dedicating a whole arduino board to the project.
You said you can flash the fuse to 8MHz as my project will be not using a crystal. How do I do this? I am okay with attaching the chip to my ardunio and programming it then detach it and solder it to my board.
Can someone advise? I am very very beginner so please explain like i am 4 :)
Thank you
You can certainly do it that way but you will need a crystal and two caps to run at 16MHz. to run at 8MHz using the internal oscillator you will need to change the fuses. Use the device I show here, I still use it all the time.
@@RalphBacon yea i bought one. I dont know which fuses to set as i have tried the calculator, but i dont know which ones to set :( so using the device seems mich simplier
thank you!
@@RalphBacon so im using the device shown here. And I was able to send the uno the sketch, but after attaching my new avs isp and setting the board and programmer as ardunio as isp then clocking bootloader, it fails
Using Port : COM7
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x66
avrdude done. Thank you.
@@RalphBacon yep i bought it and was able to flash the bootloader and a sketch to it using this video. Thank so much!!!!
@@pouncerminned863 You have loaded the Arduino as ISP sketch on your other Arduino in the usual way? Then you are using _that_ board to program another Arduino (chip) using Arduino as ISP - not just Upload but Upload Using Programmer?
I have a question about LCSC - I need a very niche component, which they seem to have in stock. I only need one or two of them, what are their shipping rates like to the UK?
Shipping is always going to be the most expensive part of the order, Mahla, although if you don't choose a fast courier such as DHL ($24.76) or FedEx ($25.42) then it will be cheaper. From LSCS you can choose from Royal Mail ($3.75) or even DHL eCommerce for $5.70. That all said, it would be a very good idea to stock up on lots of components at this point because they are very, very cheap and hardly make a difference to the postage. I hope this helps!
@@RalphBacon Thanks for that. I don't need the parts in a hurry and RM, though more expensive than Ebay is faster and using LCSC means I get precisely the part I want, rather than taking a gamble. (The chip I need has two 48qfn packages that differ only slightly in size - Ebay sellers seem to be vague on that).
Either way it's better than and less hassle than Farnell or Mouser - no account required and no minimum order quantity as well as being significantly cheaper for parts.
As you say, it makes sense to load up on parts to offset the postage costs.
I'll give them a go (using your discount link, natch :D ).
An IDE which supports debugging tools:
www.visualmicro.com/page/Debugging-for-Arduino.aspx
Looks great; I wonder how easy it is to set up and actually use? Let us all know when you've completed that little task, hey, John! I've bookmarked the link so I may look at it in due course, thanks for the heads up.
@@RalphBacon it's a pita. I'm still working on it. Just looking for something that allows debugging. I understand that the one you use allows debugging. And from your comments is a pita. 😁
It is good you are addressing this subject! Plainly, too many folks feel married to their Arduino boards. I had an unhealthy obsession, making AVR ISPs, with mostly Atmega8a's, as they are inexpensive ($0.50) You need a 12mhz crystal to use the pre-built binaries, if you want to make one of these yourself with a Mega. www.obdev.at/products/vusb/usbasploader.html The original docs call for the 10-pin interface, which the Chinese copied without question. Most home hobbyists use the 6-pin interface. It is possible to do serial debugging through the 10 wire interface, but a special patch is needed, as well as a special serial-debugging client. Have done it, but it is a lot of trouble. More compact, and perhaps easier, is to use a Digispark with Adafruit's USBTinyISP code. Fuse-ing out reset, of course, because you need that 4th output pin to pull the target's reset low.
Yes, I'm hoping that my viewers will see there is nothing magical about an Arduino Uno/Nano and that they can build projects using the same chip. Takes a leap of faith, some dedicated practice, but it is sooo worth it!
@@RalphBacon I use my AVR, ESP, and STM32 MCU's without commercially-made programmers ... but have yet to figure out if there is a way to do this with PICs. Any advice?
or if you buy some cheapy cheap nanos off ebay from china that are missing bootloaders... you'll need to program them too. that drove me nuts when I was a noobie.
Probably a good idea to _always_ replace the bootloader anyway, Scott, to ensure you are using the small Optiboot one, and you can change the fuses (eg BOD, Erase EEPROM etc at the same time).
Ralph, perhaps the word you meant is SCHEMATIC (diagram) rather than SCHEMA. These are NOT synonyms.
Now, Brian, you and me both understand that the circuit diagram is a schematic. When I used to design databases for a living, the Schema was the logical database design, quite different from anything electronic! Fine. Unfortunately, KiCAD insists on calling it a Schema (the program is even called EESchema). But EasyEDA gets it right. Chinglish is what we must accept, these days, it seems. Go with the flow, roll the dice and other nonsensical sound bites...
@@RalphBacon I did wonder if XML and Db were part of your brain, making "schema" come out by mistake. My brain has similar problems after many years of embedded and assembler programming. :-) But for the beginners, surely we owe it to them to be accurate and precise with our terminology. (One of my bug bears is others on YT who seem oblivious to the difference between energy and power. And the even more exasperating ones who use "amperage" and can't distinguish that from power either. Grrr)
On a helpful note, perhaps a video about the bootstrap with diagrams of memory layouts etc. would be helpful for those trying to get a handle on options other than the pure Arduino IDE world?
I described the workings of the bootloader, memory layouts and the suchlike in this video, Brian:
ruclips.net/video/BJe-pTgfLLM/видео.html
Any good?
@@RalphBacon Or using Sketch to describe program/source code? :)
Ralph, it looks like you’re down some weight. Maybe a stone?
OK, what do you want?
Seriously, I have lost some weight, but it always shows in the face first before coming off the middle. But you're pretty close, thanks for noticing!
thers no cuttingroom floor lol also no help for bootloader stuff it seems to be about entertainment not education sorry just sick of waffle
I always like to think that my videos are informational first and foremost, and if there is an element of edutainment in them so much the better. But you obviously don't like my style, which is fine, everyone is different, so we'll agree to disagree and part ways.
@@RalphBacon hi Ralph didnt mean to offend but i like your vids in general , but i was looking for info on bootloading atmeg328p au 32pin surface mt they not easy ,cant find anyone that has a full go to wo on bootloading them " THAT WORKS"