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(58)Dislikes(1)

26 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(4)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(7)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(6)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(4)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(3)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(3)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(3)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(1)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)
  13. Albert van Bemmelen

    August 23, 2020 at 12:22 am

    Last update on building the mentioned DIODE CURVE PLOTTER from Silicon Chip and PE magazine. It sadly works only partly. The second square box on the right bottom screen is always empty and always visible showing nothing! It should show the data in the negative curve of the graph where the x and y axe values are negative. Therefore probably also the curve in the left bottom quarter of the screen can't be selected, only the top left positive quarter of the graph is selectable and that data is correctly shown in the bottom square box on the left of the screen.
    In the meanwhile I already tried to program 5 ATmega 2560 Arduino boards (rev5 and older) over USB and over ISP with the TinyISP programmer, which made no difference at all. The problem of the empty square bottom box on the right kept showing persistently. So I also tried older and newer Arduino software versions, still without any progress whatsoever. Because I've build several Arduino projects over the years that all worked flawlessly I'm guessing that the Diode Curve Plotter is having bugs in the Zenerdiodetester .ino software. And for the time being I gave up on solving this issue because it must be a design flaw somewhere. And I doubt that I'm the only one that couldn't finish building this in Silicon Chip and PE magazine published tester successfully. According to the author it should all work fine but sadly it didn't.

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

      August 27, 2020 at 9:14 pm

      ALSO READ THIS! About the still not correctly working Diode Curve Plotter aka Zener diode tester the problem is even worse! According to an email I got indirectly from the author you also can easily destroy your ATmega 2560 board! It wasn't mentioned anywhere in the PE and neither Silicon Chip article, but he said that if you place the jumper on the Diode tester board apparently before programming the Arduino Board, it could kill your Arduino board because of the higher external voltage. But the strange thing here is that nowhere in the article clearly was mentioned either when you should or shouldn't place your Diode Tester Board with or without jumper on the Arduino Mega 2560 Board while programming or pre-programming safely. And they even admitted that the article should have mentioned this more clearly. Although I explained the persistent issue with the always there and always empty second square box on the bottom screen right and the not working cursors in the left bottom curve of the negative x- and y-axe going graph, still no plausible solution to solve the issue was given. So better avoid this project and do not build this lame Diode Curve Plotter! You will be very disappointed. The free Practical Electronics/Silicon Chip Arduino software download comes with a price because it just doesn't work as was presented!

      Likes(0)Dislikes(0)
  14. Albert van Bemmelen

    September 9, 2020 at 3:34 am

    Correction about the Diode Curve Plotter Aka Diode Tester: Today I read the article from Silicon Chip again, and I noticed that it said that the second square box on the bottom right only will show information on the matching point on the curve that compares to the in the settings set maximum power value.

    In manual settings I therefore chose the lowest power value possible which was about 50mW and it showed that position on the curve for my green Led under I/V test.

    So that was for the first time the second box showed any information. And I now know that I have at least 5 other good Arduino Mega boards that also work without anything being damaged previously. (the jumper setting after programming was done to prevent blowing up the 2560 ATmega chip warning!)

    Why the explanation in the magazine talked confusingly about using the reverse option for the second box to appear I do not understand because the reverse option never does really show anything selectable in the negative x- and y- axes part of the curve by pointing on the curve in that (left bottom) quarter of the plotted graph. That quarter of the screen never is selectable!
    Not in the normal I/V plotted curve screen and neither in the reversed plotted curve screen!
    So I still do not see the value of reversing the graph?
    And the article in that respect was very unclear in the way those square information boxes will appear when running the Diode tester program.

    And the article should have explained that only the positive going plotted curve (the top right quarter of the touch screen) can be selected by using the cursors. But it never did.

    So the PE/Silicon Chip "Diode Curve Plotter" finally really works and building one is not the problem. Only not knowing that the negative part of the left bottom quarter of the plotted curve, where x and y are negative, never can be selected with the cursurs was the problem. But this Arduino tester now does work and is added to my other useful Testers.

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

      September 10, 2020 at 8:02 pm

      Important Note: I just noticed a bad thing about the mentioned problem of The Diode Curve Plotter not showing any information in the second square bottom box on the right on the 2.8 inch touchscreen. Only when you use an external power supply inserted on your Arduino Mega board instead of using the 5V USB port to power your Diode Tester will give correct resulting curves and both working information showing boxes!
      Because powering the Diode Tester over 5V no matter how high the given current will NOT work and only shows wrong results (completely wrong curves) and again an empty second square box on the bottom screen right! So keep this in mind! Which makes this devices sadly not useable by powering up using an USB powerbank! Which makes it less portable by giving completely wrong results and still the missing square box information!

      Likes(0)Dislikes(0)
  15. Albert van Bemmelen

    September 14, 2020 at 1:00 pm

    Also note that the PE March 2020/Silicon Chip March 2019 article says to use a higher amp 5V USB powerbank or supply to make the Diode Curve Plotter work correctly. But that is not true! That never makes any difference since the voltage is still too low at 5V because the tester not only has known limitations if it is used on the Arduino USB connection, it also is limited because it produces wrong curves that vary with the input voltages if the Arduino ATmega power input is used. Even at 12V the tester produces completely wrong curves, and the tester curves on my tester only were convincing at a voltage of about 7,5V DC (7,62V measured). So this is something that makes this Diode tester project a disappointment and definitely should have been mentioned in the article! Because on 5V USB it doesn't work no matter how much current you put in and neither does it work on 12V giving completely wrong curves.

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

      September 15, 2020 at 12:27 am

      PS: The reason for above mentioned issue is that the Diode tester circuit with its 100V generator are driven directly on the unregulated Vin voltage on PWRIN right after the D1 diode on every Arduino ATmega board. See next circuit => https://www.arduino.cc/en/uploads/Main/arduino-mega2560-schematic.pdf
      Only if the autor had used a stabilized voltage to feed the entire tester AND had used the right calibrated voltage at which only correct curves would be produced, it would have been a very good project. Now it is sadly not and the article(s) are wrong saying 5V and 12V work. Why the author, who wrote a very interesting Arduino program for a very interesting tester didn't stabilize his entire Diode tester circuit beats me. Maybe he just couldn't find the right voltage at where every diode upto 100V worked? And calibration now is a real problem! But at the moment there is no equally interesting project that can do what this tester can do for the affordable price it costs. And after all the software/firmware is completely free!

      Likes(0)Dislikes(0)
  16. Ulise Aguilar

    September 13, 2021 at 10:14 am

    grate sir

    Likes(1)Dislikes(0)

Leave a Reply

Cancel 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.

Open

Close