Make a UPDI Programmer for the #Arduino #ATTiny

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to element14 presents i'm clem and we have to do a reality check they are all sold out [Music] yes it's true probably all your favorite microcontrollers are now hard to get your favorite dev kits your arduinos raspberry pi's yup that's the reality of today but weren't you even using all of their features and pins and stuff anyway did you really need such powerful devices for simpler projects it's time to broaden our horizon because there are some microcontrollers available now a new generation of 80 tinies that you could use for like a vast majority of the stuff that makers build around here and i think you would also benefit from shrinkifying your projects making them more energy efficient cheaper to build a bit more integrated and especially doable because you can actually get those parts i'm talking of course about the newest generation of 80 tinies for example the 80 tiny 212 and the 1614 which have something different than the previous 80 tines that we all know and love you don't need an icsp programmer to program them which can be costly and not available also at the moment they use a new protocol called updi and that stands for uh you you universal uh um something with programming and an an another thing okay updi stands for universal programming and debugging interface i totally did not look that up 80 tinies are not only tiny in like size they are really tiny but they are also tiny on space of program that you can put on there so you have to restrict yourself a bit and select them depending on how big your project actually is so in the general production environment you use that one arduino you still have or you can quickly pull out of your old project updi doesn't need an extra header no more icsp pins for programming inside your project on your custom pcb for example you just need to have the reset line exposed for most of them they use that as the programming line just updi line or reset power and ground that's it but they need a different programmer and well you may be able to find one i wasn't so i want to play around with these new uh 80 tinies i need them for a new project uh but i can't get a programmer so let's build our own updi programmer [Music] thankfully the two chips that i was interested most are in stock at element14 it's the 80 tiny 212 and the 1614 and those are basically about the size that usually my arduino projects have so most of my projects would fit on there and wouldn't even need more io than that so they are a really good choice when i have to shrinkify my project and make it cheaper i couldn't embed a full arduino cost wise in every single project but those chips are like in the sub 1 range so good for me for programming updi enabled microcontrollers you of course have the official way with i think admiral studio and they are dedicated programmer but guess what i can't find that now and also i don't want to change my workflow i want to use the arduino ide still and just change like the boards there is in the boards manager already an entry for that mega tiny core if you install that package you have all the fancy new updi-enabled chips in there and then they are arduino compatible but we have to have an interface from the arduino ide to that little chip on the board so the programming works so we make our own programming adapter like most people know the ivr esp mark ii which is like the standard programmer when you use the icsp header on an arduino or another admin board and we make the similar thing we just have to select it in the arduino ide hit program and then it does the thing to build my actual programmer i use an arduino nano be aware that the technique that i show you now for building a little updi programmer can be varied the version that i uses only works so far on atmega328p processors and that is what the nano uses and also the arduino uno so if you have a nano or uno laying around you can perfectly use that to build your programmer you don't have to make any fixed changes to the hardware you can just build that on a breadboard if you want program your chips and then take it apart again so reusing is always possible but i will solder my stuff directly to it and make a dedicated programmer that i can just whip out whenever i want to program an 80 tiny what we also need is a little one microfarad capacitor a ceramic one i could only find a smd 10603 part in my parts bin but guess what that fits perfectly in between the pins on a 2.54 millimeter spaced header could be because they're all based on the same point zero one size grid so they fit perfectly in between those solder blobs so very compact then we need a 4.7 kilo ohm resistor that is from d6 which is basically the programming output to the updi channel of the microcontroller that we program and then we put it up in a fancy case so sounds pretty simple let's find out if it really is oh and i want to add something fancy because most of the programmers i've seen are just like fixed to one voltage level but i want to be able to program my microcontrollers on different levels because when the 80 tiny is embedded into a device there might be some devices attached to it that use 3.3 volts or you may build a completely 5 volt based board most of the 80 tinies work on both voltages but you need to protect the other circuitry on your board so i want that to be selectable with a little jumper so you can select the target power with 3.3 or 5 volts just like the big real programmers have hello i'm james from workbench wednesdays a show about the stuff found on your electronics workbench look for new episodes on well wednesdays you can connect with me over on the element14 community i look forward to seeing you for now it is time to get back to watching this week's project video so before i solder anything up to my arduino nano i want to make sure the code works in this case i did not write the code myself this is a project called jtag to updi i have linked all the resources on the project page on element14 including different versions of the project and other variants of how to build a new pdi programmer so you can pick and choose your favorite one the version that i use for arduino is a project based on the work of spencer condi i hope i didn't butcher your name too badly but great work and there are a lot of forks floating around the internet that basically all should work and they have little changes or updates to them i've designed and 3d printed my own case for the updi programmer if you want to see the full segment on how i mixed my special resin for this to make it really tough check out the bonus video on the element14 community and i will also put the stl files for the case on the page as well in case you want to build like the same version and have a nice fancy case for it okay let's get soldering it's a pretty easy schematic d6 goes to the updi pin and we have the capacitor between reset and ground this is to delay the resetting for a bit when we have soldered that up i put it on a little bit of breadboard to make sure i have like a nice room for the headers one header is for the programming so three pins positive voltage ground and the updi pin that goes to the reset line of the microcontroller and then i have three additional pins the middle one is the power pin that leads to that output pin and one is five volt and the other one is 3.3 volt so if you attach a jumper to either one of these positions you can select the target power and if you remove the jumper the board is not externally powered by the programmer which is a very handy function in a lot of cases don't fry your boards with like little errors like that and especially not the components so yeah any tiny would program correctly and would think everything is nice and then you find out that like the ic that you use on that board another one like a pbm driver pwm driver or an accelerometer or something else is fried because of the wrong voltage [Music] to actually be able to use the updi enabled 80 tinies we need to have some way to interface with them and i don't have a special board designed with them yet i just wanted to get familiar with them first before i commit to the new ecosystem which i probably will so it's time to make a breakout for them so i can use them on the breadboard prototype my devices and we will just use that to make our programming test and see if this actually works so i have two versions if you don't have any ic adapters ic adapters are basically pcbs that have the footprint of the ic that you want or an adjacent footprint to it with maybe more pins and some header pins so if you solder your ic on there you can basically directly break them out these are really easy to solder up and they work great but if you don't have that and you like can't get them in time or they are sold out again then you can just use some perf board some headers and use some tiny wires to connect your ic i usually fix the ic with some super glue and then start soldering tiny wires to the pins be aware that if you use like really tiny chips these are soi c8 and soic 16 pins or so c14 i think then this is already at a pretty small scale but if you choose like qfn parts or something like that that might be too big of a challenge to do by hand so you may want to invest in some cheap adapter boards they are not that expensive or you can even design your own [Music] it is time to start programming so what we need is our updi programmer the arduino ide and our new 80 tiny chip on a breadboard i have removed the case for this test so you can see that the program is actually doing something inside the case i haven't made any precautions for that because i would see the arduino ide anyway if it worked first we open the arduino ide and we need to make sure that the right boards are installed we go to the boards manager and there is the option to install mega tiny core that is what we need for the new updi chips then we need to make sure that our programmer is in the right mode so we open the tools menu we load our blink sketch from the examples that is the sketch that we need to test if our programming actually works that's just the easiest thing if blink works everything is okay i change the led inbuilt section to uh pin three so i know which pin that is on my microcontroller and that should work and then i need to make the right settings i need to make sure that the right 80 tiny is selected in my case the 80 tiny 212 or 212 however you would like to call it and i leave the internal clock as it is really important there is a section for the updi interface i leave it at the standard setting updi do not use the high voltage variants if you don't have a high voltage programmer if that setting is wrong you may break that microcontroller our programmer that we built is just a normal one so just leave it at updi and then at the programmer tab i need to make sure that this is changed from the avr usb mark ii which is the standard thing to jtag to updi that's the software that we flashed on the arduino nano before and when we want to program our chip we don't hit like the just the programming button we have to choose flash with programmer and then it does its thing the lights blink because that is transmission over serial and that is translated to updi and lo and behold when we connect the led it blinks so we know programming has worked in this video we have learned how to build our own updi programmer integrated with the arduino ide use the new 80 tiny generation to shrinkify our projects and to beat the component short edge what is your favorite microcontroller did you switch platforms to just use what you can get in this daring times tell us on the element 14 community i gotta go there's another project waiting for me [Music] you
Info
Channel: element14 presents
Views: 1,816
Rating: undefined out of 5
Keywords: electronics, hardware, hacking, mods, weekly, element14, maker, engineering, element14presents
Id: i3vWjwxQ0XU
Channel Id: undefined
Length: 14min 50sec (890 seconds)
Published: Fri Dec 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.