A look at a cheap USBtinyISP board

On my most recent revisions of my breakout boards for the Atmega328p and Attiny85, I added a 6-pin ISP header. ISP stands for In System Programming, which, as the name suggests, means that the header is used to program the microcontroller as it sits in a circuit, which is especially handy for boards without a way to plug directly into your computer’s USB port or a board with a surface-mount microcontroller.

I’ve never actually used these headers since I was used to using my Arduino Uno to program the microcontroller for both of my breakout boards. To make sure I could add the 6-pin ISP header to the boards correctly, I read up on it from different sources to understand how to make the connections.


On the pinout of the microcontrollers, there are pins labelled SCK, MISO, and MOSI. These are three of the six pins of the 6-pin ISP header. The other three pins on the header are pins we all know well: Reset, Vcc, and Ground. The asterisk on my boards signify the first pin of the ISP header, which should be the MISO pin. The illustration of mine uses the pinout image in the Attiny datasheet where the six pins are underlined. I also drew up a simple diagram of the header pinout.

I received a cheap USBtinyISP board from China which took quite a while to get here. Thankfully it didn’t take much longer to get up and running.
IMG_20150704_125604The board came with a 6-pin ribbon cable and a USB cable. The USB cable is so short that it’s virtually unusable since the cable isn’t long enough to get the board to my desk from my computer. Thankfully, I have a longer cable I can use instead.

The first thing I did was to check the pinout of the cable so I don’t plug it in the wrong way on my boards. The easiest way the figure out the orientation of the header is to find Vcc and Ground with a multimeter, where you should see 5v across. It’s a 50/50 chance… so of course I got it wrong the first time as I saw the voltage reading fluctuate in the mV range.

Once I got the orientation of the connector right, I plugged it into one of my boards. I marked the first pin with a little sticker, as shown in the picture above.

Surprisingly, the Adafruit USBtinyISP drivers works with this board. I opened up Device Manager and updated the drivers with their files. The seller of this board had their own hosted driver files, though some poking around showed it was just the Adafruit drivers anyway.

IMG_20150704_124751First up was my Attiny85 Breakout Board. It’s not meant to fit into these half-sized breadboards but bending the power pins a little bit got it in. (If you bought one of these boards, don’t do this. This is a test unit, after all.)

I was able to upload the blink sketch directly from the Arduino IDE, with the Attiny85 settings and setting the programmer to “USBtinyISP “. The timing of the blink sketch was weird the first time I tried it, which made me realize I must have previously burnt the bootloader to use the 8MHz internal clock instead of the default 1MHz. I decided to try burning the bootloader so it would go back to using the 1Mhz clock. The USBtinyISP was able to do it and the sketch ran perfectly.IMG_20150704_124905Now for the Atmega328p Breakout Board. To upload through the USBtinyISP and the Arduino IDE, I can’t just click Upload like I did with the Attiny85 board. I have to hold shift when I click the Upload button to Upload Using Programmer. This is supposed to upload the sketch to the microcontroller without needing a bootloader. Once I upload a sketch with the USBtinyISP, I can’t upload a sketch if I place it in an Arduino Uno, so I guess that uploading with a programmer erases the bootloader…? To be able to use the microcontroller on an Arduino Uno again, I have to burn the bootloader with the USBtinyISP board. It’s not a big deal, but it’s something I have to remember to do so I don’t get confused why things aren’t working later on.

So with the FTDI and USBtinyISP programming tools at my disposal, I’m very excited to get the next revision of my Atmega328p Breakout Boards as they have headers for both devices. Stay tuned for news on that! Thanks for reading!

Something new for my toolbox: FTDI Basic

IMG_0001smI decided to pick up an FTDI board so that I can explore a new way to program the Atmega328p, specifically to see first-hand that it works so I can implement an FTDI header in the next Atmega328p Breakout Board. The FTDI Basic is a Sparkfun board, though I purchased it from RobotShop because they can ship within Canada.

I believe the one feature that sets it apart from the USBtinyISP (what you use those 6-pin ISP headers with on the Arduino, etc) is that enables you to do serial communication. This makes it a lot better for prototyping since you can debug using the serial monitor.

The original purpose of the Breakout Board was to take over from your Uno once you are finished prototyping… not really to use it to prototype. Technically speaking, there’s nothing wrong with prototyping on the Breakout Board, but it’s not currently breadboard-friendly and it only got a programming header (ISP) in the last revision. It sounds like an excuse, and it is, but to keep the board small while keeping the pins in order, it’s hard to organize the traces in the restricted amount of space to make the board breadboard-friendly. It’s a learning process with each board and revision so I hope I have learned enough to make it happen with the next one!
IMG_0001smAnyways, in short, the FTDI Basic works perfectly. I tested it with this Atmega328p setup on a breadboard. After installing the FTDI drivers, I was able to upload new sketches and print things to the serial monitor.

