Don't Miss


Building New Tools For Our Man Cave

By on June 23, 2020
tiny isp programmer

 

 

 

 

 

 

 

 

 

Being the electronic engineers we are, we always are trying to expand our tools, test equipment and test methods. This way making new things possible and saving time when we are fixing faulty equipment.

It often doesn’t even have to cost much to build new tools. As an example I mention the very cheap SDR compatible TV dongles that make it possible to receive any signal up to about 1.7GHz high! Making a spectrum analyzer of any PC it is installed on. And when my friend called with a problem his neighbour had with his electronic car keys he wanted to test, I advised him to see if he could use CubicSDR to receive the 433 MHz key signal. I myself use SDR# (SDR sharp) but I knew he normally used CubicSDR. And that indeed revealed that the problem was not the electronic car key but showed that it just was a bad fuse in his car fuse box.

Another good example is the many Arduino boards and the flashable AVR microcontrollers from Atmel that are extremely affordable and ideal for making new equipment around. Arduino boards normally all have a 2×3 row_6_pin ISP connector to upload a bootloader to our ‘firmware empty’ Arduino boards. To do that we use the free ARDUINO PC software and connect our Arduino board or AVR processor with its ISP connector to an Arduino ISP compatible programmer. Because without a programmer or a preloaded Arduino board it is like the Chicken or the Egg problem. We can’t do it without any of them. I already made an USBasp programmer that works with an ATmega 8 AVR processor but it often started to fail programming over ISP. Why it was time to make another. So this is why I decided to make an USB TinyISP programmer using a ATtiny2313-20MHz AVR, and after that I even made a second much smaller TinyISP programmer that didn’t needed any 12 MHz quartz (like the 2313 programmer needed) and also worked exactly like the ATtiny2313 version.

This article started when I read the this year in Practical Electronics March 2020 published “DIODE CURVE PLOTTER” that practically works on an affordable about 11 euro costing ATmega 2560 Arduino board, and makes it possible to plot the curves of just any surpressor-, photo-, led, rectifier- etcetera diode up to about 108V DC! And a small added shield with the test electronics and the voltage generator on it. Plus of course a nice 2.8 inch color touch screen. The best thing is that the software for this perfect new test device can be found free of charge online at the Practical Electronics website. (Formerly known as the UK Everyday Practical Electronics magazine).

I already programmed my Arduino ATmega 2560 board with the Practical Electronics Diode curve plotter .ino file. And now I’m waiting on the at PE orderded pcb and the online ordered components to complete this very interesting device.

To continue this article I will show now what new Arduino programmers I made and how to program them so you can start with making your new Arduino based test equipment too. Because without the right configuration bytes set, none of the Arduino or AVR microcontrollers or boards will work! And if your programmer is working you will immediately know when the TinyISP device shows up at the Windows devices screen. Else you must recheck your AVR chip configuration setting or your wiring.

Next screen copy shows on the left below my TL866 programmer USB driver activated and on the right from it the new TinyISP programmer. And the right window shows the TL866 programmer configuration bit settings for the smallest TinyISP ATtiny45 programmer I made. (low byte E1, high byte 5D). But to make sure if the programmer board/module also correctly programs over the ISP bus, I also connected it to my Arduino UNO board and uploaded the Blink Led test Arduino program.

And it worked splendidly showing the activated leds on the UNO board while the ISP programming uploaded the compiled .ino sketch. And right after that my UNO board showed a blinking led. If you want to start with Arduino too but do not have a working programmer yet you can use a working Arduino board as programmer. Because as said the Arduino software needs at least one working and connected board to make new programmed working Arduino’s. Or use any parallel programmer like a Genius G540/840, TL866 to make life easy. Or just make an Arduino board and buy the AVR ATmega 2560 or ATmega 328 or whatever controller you want already preloaded with the Arduino software on it. It is like driving a car, without gas (firmware) it won’t run. And you can make new working Arduino’s if you have at least a working programmer.

arduino software

arduino software hardware

Above both my new made USB TinyISP programmers and the self-made ISP cable that has a 10 ISP connector but still can be used as 6 pin ISP programmer cable also. If your programmer is not recognized and shown as “unknown device”, you just need to add a windows driver to it with Zadig. Using Zadig is easy, just list all USB devices and select the programmer to add the right driver to.

tinyisp with attiny45

tinyisp programmer with 12 Mhz

arduino uno

Above the Arduino UNO board I checked my programmers with. They worked both splendid and are now added to my USBasp and other programmers.

