Tron Club Review / Build Loggy Thing

Disclaimer: I’m not being paid nor part of Tron Club in any way (other than a normal subscriber).

Part one:
I first found Tron Club on a EEVBlog mailbag of all things. It seemed like cool idea and I instantly linked it to a few friends and also signed up for it. Sign up was easy, although the website could use a little work. After ordering I decided to look at how long it would take to get the first one. Their FAQ lists up to 3 weeks for them to ship the first one and then every month after that one would come. They have two levels, Beginner and Advanced. I went with advanced so I could get some more programming experience in a nice controlled environment. Each kit you get comes with some parts and an online booklet with around 20 circuits for the set of parts they give you.

My first one took 5 weeks to show up! But the second one showed up 2 weeks after that. I’ve been on vacation and haven’t gotten through too many of the circuits. I’ve also been waiting to write this post(s). At this point though, I think I would recommend Tron Club, although they aren’t good at responding to questions.

Kit #1 (ATtiny 13):


The kit showed up in a small box with bubbled wrapped parts in it. Overall, it’s packaged okay, although some of the small components tried escaping their bag (including the ATtiny). Everything shown in the picture came with the first kit (minus the mat).

A small business card is included which has the online booklet code to gain access to the circuits. Since this is the first kit, they also have Windows and Mac configuration information and downloads for WinAVR and the USBasp programmer that was provided with the kit. This was pretty smooth. They do list using Command Prompt for Windows, although Powershell works as well (not sure why this is the default for my computer, but oh well). I had an issue programming the ATtiny and wasn’t sure if it was a Powershell issue or not. Turns out the jumper on the USBasp was set to 3.3V and not 5V. Not quite sure why it didn’t program as the ATtiny works at 3.3V. I’m sure it’s in the datasheet somewhere.

Each circuit is based on a simple task, each building on the last (at least from what I can tell from peeking ahead). The sections give a little information on the circuit, how to hook everything up with both a schematic and a breadboard diagram. They also give some information from the ATtiny datasheet when important. Like the ATtiny pinout or a register configuration table. The last thing included is the code and Makefile as a download. The code is also printed out and portion is talked about. I.e. what the include statement is doing and what some different labels/registers are. There are also some extra goals at the end of each circuit to prompt some external learning or code modification.

I don’t think I’ll go through each circuit in depth as that would be a lot of work. But I think I’ll touch on my gaps in knowledge, what I’ve learned, or anything else to note.

Decided to do five circuits per post for now.

Circuit 1, Turning on an LED
While I don’t have much experience with C, I have some programming knowledge that will help me out. I’ve recently went through a good portion of the SoloLearn Android app for C++, so some of the code they use make some sense to me. Otherwise, I do have gaps in knowledge that aren’t explained. Why are some include statements used but not others for instance.

Overall, this circuit is very easy, set a pin for output and turn the LED on. They use pointers for setting the pins. For example, DDRB = (1<<DDB4) or PORTB = (1<<PB4). While I know what these are, Tron Club doesn’t seem too interested in explaining the code that deep, at least not yet.

Circuit 2, Blinking an LED
Not much to say here. They’ve added another include statement that I don’t know where they come from. I’m assuming WinAVR has some specified/included in the compiler. Need to look this up still. Last time I’ll bring it up.

Circuit 3, Timer Interrupts
We get into some more interesting stuff here. The code is to flash an LED based on the clock speed (which I don’t get why the default speed is 9.6MHz/8) prescaler’s setting. This means referring to the datasheet for the prescaler table (which they include both as a picture and with the section number). In the code they use a bitwise or assignment (|=) to set the prescaler and the task is to change the prescaler value and observe the changes to the LED’s flashing speed. They also use the bitwise XOR assignment (^=) for creating the toggle effect in for the LED. Thinking about it now as I write this. I wonder if that is a lazy way of doing the toggle since now some of the other outputs would be high? You can see here that the code is fairly well commented and at least explains what some of the more confusing lines of code are for. Like the need for “sei();” to be in the code.

This one was pretty interesting to see what some of the later circuits could become.

Circuit 4, Button Interrupt
This one is pretty much as expected. There isn’t much new from the last one. A button is used as an interrupt opposed to the clock and they introduce us to the interrupt trigger settings (rising for falling edge).

