Interlude #15: Making a USB Power Cable for My ATtiny85 from 4x AA Battery Pack | In The Lab

This post is part of my video blog and you can find more information about this video over here.

You can support this channel on Patreon: patreon.com/JohnElliotV

In this video we make a cable to connect a 6V battery pack with a 9V adapter to a USB Type-A female socket, which we can then use to connect a USB Type-A male through Type-B micro for powering my microcontroller.

We use the METCAL PS-900 Soldering Station to solder our cables.

We use the EEVblog BM2257 Digital Multimeter to test voltage and continuity.

We use the Horusdy Soldering Station with Hot Air Gun to shrink our heat shrink.

Thanks very much for watching! And please remember to hit like and subscribe! :)


Following is a product I use picked at random from my collection which may appear in my videos. Clicking through on this to find and click on the green affiliate links before purchasing from eBay or AliExpress is a great way to support the channel at no cost to you. Thanks!

Tungfull TH-161 Rotary Tool Accessory SetThis is an image of the product.notes

Let’s go shopping!

ATtiny85 in HW-260 board

I have my ATtiny85 microcontroller installed in a HW-260 development board (purchased from AliExpress). I program the ATtiny85 with the SparkFun Tiny AVR Programmer, the setup guide is here: Tiny AVR Programmer Hookup Guide.

On the SparkFun programmer the onboard LED is PB0. On the HW-260 the onboard LED is PB1. This is the code I used to flash the HW-260 LED:

#define LED_BUILTIN PB1

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

You can see the programmer settings I used in Arduino IDE in this screenshot:
Screenshot of Arduino settings

TIS-100 PoC

So not sure if I’ve mentioned TIS-100 on the blog before or not (update: I have). But it’s this neat computer game where you need to program a network of devices (the “Tessellated Information System”) in a pseudo assembly language in order to make a broader information system work. Anyway I was thinking about doing a hardware implementation of the system and using either some type of ATtiny (probably an ATtiny85, maybe an ATtiny45) or maybe an Arduino Nano. I did a mockup with an OLED display using a nano:

SparkFun Tiny AVR Programmer PGM-11801

I have one of these: SparkFun Tiny AVR Programmer PGM-11801. I was thinking of getting another one or two for backup, but there’s probably no need at the moment.

Also I figured out how to put a programmer on my Pluggable ATTINY Development Board For ATtiny13A/ATtiny25/ATtiny45/ATtiny85 Programming Editor Micro Usb Power Connector (see that link for details).