About setting the right configuration fuses, I used the online Fuse calculator on: eleccelerator.com/fusecalc/fusecalc.php?chip=attiny45 . Because often the wrong fuses are given in the online DIY article webpages. The given ATtiny2313 programmer fuses were wrong and it took me a few days to find the reason which were the wrong configuration bytes. For my Attiny 45 low byte and high byte setting are given on the previously showed screen copy page. And for the TinyISP Attiny2313 programmer it were Low byte: 0xFF (and not 0xFE as was written in the article!) , and High byte: 0xDB. The firmware is given in the main.hex code in the corresponding maps online.

Also interesting to know that these Arduino programmers use 3,6V zenerdiodes on the USB Data+ and Data- lines. So to make possible building more new Arduino devices in future I ordered more of them smd and normal sized.

Only problem was that the programmers not automatically were recognized under Windows 10. But if you use Windows 7 or older like XP they won’t give you any problem whatsoever.

Following last photos of both programmers shown on the solder sides.

And finally the TinyISP 2313 programmer schematic is shown I used to wire my programmer from. (Given on LadyADA.net). But I changed the 27 ohm resistors to 68 ohm values. And used a 12MHz Quartz with 6.8pF capacitors instead of the given resonator. And on the TinyISP ATtiny45 schematic I added a green power led in series with a 1,5Kohm resistor. There is no Programming led here.

Below a screen copy of the mentioned easy online configuration fuse checker showing the ATtiny 45 configuration setting. A bit is logic ‘0’ if item is selected. Logic ‘1’ if item is not selected. BODLEVEL 101 means here Bodlevel 0 and 2 not selected, only Bodlevel 1 is selected. Low byte being 0xE1 , and High byte is here 0x5D.

bodlevel 101

attiny45

2313 avr microprocessor

Below the much smaller TinyISP ATtiny45 programmer.

avr circuit board arduino

Below the top side of the TinyISP ATtiny 2313 programmer. For R1 and R2 use 68 ohm instead!

attiny 2313

Below a top view close-up photo of the tiny TinyISP attiny45 programmer.

attiny 45 programmer

usbtinyisp diagram

usbtinyisp diagram schematic

Although the above Tiny 2313 programmer circuit had Led1 (red) for programming and Led2 (green) for power, there were no leds on the TinyISP 45 programmer board but adding a programming led and a 1,5Kohm resistor to ground will probably work and have no effect on the programming. I already added a green 5V active power led to the board. Below the very tiny TinyISP with ATtiny45.

attiny 45 diagram

Thanks to those who wrote about using a ATtiny 45 and other smaller AVR’s I got interested in building the even smaller TinyISP programmers. That does not need external Quartz crystals to work. Like in the pcb example below.

usbtiny pcb

After previously making Arduino AMIGA floppy drive emulators, an ATmega2560 based Amiga floppy to SD card copier, I now added 2 new programmers to the collection of tools and devices. Soon followed by the Diode Curve Plotter that easily helps to analyze unknown diodes of all kinds and categories. Below the PE website about the Arduino based Diode Curve Plotter and access to the free FW download for this great device. Ideal for adding to our existing collection of digital testers.

practical electronics magazine

Although many of the Arduino users use AVRdude and other programmer related software to ‘burn’ their boards and AVR controllers, I do not use any of those.

With my TL866 or other universal programmer, like my old Genius 540 programmer, I can do it much quicker and do not have to type in any line of code. Or have to find out how those programs work, which takes time and slows me down.




So if you want to make the Arduino programming and flashing start of not yet firmware filled empty AVR processors or boards easier, you better use a universal programmer and adjust the configuration bytes there instead! And use the online Fuse calculator previously mentioned in this article. Or for instance use the BASCOM compiler to design and generate your code and let it run through your programmer afterwards (like the way in how the Amiga X-copy Floppy to SD copier program was written in).

I hope this article will help those who not yet have had found the right way to start with Arduino or making new Arduino based hardware. And at least helps to make a useful Arduino programmer for your future needs. Because it is great and affordable to begin with the accessible Arduino and its platform.

albert from netherlands

Albert van Bemmelen, Weert, The Netherlands.

Please give a support by clicking on the social buttons below. Your feedback on the post is welcome. Please leave it in the comments.

P.S- If you enjoyed reading this, click here to subscribe to my blog (free subscription). That way, you’ll never miss a post. You can also forward this website link to your friends and colleagues-thanks!