Circuit 5, Pin-change Interrupt
They changed the button’s input pin in this circuit from the last circuit and I missed that after looking at it a few times. Past that, it’s a very similar idea from the button interrupt. Just that you no longer have control over when the interrupt is as it’s just when the pin’s logic level changes. This was a simple one!

1 Like

Circuit 6, Both Interrupts
In this circuit, we have both styles of interrupt from before available at the same time (edge based and pin change based). A second button was added to do this. The code uses two ISRs, one for each button in the circuit. The code is simple and allows for some modification to test the “ISR_NOBLOCK” flag which is talked about.

Circuit 7, Switch Debounce
This is an interesting one. They use the timer interrupt to increase the counter after a short amount of time based on the clock prescaler. This is interesting to me as they have a 10ms delay in the main for loop to slow things down some more. I also don’t really know how it works though as I don’t get what triggers the timer overflow. I think it’s got something to do with the clock, but it’s not 100% clear I guess.

I tried to implement my own counter as a part of the bonus goal, but couldn’t quite figure it out.

Circuit 8, Counting Button
This one is pretty easy. It takes the same code from above and just adds some counting logic for the buttons/LEDs. One button increases the counter, the other outputs whatever was counted on the first button and then clears the count. They do use the Pin Change interrupt for counting the button presses, which means needing to divide the count in two.

The bonus goal was to display on one LED multiples of fives and on the second LED any ones that are left over. It was actually pretty easy, but nice to see that I can do some stuff.

Circuit 9, Shift Register
Really not much to say here. It just uses a CD4094 with a 8 resistor SIL package to drive the 8 LEDs. But not much is done with the code, just writing a fixed value.

Circuit 10, ADC
A lot of new terms/labels for the ATtiny were introduced here to get the ADC running. It all makes sense for the most part. Just a lot of terms to remember. But at least I have the handy code to look back to, to understand what to do.

The extra makes sense now that I looked at the other comments, but man, I was so confused for so long on it. It asked to change the LED output from one of the four LEDS based on the ADC read from 0 – 255 to a binary output, but for some reason, it just didn’t click with me.

1 Like

Circuit 11, PWM ADC
Not much to say here. It uses the same ADC code to read back the potentiometer signal and then uses that value for the PWM output via OCR0B. While simple, the code is good to go though.

Circuit 12, LCD: 4 Bit mode
Back to using the shift register, but with a 4x20 LCD screen! The wiring in this one is…. Complex. Can you spot the error? (haha) While I do have normal wire, I figured using the wires they gave me would be faster to build, so I decided to not cut/strip my own. Interesting to note that the LCD screen used push in headers for the pins. I didn’t know that they were a thing and is quite awesome. It’s a very tight fit and required using pliers to get the pins in. The potentiometer is there to control the display contrast.

The code is split into two files, main and the LCD initialization/control files. Main calls for the LCD to initialize, clears the display, and prints some code (the letter “A” in this case). The LCD code is much more complex and thankfully there are some good comments on what each part is doing. It has code for sending a 1, 0, clearing the display, and initializing it. They have also included two characters in the code, A and ス (J su?). The one thing not really explained in their documents is the need to send a one before the nibbles for each 4-bit portion of the character codes. I’m sure it’s in the datasheet, but haven’t read that yet. Adding character data is laborious if doing it by a series of 1’s and 0’s though. I’m sure arrays or loops of some kind would help a lot!

Overall, pretty easy to understand, just need to know the commands from the datasheet and what is important to call for setup. Interfacing is easy then.

Circuit 13, LCD: 8 Bit mode, Count in base 4
Had a funny moment of getting garbage text on the screen when I first downloaded the code. Turns out there was more changes to the wiring between 4-bit and 8-bit mode than I first thought. The code that they implement here is a 3-digit, 4-bit counter (in the form of k, j, i) on the display. It then resets when it gets to 333. To do the counting, they use the timer overflow interrupt like before.

The extra was a little confusing to me. The idea was to display numbers without the use of variables. Someone commented on how they did it. I get how it was implemented, but never would have really thought of doing it that way.

Circuit 14, LCD: 8 Bit mode, Count in base n
This one is interesting. They made the code very flexible by using a way that I’ve already thought of doing it like (but didn’t know how to implement it). Arrays! That being said, it makes some good sense. Again, using timer overflow to trigger a counter, which you can then specify a base to count in 2 to 10. From there it coverts it and then passes it off to a function which displays the numbers on the display. Also included is a display shift. One thing confusing about the shift is that the lines aren’t in order. It seems like line 3 of the display follows line 1 in the address space.

