Electronic Basics #3: Programming an Attiny+Homemade Arduino Shield
HTML-код
- Опубликовано: 5 окт 2024
- Twitter: / greatscottlab
Facebook: / greatscottlab
Attiny Library: github.com/dam...
Previous video: • Electronic Basics #2: ...
If you are using only a couple of pins of the arduino for your current project, you might be able to shrink the IC. I am going to show you an easy way to use an Attiny instead of an Atmega328.
Music:
Killing Time, Kevin MacLeod (incompetech.com)
I'm hooked on your electronics basics videos because they're so high quality
me too
Agreed. His name is Scott and he is great, so the channel is aptly named
So now I'm watching them
Just finished assembling my ATTiny programming shield. This works really well. Thanks!
+Brock Angelo Awesome
Just like a EEPROM programmer I made a attitny and at mega programmer thanks for the help!
Your channel is the best channel anyone could find for DIY projects......Thank you from bottom of my heart :)
Great tutorial! Finally made my ATTiny85 work, but this video is a bit outdated.
For anyone struggling, check out the latest High-Low Tech tutorial, the latest version of arduino (1.6.7 at this time) works fine for programming.
thanks for updated :)
thanks!
That was quite a search until I found what you're talking about. :-D
For everyone who's looking for a youtube channel called High-Low Tech, like I was, I think Danijel Milosevic was talking about this: highlowtech.org/?p=1695
@@nachtfrosts Thank you!
Your video quality has improved now I'm looking back upon your older videos. Keep up the good work!
Thank you, based on your video now I can use USBASP and USBTinyISP also for programming my Tiny84, Tiny85, and Tiny13
0:53 "Trust me, i'm an engineer"
I'm interested in home automation and off grid projects. I enjoy your videos and see a lot of potential. Perhaps you could show some power generation from Peltier...
Farm Tech Maybe in the future.
"Yo dawg, I heard you like programming, so I program an ATTiny with an Arduino, which itself already had a programmer within, so you can program while you program"
You have some great videos, keep that good work up!
Ahh, memories
It worked after a year of fails. Thank you very much. ;)
Bit banging is not as you describe it "protocol emulation", this is a misdescription. Bit banging is the ability to shift or add bits onto an output address or variable, usually for the purpose of crafting specifc values of IO.
0:32 I think that the arduino ur holding is a counterfit. The deep blue pcb, the wierd usb and resistor next to it is a good sighn.
Adding the status LEDs 7/8/9 from the Sketch is easy and helpful!
Thanks for this very clear video. I found the same procedure in a couple of projects at arduino.cc and hackaday, but your explanation and photography are the best. I tried it with a fresh Attiny85 and a generic Uno clone (with the CH341 USB to serial chip), and got the dreaded "Invalid device signature 0x000000". (I'm running the Arduino IDE 1.8.13, installed from arduino-1.8.13-linux64.tar.xz on Debian 10, in case that matters.) The connections are correct and Vcc is 5.01V at the target. The forums tell me this means my ATtiny85 has its clock mode fuses set wrongly, and I need to use the high voltage programming mode to "unbrick" it. Which is not a function ArduinoISP can perform, and it's not how the data sheet says the chip ships. So I have a few questions. 1. Have you run into this issue? Did applying an external clock fix it, or did you need to use the HVP? 2. Is there anything in ArduinoISP that requires a genuine Uno? or should any generic Arduino work? 3. What's really going on with that 10 uF capacitor on the Arduino's RESET\ signal?, it seems like a kludge.
I'm digging into question 3. It seems the Arduino IDE talks to the serial port the wrong way, causing a pulse on the Uno's RESET\ when it's not done talking to the ArduinoISP running on the Uno. It leaves dealing with the (emulated on USB) serial port to the avrdude program, and avrdude doesn't know enough to do it right. So the 10 uF cap is a kludge working around a missing feature in the avrdude program. For a less kludgy fix, avrdude needs a new command line option to tell it not to pulse that serial port status line, but leave it connected all the time. And Arduino IDE needs to know how to set the "serial port" up so that avrdude doesn't have to do it, and when to use avrdude that way. Or avrdude needs to get way smarter about when to open and close the emulated serial port. No wonder everybody kludged it with a 10 uF cap instead.
I tracked my problem down to an intermittent short between MISO and SCK. They were shorted when the shield was in place and open when I pulled it off the Uno to buzz it out. The SCK is low when the Arduino-as-ISP samples MISO so it was always reading back zeroes. Thanks again for these excellent videos!
I love those tiny micros - Built a custom UNO shield just for this that supports all tiny micros with some dedicated test sockets too. you can find it on tindie - Just type 'All ATtiny Arduino programmer shield'
Stick away from this tutorial when it comes to the libraries, there are other ways to get them, plus the files he mentions in the video have changed
0:51 That does seem legit, in fact there's enough room to fit 2 or 3 more of them, should I try that?
I can't believe i'm watching tutorial 3 and still have no idea what is going on. I'm waiting for you to say something i understand, which is not happening yet - like, 'christmas lights' and i smile and say 'yes, carry on'
Well done! I prefer mcrochip PIC µC's but that's a matter of taste.I really like the professionalism of your videos, keep on the good work.
hallo ich bin aus mexiko I love your videos, please never stop making them.
Hi ,Thanks for the video , I find it very interesting as it goes beyond the traditional "use an Arduino...J" , but can you elaborate more examples , what can be done with the attiny85 or other chip options [now that we know we can program it] ? maybe different applications (and code)? maybe different chip , Thank you ,great work !!
What is the capacitor between reset and ground for?
The time constant of the capacitor will help programming the uC
It is there to stop the Arduino re programming itself !
Given the date of this video, you are most likely aware by now that the Attiny85 has PWM on IO4 as well as the two pins you mentioned? I'm using one in an RGB LED project, and it works fine. Not many ocs seem to be aware of the fact that three pins have PWM.
You are the one of the few that can solve this mystery. I uploaded a sketch to my attiny85 that outputs PWM according to a potentiometer. It didn't work. It drew about 2.8-3.5mA, but when I unpluged the ground to the attiny, it started working and only drew around 0.7-2.5mA. Why is this? And why will it not work when ground is connected to the attiny?
It is hard to know what is the problem if you dont list every connection here. Probably the potentiometer keeps sucking current - use higher ohm value pot. Protip - Make your sketch work on an arduino uno or nano, and use Serial.println(value); to debug the code.
you could make an "alarm" that when someone gets close it started to do noises and you with a "remote control" could desactivate it or when you get close with the remote :)
Really high quality sharing, clarify lots concepts for me,tks
Hey GreatScott! I made this for the Attiny 85 and 84 and used my nano instead of the uno. Couldn't have done it without you. I wanted to show you pictures but I don't know what the best way is to share them with you.
My only issue was soldering the female header pins on the boards to connect the Arduino. It was hard to get the soldering tip and solder under the plastic pins to make the connection to the strip board. Suggestions?
+Hydrameda the issue was actually soldering the headers on. because they go on the bottom of the board (where the solder strips are attached,) I couldn't get my soldering iron between the header and soldering strip. I'll try to get a picture
www.instructables.com/id/Soldering-a-LED-To-The-Wrong-Side-Of-A-PCB/
This is an example of what im talking about. Except they are talking about a LED, but same basic issue.
+Troy Puchini Those header pins have the black plastic spacer that can usually be moved/removed. You could solder the longer side of the header pins to the copper side of perfboard, then when soldered just wiggle the plastic spacer down or take it out completely. I found I can't really trust hookup wires to stay connected if headers have that plastic Part
AHHHHH, now THAT is a great idea. Thank you
Hey,
I bought 50 Attiny 13a to build some small things. But I can't find a esay Tutorial to Programm the Chip. Better said I can't programm the Chip, nothing work by me;(
Maybe too late, but I did it
@@tuhitatutorial i also found a way
Can we get an updated version of this video cuz this doesn't work anymore and I'm kinda ripping my hair out over here screaming at the ic
I did it for you
Why when programming the ATMega328 via ISP nobody use a capacitor between reset and ground, but when programming the ATtinny85 everyone put a 10uF capacitor?
+GreatScott! Why don't you burn the boot loader to the atttiny to run it at 8mhz instead of 1mhz?
why do you put the capacitor?
To protect from over voltage
Thank you
caps dont protect from overvoltage. when you short a cap to ground you make a low pass filter.
the higher the capacitance the more higher frequencies are killed. A capacitor of infinite capacitance only allows DC to flow.
The cap is so that random EMR or voltage dips etc etc dont end up tripping the reset pin when the reset pin is not supposed to be tripped. This can brick the chip, since programmers use reset for programming the chip.
***** oh, OK, that makes a lot of sense. Thanks
Decoupling the reset pin.
Oh beautiful. very good explanation. May you live a long life Full of gladness and health . May all God's blessings descend upon you. May peace be within you may your heart be strong. May you find what you're seeking wherever you roam.?
I'm very happy for the video. Now I'm working with a arduino project where needed 3 I/O pin and 1 is digital pin-2 for interrupt. Could I use the tinny arduino for the interrupt functionality?
Hello! I love all your videos, very clear and easy to follow!
Can you recommend an easy to understand video of SPI and I2C for a beginner :)
Hey . if you're still looking for it , Great Scott has a video on I2C in his electronics basics playlist . check it out :)
:)
It was very nice video. ..please make veriable timer relay trigger with potentiometer to adjust time delay using attiny mcu.
Mr GreatScott! Why should I put a 10 microFarad capacitor between the reset pin and the ground pin?
And if I didn't use the capacitor , what would happen ?
And is it necessary that the capacitor's value is 10 microFarad ?
ahmed alhloul you put it there so arduino wont reset :)
at least its how I understood that.
To filter out high frequency noise, so the Arduino doesn't reset randomly.
In my opinion, Arduino IDE will send reset signal once you hit "Upload" button, despite the Uno on the other side of USB cable is running "Arduino ISP" sketch and actually not the target you want to upload your program into. Your Uno will be reset and broke the uploading operation. By hooking reset-pin of Uno with capacitor your Uno will continue working and "Arduino ISP" sketch will handle your program to ATtiny.
If you Upload with "Uploading using programmer"(option-click Upload button or alt-click for a PC) sometimes you won't need a capacitor. It will treat your Uno as an ISP and tries to reset the target chip instead of Uno itself.
But in recent versions(1.8.7) broke this feature and Uno will still be reset. It is because a protocol change and Uno will still treat this signal as reset.
see this for detail github.com/arduino/Arduino/issues/8293
how is that called that holds the attiny? its a kinda female header but thicker...
+MEe$ an ic socket?
+GreatScott! yes, thank you so much for fast answer!!!!
Barnabás Kiglics yes
So why should we put a capacitor between the reset pin and ground ?
What kind of wires is he using on top of the Strip board for routing? Looks more substantial than remnants of component leads. Also looks a lot neater than if I were to strip my solid core to just the bare wire
Nice short videos you are making.
Love this one .... GreatScott!
can you program any atmel microcontroller from arduino. And make small video about it. great video thanks
thats amazng
Genial, wie immer! Super gemacht!
That video is fantastic.
Hi, could you make a Video about how to use the Attiny10 with Arduino IDE and Arduino Uno?!
Good video. Can you make a video on doing this on a Raspberry Pi?
Glad high bought lots of stuff like this years ago when they were about a buck. These got expensive like potato chips.
Hey Scott, I think you mixed up the ground and the reset pin when you showed the attiny on the breadboard (alone). Please correct me if I m wrong.
sir when i program attiny85 it showing yenkie invalid device. check your connection double. please help me about this
Greetings! I like your videos. Recently I am doing an R/C project which involves using pulseIn on pin 3,4 to read receiver signals and use pin 0,1 for out put. However, it seems running very slow. Have you ever come across something like this?
I designed my own shield for this. Mine can programm ATTiny 25/45/85/24/44/84/441/841/2313/4313.
how can i make a micro controller from things that are laying around in my house ? i mean not expert thing .... things like Electronics Toys , remote controllers and so on ...
THANKS for your GREAT tutorials !!!
Nice tutorial. Thanks for sharing.
Hallo, deine Videos und das was du machst finde ich echt Klasse. Weiß du zufälligerweise welchen Beruf man da am besten erlernt um das "ganze" mit den Transistoren, Programmierbare chips usw zu erlernen? Mich fasziniert das gerade echt, was alles möglich ist. P.S fange in 2 Monaten meine Ausbildung als Fachinformatiker in der Richtung Systemintegration an. Ich weiß, man kann sich vieles selbst beibringen, aber in einer Ausbildung oder so geht man natürlich noch viel mehr ins Deteil.
I wished that this electronic parts were available in my country.
Hello
Could you make a video or some instructions for make a proyect with attiny85 and Bluethoot?
Thank you. Congratulation for the channel
I really like your videos and your projects. I want to start making my own staff but I need to know more about electronics is there any web page that you suggest or any book? Thanks keep making videos they are the best!!
mastergscrewu Instructables.com is a really good information source.
I am too late to start such project but I believe I am at right place to ask my question.
1. Can I use ATTiny85 for FastLED projects to control programmable WS2812B (say 60 LED strip).?
2. Also can I program it using Arduino Pro Micro or any other Arduino board.?
I want your suggestion before I make any purchase. I am very new to Arduino. Please suggest me alternative if any. I am looking for cost effective too. Thanks.
@@smert_okupantamThanks a lot for time and reverting. Much appreciated.
This seems a lil advance for a basics vid
It does not work for me, it gives the error "invalid device signature 0x000000"
Can you reverse the order of the electronic basic playlist? RUclips plays first number 20 and so you can't watch them in one go.
GreatScott! I've made it! It works! Thank you. But now I have an answer...can programm also the attiny pins i've used to upload the code as output (pins 0, 1 and 2)? Or it makes troubles with the arduino? Hope i was clear...
Does it really matter if a MC costs 1 or 4 bucks for a one-off project? I guess it does if you would mass produce it.
What kind of stripboard do you use? When I search for some on amazon I only find cheap ones that are rated pretty bad or expensive one with bunch of stuff on them, I only need a quare with holes an copper since im gonna cut it anyway
I would just buy the cheap stuff. What could possibly be bad with a piece of copper and silicone?
Can you make a brand new tutorial series?
Awsome vid Scott ty.
Having troble, after instaling, wen i go to tools the bords dont show up
same here
@@PacLevkov try this link, It worked for me
www.hackster.io/arjun/programming-attiny85-with-arduino-uno-afb829
Hi GreatScott, what are you using for connecting pins on your prefboard, for example at 4:41 , and where do you buy them? Thanks
Thanks, it works. But how to RESET the program in ATTiny to the default?
doesnt the Attiny needs a 16Mhz crystal (same as the arduino) to run in propper time? (in this case, .5 sec blinking)
I'm getting into the ATTiny85 myself. I bought a programmer for it but it didn't work. I'm not sure which way around the capacitor should go on the Uno.
Well done sir
Your all video sooper happy to watching this video
Hee scott! Are there more ic's that you van program with an arduino??
Please update the video GreatScott.
What if you DID plug the AtTiny84 in , then cut the other board to fit the other data pins.
In order for using the Arduino the old way after using it for programming the Attiny should I just go on Tools/Programmer and select ArduinoISP instead of Arduino as ISP or do I need to burn the Bootloader again?
I uploaded arduino ISP to my arduino Uno board but now I can't use my board directly to control the blink sketch through the inbuilt IC 80 Mega 328 p
i'm not getting the option to see the attiny in my board manager?........when i put the extracted attiny folder into the hardware folder where the avr folder is also , it stops the arduino programme starting?.....help. thanks .
Thank you for efforts....
If I’m using the A0 and pins 7-12, where could I get an attiny that accompanies all of that?
Nice night rider Red alternate led from left to right vv
Actually the atmega 328p is way cheaper than the Attiny 85
Great video
Question, how is this really ummm... basic?
Ike Zhang It is basic for a project with an Attiny ;-)
IKR?
I just learnt about integrated circuits jumping to arduino is dificult
Can I use 22uF capacitor?
this basics video went from 0 to 100 way to quick
Has inbuilt LED does not blink and an error message was shown in uploading the sketch to the board
now this is question that was in my mind from a long time that "where did you learn Arduino?"
Please tell me
Aliens are responsible for it :-)
Haha
Very nice idea!!!
you didn't burn the arduino bootloader to the attiny85... why?
thank you in advance
really tnx for this video ... really help me
How could one do this with an Arduino mega?
you can use arduino micro-controller it cost same as attiny85
ATmega328 costs a little more.
Why there is no need of clock in attiny ....I mean any oscillator .....becuz how will the ic know the timmings like delay(500);??is there any inbuilt oscillator
umm... can i use another 10uF capacitor instead of electrolytic capacitor?