Tron-Club

Introduction

Tron-Club is a monthly subscription box for circuit building. Each month, subscribers receive a kit of various electronic components along with an online booklet containing around 21 project guides. There are two separate paths for subscribers to follow: basic and advanced. The basic series focuses on components like resistors, LEDs, and simple ICs. The advanced series focuses on microcontrollers and programming them in C. Projects can vary from turning on an LED to controlling a motor or writing sensor data to a display. Each project comes with a circuit schematic, a diagram of how to physically wire it up on a breadboard and a brief discussion of any relevant theory.

I’ve gone through the first of both the basic and advanced kits. The kits were fun to put together. The format was reminiscent of my university electronics classes and provide a good mix of content.

Tips

While the lessons are good for the most part, you may run into some difficulty on some of them. Below are some fixes that you may find useful if you’re new to the world of electronics:

Basic Kit #1: Exercise 21

This exercise involves pulsing a motor, but you may notice that when the motor is connected the timing changes. This is can be caused by a backward voltage from the motor flowing into the battery, which affects the regulator, which affects the 555 timer.

Solution: Place a “flyback” diode across the motor. This helps prevent backward current flow from the motor from interfering with the other components. Probably won’t completely solve the problem. However, this is a common practice for motors or other inductive loads. Adding an extra capacitor across the power rails helps as well to smooth out the voltage spikes. In order to completely fix the timing issue, you can use a separate battery which is connected only to the motor, but tied to the same ground as the rest of the circuit. This isolates the motor and prevents it from affecting the regulator and 555 timer. However, this isn’t possible with only the components provided in the kit.

In the schematic below, the 9V can be from one battery as it would be in the original schematic, or a separate battery if you have one available.

Basic Kit #1: Exercise 22

This is another pulsed circuit, but if you wire it up as shown nothing will happen. This happens because there is no capacitor for the timer to charge.

Solution: We need to have a capacitor connected between the trigger input (pin 2) of the 555 timer and ground. Remove the jumper between pins 6 and 7 of the timer. Instead place a jumper between pins 2 and 6. Place a 10k ohm resistor between pins 2 and 7. If you want, you can add the photoresistor in series with the 10k ohm resistor. The circuit now matches the typical astable 555 timer circuit and should have an on time of about 14 seconds and an off time of about 7 seconds. Disconnect the motor and power up the circuit. You should be able to see the LED switching on and off.

If you plug the motor in, you’ll most likely see a lot of chatter in the LED’s switching like in the previous exercise. Adding an extra capacitor across the 5V and ground rails will help smooth out the voltage spikes, but the best way to remove the issue is to use a separate battery like the exercise above.

Advanced Kit #1: General

Tron Club recommends the use of Notepad++ as a text editor, which is perfectly fine. However, I found that I prefer GitHub’s Atom editor for all my code editing. The interface is a bit cleaner and I like the customization options it offers.

Advanced Kit #1: LCD Exercises

Some of the provided code in the lessons involving the LCD display in this kit isn’t very beginner friendly. Instead of having to write out a lot of extra code each time we want to send a certain 8 bit value, we can write a single function that handles all of them. I also created a function that will print a string of characters. Adding these into the source code makes it a lot easier to work with.

The function my_print_byte loops through each bit of the 8 bit input and checks if that bit is a zero or one then uses the Tron Club provided functions Send_zero or Send_one accordingly.

/* Function that sends any 8 bit value to the LCD, includes data and commands
 * Example:
 * my_print_byte('a');
 * my_print_byte(0x02);   (0b00000010) Command to clear the display.
 */
void my_print_byte(unsigned char num)
{
 char i;
 
 for(i = 8; i >= 0; i--)
 {
  if( ((num >> i) & 0x1) == 0 )
  {
   Send_zero();
  }
  else
  {
   Send_one();
  }
 }
 
 PORTB |= (1<<REG_SEL);
 LCD_read();
}

The function my_print_string loops through an array of characters and prints each one using my_print_byte . The inputs to the function are a pointer to the first character in the string and the number of characters in the string. Pointers can be a bit confusing if you’ve never programmed in C before, but they make function like this a lot easier. A pointer, like msg in the example below, refers to a specific location in the microcontroller’s memory. In this case, we give the function the location in memory that holds the first character in a string. Then when we want to access the character to print it, we specify we want the contents located at msg using *msg . Then we increment msg which moves the pointer to the next character.

/* Function to print a string of characters
 * Example:
 * char message[] = "Hello, world!"
 * my_print_string(message, 13);
 */
void my_print_string(char *msg, unsigned char size)
{
  char i;
 
  for(i = 0; i < size; i++)
  {
    my_print_byte((*msg));
    msg++;
  }
}

Replacements

If you happen to damage or lose a part from one of your kits, I’ve compiled together a bill of materials for the kit along with Digi-Key part numbers that you can order for replacements. The USBasp programmer and the LCD module from the advanced kit aren’t carried by Digi-Key, but everything else is an exact match or functional equivalent.

Tron Club BOM.xlsx (11.2 KB)

Table 1: Basic Kit #1 BOM

Note : Bold italic part numbers are functional equivalents.

Qty Description Part Number
2 10k ohm resistor 10.0KXBK-ND
2 510 ohm resistor RNMF14FTC510R
2 470 ohm resistor RNF14FTD470RCT-ND
2 100 ohm resistor 100XBK-ND
2 680 ohm resistor S680CACT-ND
1 68k ohm resistor S68KCACT-ND
1 4.7k ohm resistor S4.7KCACT-ND
1 2k ohm resistor 2.00KXBK-ND
1 2.2k ohm resistor S2.2KCACT-ND
1 270 ohm resistor S270CACT-ND
1 22 ohm resistor S22CACT-ND
1 3.3k ohm resistor S3.3KCACT-ND
1 220 ohm resistor S220CACT-ND
5 Red LEDs 160-1701-ND
3 1N4001 diodes 641-1310-1-ND
3 2N2222 transistors PN2222AD26ZCT-ND
2 Push button switches CKN9097-ND
1 Slide switch EG1903-ND
4 1000 uF capacitors 493-13427-1-ND
15 Assorted jumper wires 1528-1154-ND
1 5V relay 399-11052-5-ND
1 555 timer LM555CNFS-ND
1 7805 5V LDO LM7805CT-ND
1 IR LED 1080-1084-ND
1 IR receiver 1080-1142-ND
1 Photocell PDV-P8103-ND
1 Motor P14346-ND
1 2-input NAND chip 296-1563-5-ND
1 2-input NOR chip 296-1564-5-ND
1 6-input NOT chip 296-1566-5-ND
1 3-input NOR chip 296-14890-5-ND
1 9V battery N145-ND
1 Battery clip w/ wire leads BS6I-ND

Table 2: Advanced Kit #1 BOM

Qty Description Part Number
1 USBasp Programmer N/A
1 ATtiny13 ATTINY13A-PU-ND
2 Push buttons CKN9097-ND
2 10K ohm resistors CF14JT10K0CT-ND
2 330 ohm resistors S330CACT-ND
46 Assorted jumper wires 1528-1154-ND
1 330 ohm resistor array CSC330W-ND
2 1uF capacitors 478-8041-1-ND
8 Red LEDs 754-1201-ND
1 Photocell PDV-P8103-ND
1 250K ohm potentiometer 987-1713-ND
1 LCD display module N/A
1 Press fit 1x16 Header 10083113-116LF-ND
1 Shift Register 296-2069-5-ND

Contact

If you have any questions, you may post them on the Digi-Key TechForum