Note: You can read his previous repair article in the below link:

https://jestineyong.com/reverse-engineering-a-clock-pulse-giver/

 

Likes(53)Dislikes(1)

19 Comments

  1. Parasuraman S

    June 23, 2020 at 8:35 pm

    Vow! What a lot of tips, information and knowledge passed on! A very valuable article! Many thanks for the efforts put in to prepare the article! Hat's off!

    Likes(3)Dislikes(0)
  2. Albert van Bemmelen

    June 23, 2020 at 9:54 pm

    Glad you liked it Parasuraman. I noticed on Aliexpress that these ATtiny 44, 45,85 boards are ready available for a very low price (shipping cost is often higher). And they can easily be used as Arduino programmer if you insert a programmed Attiny 8 Dil AVR microcontroller. All you need is the right main.hex file to write into the 'empty' USBTinyISP dedicated ATtiny 45 (or other tiny AVR microprocessor).Like this one that only needs the right 6 pin ISP cable connection to any Arduino board with ISP connector to program it: Here is the link
    And you now already know the right ATtiny 45 configuration programming fuses for the programmer to work. With setting BODLEVEL 101 it is set with a brown-out voltage of 2,7V USB (used with the two 3,6V zeners in the 2 USB datalines). As is explained in the AVR eleccelerator.com fusecalculator webpage.
    By-the-way: Adding a red programmer active led to the USBTiny45 programmer is very easy by using a 1,3Kohm to 1,5Kohm resistor in serie with the led connected with cathode to ground and anode to the ISP MOSI line on the 6 pin ISP connector.

    Likes(6)Dislikes(0)
    • Albert van Bemmelen

      June 24, 2020 at 12:44 pm

      Also important to know is that you need a 'parallel' programmer like the TL866 or Genius G540 universal programmers to 'unlock' the ISP write protected state any AVR microcontroller gets in after the configuration fuses are set that make them unable to work over ISP afterwards. Which apparently is for instance when you unable the /RST pin configuration setting which disables ISP serial communication. Hence why they name the TL866 and other programmers parallel programmers. (ISP or also named ICSP which is In_Circuit_Serial_Programming).

      Likes(4)Dislikes(0)
  3. Greenford William Mafuleka

    June 23, 2020 at 11:38 pm

    Dear Sir,
    We need good experience do the repair.8

    Likes(2)Dislikes(0)
    • Albert van Bemmelen

      June 24, 2020 at 12:53 pm

      I can't give you experience dear Greenford. Experience is what we get by building things and by fixing things that do not work afterwards. It is a continuous evolution we have to experience by doing and learning. I only can give you answers on questions you might have.

      Likes(3)Dislikes(0)
  4. Lynn Blakely

    June 24, 2020 at 1:06 am

    Excellent information for anyone interested in making projects that are useful in test equipment to analyze components. I have built a lot of electronics kits, Heathkit, H H Scott, Eico, Dynaco, and from www.anatekcorp.com, the Blue ESR and the Blue Ring. I do still like to learn new technology for recording video, video editing, and all the equipment to upload our church service, especially for those that are shut-in and are quarantined.7

    Likes(2)Dislikes(0)
    • Albert van Bemmelen

      June 24, 2020 at 12:29 pm

      Indeed Lynn, in these worried times internet and communication over distance has become the best and safe way to survive this human tragedy. Sadly this also means that building new equipment is on halt until the online ordered components finally arrive after 3 months of Corona plagued shipments. I'm still waiting on components that entered my country over 3 weeks ago according to a message I got from Aliexpress but still are in transit by our local postNL distribution since 2 june, and now on 24 june still haven't been delivered which is very abnormal.

      Likes(1)Dislikes(0)
      • Albert van Bemmelen

        June 24, 2020 at 9:36 pm

        Today 24 june the 10 already on 22 april ordered 74ls92 TTL counter/divider IC's finally did arrive. Why the local message 'in transit' took over 3 weeks is unknown.

        Likes(2)Dislikes(0)
        • Albert van Bemmelen

          June 24, 2020 at 11:08 pm

          Be aware that often ordered components from China arrive way out of spec like the 1% metalfilm resistors I received recently. For instance the 1Kohm resistors that in fact were only 965,9ohm (which is -3,41% tolerance instead of 1% tolerance). Important if you want to build the in the article mentioned Practical Electronics (also published earlier in Silicon Chip) Diode Curve Plotter. When you place those resistors in the double opamp LM358 circuit (IC1a and 1b) that involves the ADC measuring. So better at least keep those resistors the same value. Compared to the old 5% carbon resistors still better but not the promised 1% tolerance.

          Likes(2)Dislikes(0)
  5. Humberto

    June 24, 2020 at 12:37 pm

    Wow!, Albert, great information and excellent photos and article too. Congrats.

    Likes(2)Dislikes(0)
  6. Albert van Bemmelen

    June 24, 2020 at 1:20 pm

    Thanks Humberto. I hope you are still fixing and building electronic things?

    Likes(1)Dislikes(0)
  7. Paris Azis

    June 25, 2020 at 12:06 am

    Very useful article and properly presented, Albert! Thank you for sharing such important information.

    Likes(2)Dislikes(0)
    • Albert van Bemmelen

      June 25, 2020 at 11:54 am

      Glad you liked it Paris! Building new tools for our electronics shack is always more fun opposed to only repairing defect devices. And at least the success rate of making things work is much higher. Especially when repairs have a partly mechanically cause that make them harder to fix.
      By-the-way: if you also want to make the Arduino ATmega2560 board based Diode Curve Plotter, you'll notice that most Arduino Atmega 2560 boards do not use the outer connector pins SDA,SCL,IOREF and the pin next to IOREF. And although they are present on the PE/Silicon Chip Diode Curve Plotter Board/Arduino Shield, they are not used and not connected to anything in the Diode Curve Plotter (Zener Diode Tester/Diode Curve Plotter Board number 04112181 Rev B& C) circuit. And neither to the underlying Arduino ATmega 2560 Board that doesn't use them because they as said simply do not exist there on its female connector. So we can just leave those 4 solder holes open on the Diode Curve Plotter Shield. Although in the PE march 2020 article it looks like they are used and occupied they do not have any function in the Diode tester.

      Likes(0)Dislikes(0)
  8. Waleed Rishmawi

    June 25, 2020 at 3:45 pm

    wow. thanks for sharing my friend. very detailed articles full with important information. I appreciate this knowledge a lot. have a blessed day

    Likes(1)Dislikes(0)
  9. Albert van Bemmelen

    June 25, 2020 at 11:43 pm

    No problem Waleed. Glad to be able to share the information. Have a blessed day too!

    Likes(0)Dislikes(0)
  10. JORGE VINICIO MARROQUIN ESTRADA

    June 26, 2020 at 12:28 am

    Excelente articulo y muy buenas aplicaciones.
    Felicitaciones.
    =========================================

    Excellent article and very good applications.
    Congratulations.

    Likes(1)Dislikes(0)
    • Albert van Bemmelen

      June 26, 2020 at 1:54 pm

      Gracias Jorge. Buena suerte construyendo herramientas Arduino.
      ===========================================================

      Thanks Jorge. Good luck building Arduino tools.

      Likes(0)Dislikes(0)
  11. Andrea Del Corso

    July 3, 2020 at 9:16 pm

    Complimenti Albert,sempre più bravo e pratico...
    =================================================

    Congratulations Albert, always better and more practical ...

    Likes(1)Dislikes(0)
  12. Albert van Bemmelen

    July 5, 2020 at 4:56 pm

    Grazie Andrea! Sono quasi pronto per aver terminato l'articolo menzionato Arduino Diode Curve Plotter. Alcune parti ordinate sono ancora in transito ma il touchscreen LCD da 2,8 pollici e il software funzionano già magnificamente! Avevo solo bisogno di eseguire il file di calibrazione del touchscreen.ino per cambiare il touchscreen configurato errato quando venivano usati i valori originali xey nel programma. E dopo aver trovato e modificato il programma, dai i giusti valori xey nel programma Zener Diode Tester.ino originale funziona correttamente! Tutto ciò che si può fare è anche disponibile gratuitamente sulla pagina Web PE online nel download del software per questo tester.
    ============================================================================

    Thanks Andrea! I'm almost ready with finishing the in the article mentioned Arduino Diode Curve Plotter. A few ordered parts are still in transit but the 2.8 inch LCD touch screen and the software already work splendidly! I only needed to run the Touch screen calibration.ino file to change the wrong configurated Touch screen when the original x and y values in the program were used. And after finding and changing the by the program give right x and y values into the original Zener Diode Tester.ino program it is working correctly! Everything about doing that can also be found free on the PE online webpage in the software download for this tester.

    Likes(0)Dislikes(0)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Free Report