The one odd thing is that I had the understanding that to upload using the FTDI board, I had to hold shift while clicking Upload in the Arduino IDE, which changes it to “Uploading Using a Programmer”. That didn’t work. After a few searches, it turns out that changing the Programmer in the IDE to “Arduino as ISP” does the trick.

Getting up and running with the FTDI Basic so quickly makes me eager to get it into the next Atmega328p Breakout Board. I’m on the fence about keeping the 6-pin ISP header since you have more functionality from the FTDI chip (serial communication). I’d like to keep both, but if I can’t fit both on the small board, the 6-pin ISP header would be the one to go. Stay tuned!

Out in the open (Open-source stuff)

My ATmega328p Breakout Board is now open-source! You can get the Eagle files on GitHub.

I will be throwing up more of my PCB designs on GitHub soon too.

I just wanted to leave a quick note that a new through-hole version of the ATmega328p Breakout Board is coming out very soon on Tindie (parts for it will be here next week!). My hope is that this version will be more accommodating to the majority because I know there are those who don’t like surface-mount soldering.

Atmega328p Breakout PRO

The Atmega328p Breakout Board has been out of stock for a while. I have half of the new components in hand, and the PCBs have been shipped and are on their way. The rest of the components will be ordered in the next couple of days and, if it’s like the last time I ordered, it will arrive the next day. Friday is Good Friday so I have to keep that in mind, and hope that everything comes in by then. I’ve made the decision that I will no longer sell unassembled kits so I hope I can use this long weekend to put them together so I have a decent stock ready for the next week.

Anyways, while I’ve been waiting for the new batch, I’ve been working on something else…

draft1To the right is the first draft of the Atmega328p Breakout Pro. The current base version will likely drop the ISP header. The new Pro version will sport the ISP header, in addition to a voltage regulator circuit. As I talked about in the last post about voltage regulators, I’ve been using my AMS1117 voltage regulator boards with my Atmega328p Breakouts in my own projects. With the built in regulator on this Pro version, I won’t need that extra board. The regulator I’ll be using this time is the NCP1117.

I believe the NCP1117 is the same regulator as the one on the Uno, or at least similar. It can output a fixed 5v at 800mA, even though at 800mA it’s best to just use another supply if you’re driving things that need that much current. When I was learning about PLCs, I was taught to separate the power supplies between the control unit (the PLC) and the actual peripherals (sensors, indicator lamps, etc). I don’t see why that lesson can’t be applied to Arduinos, even if they draw less current than a PLC.

I’ve added in the reverse input voltage protection diode so the total drop out is roughly 2v, just like on the Arduino. You’ll need to supply it at least 7v to get the 5v, and I’d limit the input to 12v tops just because of heat dissipation.

I’ve been trying to find out if it’s acceptable to have an external voltage applied on the output of the regulator. I want to be able to apply an external supply to Vcc (the output of the regulator, and the input power supply of the microcontroller). That way, you could use a battery or supply that’s already in the operating voltage range of the Atmega328p (1.8-5.5v). I’ve been looking at some Arduino and Adafruit schematics and it looks like you can, if you consider USB Vcc as an external 5v supply. They have it connected to the same 5v net as the output of the regulator (although the Adafruit schematics use a different regulator). I’ll keep researching and probably put together a prototype demo circuit and see what happens.

That’s it for now! Thanks for reading and I hope you’ll stop by my Tindie store and pick up some of my Atmega328p Breakout Boards when they’re back in stock!

Attiny85 Programmer/Breakout RevB2 Preview

A little while ago, I posted about some updates to my Attiny85 Programmer & Breakout PCB that showed off a new design with a breakaway Programming section of the board. I threw that out and started over again. There’s still some work to be done but I wanted to show where I’m going with this.

render_frontThis is a render of what the board looks like. The program I use to render places the design on a rectangle so keep in mind that the purple outline would be the edges of the board.

The Power In and Attiny85 have swapped places. I’m going with an SMT LED and resistor for the power indicator to open up some more room on the board (labels are in the design, won’t be printed on the board).

The board is designed so that the Program section would be broken off once you’re ready to use the the board as a breakout. What if you realize later on that there’s something wrong in your code? You could connect up your Uno using the Breakout section, but you’d still need another capacitor for the reset pin on the Uno, and this kind of defeats the purpose of the board. I’m working on an experimental idea to make it easier. The pads next to the Power In area is a temporary programming area where you’d connect the Program section. The problem is making the connections. You can’t really connect the Program section back directly using headers because then you have no way of making another set of connections to the Uno. The best way would be to make the connections on a breadboard. It’s not ideal, but it’s still easier than looking up which pins of the Attiny85 go where on the Uno.

render_backI’ll put a URL to an updated manual on the board again. I still want to get some instructions on the board with the space I have but the small size of the board makes it difficult to put anything really specific. I’m on the fence on whether the text on the Program side will stay (the lines it’s referring to are on the top side of the board, I need to add lines on the bottom side too).

I’ve been making an effort to getting the sizing of text (and traces) right since I made the text on my AMS1117 board a bit too small.  I use mm to design my board, but a lot of help resources and parts of Eagle use mils. I made a table of conversions between mils and mm. I put it up for download as a Word document and pdf in case you’re interested. I got the table from here but formatted it to print.schematicI redid the schematic, chopping it up into sections and adding labels. Everything was directly connected to each other in the first schematic. It was messy, but not having things directly connected to each other does worry me in case something isn’t connected properly. I’m constantly checking connections and working on the other details of the board I talked about above so I’m taking my time. There were people watching the Attiny85 Programmer and Breakout Rev A board on eBay so hopefully that means there is some legitimate interest in these boards. I would like to get them manufactured.

Just a note for people who are Googling around for the warning, “Segment of net [name] has no visual connection”, I deleted the label of that net and placed a new one to clear the error. I couldn’t find much help when I was searching around so hopefully people land here if they run into the same warning.

Anyways, thanks for reading!

ATmega328p Breakout Test Results

In my last post, I talked about the tests I did with the AMS1117 Board. Now it’s over to the ATmega328p Breakout Board. The testing was a lot simpler, and included the AMS1117 board.IMG_20140919_121331This was it. The test was just to run a sketch on the ATmega328 microcontroller, uploaded using an Arduino Uno. The sketch was some patterns that used all 17 outputs (the 11 (not using RX or TX), plus the analog in pins used as digital outputs). The chasing patterns made sure that that the pads were connected in order. Here’s a video:

IMG_20140919_154612I used my multimeter to do some other tests. I tested the other pads on the board (RX/0, TX/1, and the Vcc and GND pads) with the multimeter. I also measured the curent flowing between the AMS1117 and the ATmega328 board. The reading in the picture above is from when all of the LEDs are on.

One thing I realized is that the 1A fuse for the uA and mA setting on my multimeter is blown. I went looking for them and the cheapest I can find is a 20 pack for ~$5… The A setting works just fine so I can live with it. The fuse on the A setting is 10A so it should last a while and would be the one I’m more willing to replace if it does blow someday.

Anyways, thanks for reading! I’m still planning out some projects so stay tuned!

New PCBs! (AMS1117 regulators & ATmega328p breakout)

I’m excited to finally have my second round of PCBs here! The designs are an AMS1117 regulator board and an ATmega328p breakout. I already have notes to share from soldering one of each to start testing them. The notes in this post are just from assembling them. I will have a separate post that goes into detail about my tests with them.IMG_20140918_193548This is how the boards were designed. They are meant to split apart easily with the tab between them. I got a little excited and went for it without scoring it first, so I destroyed one ATmega328 breakout since the weakest points in that area are the pin pads 2-4. No worries though, I got a few extras in this batch of PCBs, probably because they don’t take up the complete 5x5cm area I have to work with. I tried splitting another board by scoring both sides with a knife and they split cleanly without damage to either design.IMG_20140918_193021This is the AMS1117 board that has two fixed voltage AMS1117 voltage regulators. One produces 5v, the other produces 3.3v. It is a tight squeeze because the capacitor footprint is smaller than the actual capacitors, but it doesn’t seem like it’s an issue. On the back side is a note, written in text that’s a bit too small, that the dropout is 1.3v so you have to supply it with at least 4.6v for 3.3v or at least 6.3v for 5v. I forgot to include the drop of the diode which should be 0.7v, but most applications would probably use a 9v battery as the input to this board. It will be part of the testing, though 1.3v is the maximum dropout so results may vary between the regulators. We’ll see how the tests go.

It was fun placing the SMDs and trying to align them properly. It bugs me when my components end up in some awkward position so I feel the pressure with these small SMDs. I got to solder SMDs back in school where we used a flux pen, solder paste, and a toaster oven. I have none of those things so it’s hand soldering for me.
IMG_20140918_192836This is the ATmega328p breakout board. (The crooked oscillator is bugging me.) I really bumped my head with that terminal block for the power input. The terminal block I used on the board is 3.5mm while I’m sitting here with 5mm (0.2″) terminal blocks, which are the ones found on my Attiny85 board. It’s not a big deal as I can always go and buy them, or I can just solder wires like I did with this one.

The boards have proven to be functional, together no less. Again, full test results will be coming up shortly. Stay tuned! Thanks for reading!