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.

attiny85pinoutisp

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!

Advertisements

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!

New products you already know

Yesterday I released two “new” products. They are both revisions of projects you’ve seen on the blog before.

IMG_0001

They are both the second revisions. They are the Attiny85 Programmer & Breakout Board and the Atmega328p Breakout Board. They’ve both been completely redesigned (ie. manually routed this time) with new features!

IMG_20140916_123258

Remember this clunky old thing? This is the original Attiny85 Programmer & Breakout. I really wanted to go for something more compact and breadboardable.

1I really like how the new one turned out because my measurements worked out! The board can sit on the edge of an 830-point breadboard so that the programming and breakout pins fit into the prototyping area, with the input power pins fitting nicely on the side power rails.

IMG_20140918_192836

To the right is the old Atmega328p Breakout. There’s not much change to the way it looks but the new board does have a few nice changes to it.

1The new board now breaks out the reset pin so that you can add an external reset.

Both boards now have LED power indicators, SMD components, and 6-pin ISP headers.

Head on over to my Tindie store to check them out!

So that’s what’s been going on. I’ve been meaning to do a new light show (possibly sans fountains for now). I mostly just want to use my new shift register boards with the PWM control it now allows… Stay tuned and thanks for visiting!

And now for something new! (Store blog category)

The blog’s viewship has already surpassed January, so we’re on our way to getting back to how it was at the old blog. This is mostly thanks to my ESP8266 project. I feel like I’ve been neglecting the blog because I haven’t had much to talk about in terms of new Arduino projects… That’s why I’m here to start a new blog category called Store, which will give you some insight on how my experience selling my products online is like, which is what has been taking up all of my time. Sorry if you’re not into big walls of text, but I hope to include pictures where ever I can.

Not too long ago, I decided to take designing circuit boards more seriously so I could start an online store. Since then, I’ve listed some of these boards on Tindie, as well as some used parts from my PLC trainer on eBay. The money raised by the sales on eBay is going directly toward the development of a couple products that will be hitting Tindie in the coming weeks. Planning it all, even though it doesn’t seem like a lot, has taken up a lot of my time, which is why all of my Arduino projects have taken a backseat.

I’ve raised just enough money so far to cover the costs of doing a relatively small run of some new boards. They are the second revisions of my Attiny85 Programmer and Breakout board, and my Atmega328p Breakout Board. They both got some important changes. They’re both manually routed and include a power LED indicator. They also include ISP headers for advanced users with their fancy 6-pin ISP cables (but you can still use jumper wires). Most of the components have changed to SMD.

alone

The Atmega328p Breakout now breaks out the Reset pin where you can easily add in an external button. It covers two pads so you basically want to short the connection, using a button or switch, to reset the microcontroller. It’s slightly more friendly than the single Reset pin like on the Arduino.

Like I said before, the boards are also getting power indicator LEDs and ISP headers, which you can see in the top left corner of the board. Originally, I left that area open because my AMS1117 voltage regulator was supposed to line up with the input power pins of this board but it didn’t work out right.

alone

The Attiny85 Programmer & Breakout sticks to its roots as being a simple-to-use programmer, so it still includes a section that tells you what pins to connect to the Arduino, in addition the new ISP header. The size is also much smaller and is designed to fit into a breadboard (830 point, and similar) where the input power pins fit into the power rails of the breadboard, and the Program and Breakout pins fit into the prototyping area of the breadboard. The ISP header is typically sticking out from the top so it shouldn’t interfere with this plan.

That’s it for now! These boards should be ready sometime near the middle or end of March. Fingers crossed it all goes well!

Attiny85 Programmer/Breakout Rev B3 Preview

Let’s go back to basics, shall we?preview1_frontI decided to throw out the whole breakaway section idea. It complicated things and there’s always the chance of a bad break. I put everything back on one board, which is now down to a 3x3cm footprint, 38% smaller than Rev A. The space savings come from less silkscreen text (removed the word “Pin” for the pin numbers) and using SMD components for the power LED indicator and resistor. I would have gone with an SMD capacitor but it costs more than the usual through-hole electrolytic capacitor, at least from where I get my components for these boards. With the price appearing to go up to get these boards manufactured, I’m looking for savings.

preview1_backAnother thing that changed with this sub-revision is that all of the pads are circles and are bigger than they have been on previous boards. They were kind of a pain to solder because any circular pads were really thin. I’m still working out the right size but I’m happy that I know  out how to address that issue now.

To date, the Attiny85 board was my most “Watched” item on eBay so I take that as an indicator of interest for this kind of thing so I’m set on getting these made. Being 3x3cm, I can’t fit two on one 5x5cm board which is what I have to work with to get manufactured. I’ll probably do something simple with the rest of the space but I want to nail down this one first. Thanks for reading!

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!