The extra confused me a lot. I couldn’t find a good description of the cursor position codes in the datasheet. After some digging online, I understand it. And I found where it exists in the datasheet (under setting the DDRAM address).

Circuit 15, LCD: Banner
This code just scrolls text across the screen. It’s honestly not very good. I think what is missing is a complete clearing of the display before it shifts the text over. They do have code to clear the display, but after the text shifts you can see the previous text for a little longer (maybe 150-250ms). I think this is more of a hardware problem and larger resistors could be used to drain the LCD sooner. The way they move the text is interesting. The clear the display, move the cursor home, then print spaces to move the text back. I think addressing the cursor directly would yield better results overall.

I’m interested that these exercises seem a bit isolated from a practical application. Does that impact your interest in the project and/or the ability to move forward?

Short answer: Not really.

Long answer:
That’s a good question. One that I haven’t considered before. For me, at the moment, it’s not a problem as I don’t have a real end goal in mind. I just want to learn how to do… anything really within the hardware and software realms. I had no expectations going into the first kit, though peaking ahead to the second and third kits that I have received, it seems to become more focused on a smaller set of parts. For example the third kit focuses on RFID tags and a small LCD display (48x84).

I think the beginner kits are similar, based on what my friends who got those kits have told me.

That being said, it doesn’t bother me that there is no final project that I get out of it. More of an introduction to ATtiny and all of these related parts which help get you to being able to design your own projects. While I could go online and find code for a display, the wiring might not be correct for exactly the parts you have or the code might not do exactly what you want. So Tron Club provides notes on the code (and what is important), the wiring, and the parts to all work together. You then have a working example of those parts. Not everything is handed to you though. There are times you have to dig into the datasheet to find out why or what something is.

The real “end goal” I have is to get a job working with a hardware focus(schematic/PCB design), but room for some software exploration as well.

I was actually talking with a friend about this yesterday. There are some folks (like yourself) who are capable of grinding through the practice without a necessary end goal. I am, sadly, not one of these people. Hence the term “contextual”. Without context, I get real frustrated and lost.

Perhaps it’s good that the Tron Club is presenting tasks as “these are critical skills” though? It always helps to have someone in a position of authority be like “At least start here…”

This is what I like about the Tron Club stuff. While I think it has other issues, the one thing that it does well is provide a starting point. I feel like I know enough to design quite a few different types of boards, but I never know where to start (CE is great for this too and I wish I had time for more of it). I also struggle with “What should I make?” a lot since I don’t have any direct needs which I can solve with a project, and making something just to make something is a hard sell to myself since I want to be able to use whatever it is that I make.

I do too, but this comes into play more when I am trying to learn theory behind stuff. To me theory is great and all, but useless if I can’t see an example in the real world.

I’m curious as to just how much interest there is in kits like this. I got my start in electronics when I was around 10 years old and my parents bought me a small 50 in 1 project kit from Radio Shack in the shape of a UFO. It wasn’t long before I wanted the bigger 300 in 1 kit. While these types of kits still exist, the type with a bunch of components and springs mounted on a piece of cardboard in either a wooden or plastic box, I think they are way over priced and still only offer basic projects like AM radio receiver and sirens etc. For a while I have been toying with the idea of producing some kits of my own but more modern versions. Instead of cardboard I would mount the components to a PCB with breadboard like wiring instead of springs. Surface mount components would allow me to pack a lot more components onto a reasonable size PCB allowing for more projects. And instead of trying to come up with all the projects at once I would have an initial set of projects that came with the kit and a website where more projects could be downloaded. Perhaps even a forum where people could share their own creations. I had two basic kits in mind, an analog kit and a digital kit. I was also thinking of a microprocessor kit similar to the one Ben Eater made, but a little more capable, as an “introduction to microprocessors” type of educational kit. I have all kinds of ideas for this sort of thing but haven’t developed them as I wasn’t sure if there would be enough interest.

I feel like there might be more interest now than there was a few years ago. The “Arduino Kits” are pretty prevalent nowadays (although that doesn’t mean they are… wanted/useful to learning really?). I feel like something that has good instructions with end goals/projects is something that I would have really liked a few years ago. I mean, I still want them now because I do think that education is something that is never really thought of. A well structured kit could do wonders to getting people to learn. I think the hard part is making it “fun” and “approachable” to people/kids who don’t know electronics.

I agree that there are too many basic kits on offer too. A good idea maybe would be to break up a more complex project into units that can be built and tested separately from each other that then get plugged together to make that larger project.

I think there is a market for it, but getting it out there is one of the harder parts. Other than getting it to be well documented with only critical info and making it fun.

Yeah, that was sort of what I had in mind. Instead of the typical “basic” kit and “advanced” kit I was thinking of one kit that could be both. It would support small simple projects but also allow combining them into more complex projects.

To further emphasize the educational aspect of the kits I had also considered including a built-in USB scope, nothing too fancy but adequate for the projects you are likely to build with the kit. So the top of the PCB would be the components the user would use in the projects and the other side of the PCB would be the USB scope (scope for the analog kit, logic analyser for the digital kit). This would allow the projects to be more in-depth without expecting the user to have a bunch of other equipment available. For example a project could be an audio filter and then they could measure the frequency response etc. That way the kits would be a complete “lab”. Perhaps even suitable for educational institutions.

The discrete microprocessor (linked above) would not be a “kit” as such nor would it include a USB logic analyser, the USB interface would be used for programming etc. That “kit” would probably come preassembled and tested.

I think the documentation would be the biggest challenge and probably the part that has held me back so far.

I think that is a good idea overall. I would be curious to see it in a rough form! I love learning new things!

Documentation is for sure the hardest part of any project. Haha.

AND HERE’S MORE!

Circuit 16, LCD: Customer Character
This one is all about creating a customer character and the overhead of getting it to work (with creating the character and saving it to a CG memory address). Another user created better code to do this (with an array). He also linked a tool for creating a 5x8 character array, which is the coolest thing ever (for this). https://omerk.github.io/lcdchargen/

Circuit 17, LCD: EEPROM Memory
A boring introduction to the EEPROM of the ATtiny. Just a custom character basically saved to 8 of the 64 bytes of the EEPROM.

I did reuse the code that the other user wrote to decrease the number of lines needed to output the custom character though. Reduces the number from 40 lines to 15, with 6 of those lines being a “}”!

Circuit 18, LCD: Button Input
Fairly simple code to display “LOW” normally and “HIGH” when the button which was added is held down.

Circuit 19: LCD: Counting Button
Expanding on the button, the code now counts on every button transition from Low to High to Low.

I expanded on the code to only work on a button press and not button release. I did this with a simple check for the button state and use the supplied timer interrupt to debounce the switch. I had to increase the counter to 33 to make sure that there wouldn’t be accidental counts.

Circuit 20: LCD: ADC
New circuit config to use LCD to print out the ADC data. The code only breaks the ADC down into 10 levels (0-9) and reports it out to the LCD. I see the reason for doing this, since there is no function made to bulk send data to the LCD.

Circuit 21: LCD: Thermometer
This circuit introduces an NTC thermistor to do some crude temperature measurement for the ADC.

At first it didn’t seem to work, I would put my fingers over it and it would only increase by ~2-3 degrees at most. I left it alone for a bit and when I came back and re-flashed the micro, it is working fine now. :shrug:

I did have an interesting issue with avrdude and compiling the program though. Normally I use VS Code while doing this since it’s a lightweight code editor with terminal built in for easy access to avrdude. And because there is a makefile included (which I have no idea how to generate on my own). I added a cursor off function to the program so I didn’t have to look at the thing flashing and it wouldn’t write the generated hex file to the micro. It was complaining about an address out of range error in the hex. Taking those same files though, moving them to Atmel Studio 7 and compiling there had no issues. I’m not sure what the issue is, but at least I know there is a backup when issues crop up.

I was looking for a way to decompile the hex file and see what the issue was and even though Atmel Studio 7 can apparently do that, it doesn’t work. I’ve tried one online one too and it seems a little wrong.


And that is it for the first Tron Club. Overall, it’s an interesting idea that I don’t know if it has a ton of benefits. I think that’s what the people decided though as after the first three kits, my account got put on hold automatically and hasn’t been released since then.

I don’t think I’ll go through the other kits one at a time like this one, but I think I will mention highlights. I for one am excited to work with the RFID stuff they included.