Building New Tools For Our Man Cave
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.
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.
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.
Below the much smaller TinyISP ATtiny45 programmer.
Below the top side of the TinyISP ATtiny 2313 programmer. For R1 and R2 use 68 ohm instead!
Below a top view close-up photo of the tiny TinyISP attiny45 programmer.
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.
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.
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.
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 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: