Workshops/usb: Difference between revisions
(Created page with "=Introduction= '''This workshop introduces you to the workings of USB & addresses the most important issues to help you design and build a USB interface. Anyone interested is en...") |
mNo edit summary |
||
(31 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
=Introduction= | =Introduction= | ||
'''This workshop introduces you to | '''This workshop introduces you to USB. We address the most important issues of the design and how to build a USB interface focusing on the HID class. We also examine how you want a Hackspace USB group to work.''' | ||
If you look at Jan Axelson’s essential toilet-side-USB-reading [http://www.amazon.co.uk/USB-Complete-Developer%2527s-Guide-Guides/dp/1931448086/ref=sr_1_1?ie=UTF8&qid=1299705319&sr=8-1 USB Complete: The Developer's Guide 4th Edition (Complete Guides Series)], you will quickly (actually by page xv in the table of contents) come to the conclusion that sticking with the Arduino was the best idea and sell the book to the next poor unfortunate on Amazon. Fortunately, I’ve read it ''all'' and I can pass-on the whodunit ending so you don’t have to suffer the book-induced narcolepsy I had to. | If you look at Jan Axelson’s essential toilet-side-USB-reading [http://www.amazon.co.uk/USB-Complete-Developer%2527s-Guide-Guides/dp/1931448086/ref=sr_1_1?ie=UTF8&qid=1299705319&sr=8-1 USB Complete: The Developer's Guide 4th Edition (Complete Guides Series)], you will quickly (actually by page xv in the table of contents) come to the conclusion that sticking with the Arduino was the best idea and sell the book to the next poor unfortunate on Amazon. Fortunately, I’ve read it ''all'' and I can pass-on the whodunit ending so you don’t have to suffer the book-induced narcolepsy I had to. | ||
Line 7: | Line 7: | ||
USB-on-an-MCU is the whodunit. The good news is they’re cheap; there’s loads of competition; they leverage your existing hardware and software skills; and they’ve been around long enough to populate the forums with the pain you can now avoid suffering. | USB-on-an-MCU is the whodunit. The good news is they’re cheap; there’s loads of competition; they leverage your existing hardware and software skills; and they’ve been around long enough to populate the forums with the pain you can now avoid suffering. | ||
=Thursday 28 April Workshop Content= | |||
*7-10pm in the quiet room. | |||
This first workshop will be an introduction to the theory of USB as it relates to HID interfaces. We'll cover: - | |||
* A 'hello world' USB hardware interface to some existing PC applications; | |||
* USB basics; | |||
* A look at “USB-on-a-chip”, the manufacturers, the dev environments and the chips; | |||
* How you want a Hackspace USB group to work, brainstorm some project ideas, talk about commiting to projects; | |||
* Anything else that we decide looks interesting. | |||
This content will be repeated in future workshops. | |||
After this workshop has finished, I hope we'll have a better idea of what we want from any USB group going forward. | |||
=Fantasy Workshop Content (provisional)= | |||
* An overview of the USB protocol for hardware developers with a HID class focus; | |||
* The skills required to produce a USB device; | |||
* “USB-on-a-chip”, the manufacturers, the dev environments and the chips; | |||
* Examination of some USB devices; | |||
* Practical exercises; | |||
* How you want a Hackspace USB group to work; | |||
* Supporting each other’s project development. | |||
=Why= | =Why= | ||
# | # You will simplify your electronic circuit design and save cost. There are a great many situations where, with a bit of knowledge, you will be ready to move your Arduino prototype onto a USB MCU. | ||
# | # It’s a lot easier than you think. I’ve discovered that there appear to be two main reasons why so few people are doing USB: - | ||
## Most developers see USB as “cracking a nut with a steam-roller” – there just doesn’t seem to be the awareness of the ‘easy MCU way’ to do USB. | |||
## To create a truly ''great'' USB product from the very start to the very end of the process requires several technical skills that are rare in a single person and requires equipment for the development process that your average bod just doesn’t have. Put those into the Hackspace environment – geekers like us with time, commitment and teamwork and you’ve got an exciting way forward. | |||
# From my last year of USB musings I see the big picture like this. “''USB is massive. It has a colossal user base. 2a & 2b above have left it significantly under exploited''”. To start with we can show people how to exploit USB by running profitable workshops like this to make money for the space. More excitingly we can support each other in a USB Group within Hackspace to knock-out some fantastic stuff. | |||
Summary: “Let’s give people USB devices they want and make enough money to retire in 5 years.” | |||
=When= | =When= | ||
My aim | My aim was to run the first 3 sessions within a 10 day window between Thursday 31 March and Monday 25 April 2011. Seems like I was being a bit unrealistic, if enthusiastic. I still hope to do at least 3 initial sessions like this: - | ||
* 1 x weekday evening session 7pm – 10pm | * 1 x weekday evening session 7pm – 10pm | ||
* 1 x weekday day session 1pm – 4pm | * 1 x weekday day session 1pm – 4pm | ||
* 1 x weekend day session 1pm-4pm. | * 1 x weekend day session 1pm-4pm. | ||
=Prerequisites= | =Prerequisites= | ||
Being fairly geeky will be helpful but is not essential. If the theory gets too heavy for you, have a little sleep or check your email. For practical work you’ll most likely be working with someone else so you could get them to do all the work. | Being fairly geeky will be helpful but is not essential. If the theory gets too heavy for you, have a little sleep or check your email. For practical work you’ll most likely be working with someone else so you could get them to do all the work. You’ll find it helpful to have a computer or laptop. If you don’t, you’ll need to work with someone who has for some of the practical stuff. Summary: At a minimum, just bring you. | ||
=Cash= | =Cash= | ||
These first USB workshops are free to the Hackspace community. You are the guinea-pigs (or at least, gerbils) who will allow us to develop the format. Eventually we can start charging non-Hackspace attendees for them and bring cash into the space. In the meantime we’ll rely on donations and samples | These first USB workshops are free to the Hackspace community. You are the guinea-pigs (or at least, gerbils) who will allow us to develop the format. Eventually we can start charging non-Hackspace attendees for them and bring cash into the space. In the meantime we’ll rely on donations and samples from manufacturers. Cash donations are very welcome and will go on equipment and consumables. | ||
=Logistics= | =Logistics= | ||
* A room – The quiet room’s looking good. | * A room – The quiet room’s looking good. | ||
* A Projector (& screen?) – Would be nice but not essential. There’s one available and a screen but the window behind washes out the image – need to test. | * A Projector (& screen?) – Would be nice but not essential. There’s one available (and a screen) but the window behind washes out the image – need to test. | ||
** From my experience of the arduino workshops it is okay, depending on how you colour your slides. You can also turn off the lights in the quiet room to improve contrast. Putting up some kind of curtain on the windows would also solve this problem. -- [[user:ciaran.mooney|Ciarán]] | |||
** There is no stand for the projector. If you have it pointed up towards the screen on a stack of books that may work. I have always managed to borrow a camera stand from another member which is able to screw into the bottom of the projector. | |||
* Things to draw on like a whiteboard/flipchart and things to draw with – There’s a blackboard which suggests chalk might be useful. | * Things to draw on like a whiteboard/flipchart and things to draw with – There’s a blackboard which suggests chalk might be useful. | ||
=Resources= | =Resources= | ||
''THE'' USB book - [http://www.amazon.co.uk/USB-Complete-Developer%2527s-Guide-Guides/dp/1931448086/ref=sr_1_1?ie=UTF8&qid=1299705319&sr=8-1 USB Complete: The Developer's Guide 4th Edition (Complete Guides Series)] | |||
* Just bought a cheap old one off Amazon. | |||
MCUs + associated Dev Envs for practical work. | |||
* 8-3-11 – emailed a few chip people. Ask for contributions from Hackspace people. | |||
* 26-3-11 - so far FTDI & Microchip have written back to offer goodies. | |||
* 29-3-11 - received equipment from FTDI | |||
[[/equipment| '''Equipment we have received so far''']] | |||
=MCU Dev/Env Wish-list status.= | |||
'''Please suggest any not listed that you may be interested in.''' | |||
'''FTDI – ''''''[http://www.ftdichip.com/index.html www.ftdichip.com/index.html''']''' ''' | '''FTDI – ''''''[http://www.ftdichip.com/index.html www.ftdichip.com/index.html''']''' ''' | ||
* [http://www.ftdichip.com/Products/ICs/VNC2.htm Vinculum II | * [http://www.ftdichip.com/Products/ICs/VNC2.htm Vinculum II(MCU)] | ||
* [http://www.ftdichip.com/Products/Modules/DevelopmentModules.htm Vinculo | * [http://www.ftdichip.com/Products/Modules/DevelopmentModules.htm Vinculo(dev)] | ||
Line 63: | Line 97: | ||
* [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 18F4550 (MCU]) | * [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 18F4550 (MCU]) | ||
* [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805 PICKit2/3 (dev)] | * [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805 PICKit2/3 (dev)] | ||
* [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940&part=DM163025 Picdem FS USB | * [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940&part=DM163025 Picdem FS USB (dev)] | ||
'''Atmel – ''''''[www2.atmel.com www2.atmel.com'''] | '''Atmel – ''''''[http://www2.atmel.com www2.atmel.com'''] | ||
* [http://www.atmel.com/dyn/resources/prod_documents/32117s.pdf AVR32UC3C | * [http://www.atmel.com/dyn/resources/prod_documents/32117s.pdf AVR32UC3C(MCU)] | ||
* [http://store.atmel.com/PartDetail.aspx?q=p:10500155 STK600 | * [http://store.atmel.com/PartDetail.aspx?q=p:10500155 STK600(dev)] | ||
Line 76: | Line 110: | ||
'''NXP – ''''''[http://www.nxp.com/ www.nxp.com'''] | '''NXP – ''''''[http://www.nxp.com/ www.nxp.com'''] | ||
* [http://www.nxp.com/ LPC2142 | * [http://www.nxp.com/ LPC2142(MCU)] | ||
* [http://ics.nxp.com/lpcxpresso/~LPC1102/ LPCXpresso | * [http://ics.nxp.com/lpcxpresso/~LPC1102/ LPCXpresso(dev)] | ||
=Links= | =Links= | ||
Line 84: | Line 118: | ||
** [http://www.lvr.com/usb.htm http://www.lvr.com/usb.htm] -'' ''from the author of “USB Complete ...” | ** [http://www.lvr.com/usb.htm http://www.lvr.com/usb.htm] -'' ''from the author of “USB Complete ...” | ||
* Inevitable - [http://en.wikipedia.org/wiki/Universal_Serial_Bus http://en.wikipedia.org/wiki/Universal_Serial_Bus] | * Inevitable - [http://en.wikipedia.org/wiki/Universal_Serial_Bus http://en.wikipedia.org/wiki/Universal_Serial_Bus] | ||
* | * Other - [http://www.beyondlogic.org/usbnutshell/usb1.shtml http://www.beyondlogic.org/usbnutshell/usb1.shtml] | ||
* Arduino Uno - [http://arduino.cc/en/Hacking/DFUProgramming8U2 Programming 8u2], [http://www.atmel.com/dyn/resources/prod_documents/doc7799.pdf 8u2 datasheet (pdf)], [https://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/arduino-usbserial source code], [http://www.fourwalledcubicle.com/LUFA.php AVR Lightweight USB Framework], [http://www.obdev.at/products/vusb/index.html Virtual USB - Used in the NaNODE] | |||
* [http://www.fourwalledcubicle.com/LUFA.php Lightweight USB framework for AVRs] | |||
* [http://www.bensherlock.co.uk/all/electronics/2010/01/03/usb-pic-resources/ USB PIC resources] | |||
* [http://www.schmalzhaus.com/UBW/ USB BitWhacker] | |||
* [http://usbpicprog.org/ USB Picprog] | |||
* [http://joshp.no-ip.com:8080/vnc2/ Vinculum issues list] (not at FTDI) | |||
* [http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=1930&view=unread#p19223 Vinculum problems] | |||
=Facilitator(s)= | |||
[http://wiki.hackspace.org.uk/wiki/User:PaulR PaulR] | |||
=Project Ideas= | |||
* controlling multiple arduino from a single usb connection. With some more complicated projects a few arduinos end up being used, if you want to control all these arduinos from one computer you get a messy array of comports to choose from which can be confusing. Perhaps it would be possible to have one USB connection which would link to multiple arduinos and wrap them so they could be addressed more easily. | |||
* Some people want to build USB devices that don't need a lot of programmability, like LED control or serial adapters for various protocols. The FTDI CDs we've received have a PDF on them called 'Embedded USB Design by Example' which explains how to do these things using the FTDI serial chips fitted to Arduino and in some common serial adapter leads. Worth reading, even if you don't expect to need the FTDI Vinculo kits. | |||
[[Category:Workshops]] |
Latest revision as of 18:15, 8 May 2013
Introduction
This workshop introduces you to USB. We address the most important issues of the design and how to build a USB interface focusing on the HID class. We also examine how you want a Hackspace USB group to work.
If you look at Jan Axelson’s essential toilet-side-USB-reading USB Complete: The Developer's Guide 4th Edition (Complete Guides Series), you will quickly (actually by page xv in the table of contents) come to the conclusion that sticking with the Arduino was the best idea and sell the book to the next poor unfortunate on Amazon. Fortunately, I’ve read it all and I can pass-on the whodunit ending so you don’t have to suffer the book-induced narcolepsy I had to.
USB-on-an-MCU is the whodunit. The good news is they’re cheap; there’s loads of competition; they leverage your existing hardware and software skills; and they’ve been around long enough to populate the forums with the pain you can now avoid suffering.
Thursday 28 April Workshop Content
- 7-10pm in the quiet room.
This first workshop will be an introduction to the theory of USB as it relates to HID interfaces. We'll cover: -
- A 'hello world' USB hardware interface to some existing PC applications;
- USB basics;
- A look at “USB-on-a-chip”, the manufacturers, the dev environments and the chips;
- How you want a Hackspace USB group to work, brainstorm some project ideas, talk about commiting to projects;
- Anything else that we decide looks interesting.
This content will be repeated in future workshops.
After this workshop has finished, I hope we'll have a better idea of what we want from any USB group going forward.
Fantasy Workshop Content (provisional)
- An overview of the USB protocol for hardware developers with a HID class focus;
- The skills required to produce a USB device;
- “USB-on-a-chip”, the manufacturers, the dev environments and the chips;
- Examination of some USB devices;
- Practical exercises;
- How you want a Hackspace USB group to work;
- Supporting each other’s project development.
Why
- You will simplify your electronic circuit design and save cost. There are a great many situations where, with a bit of knowledge, you will be ready to move your Arduino prototype onto a USB MCU.
- It’s a lot easier than you think. I’ve discovered that there appear to be two main reasons why so few people are doing USB: -
- Most developers see USB as “cracking a nut with a steam-roller” – there just doesn’t seem to be the awareness of the ‘easy MCU way’ to do USB.
- To create a truly great USB product from the very start to the very end of the process requires several technical skills that are rare in a single person and requires equipment for the development process that your average bod just doesn’t have. Put those into the Hackspace environment – geekers like us with time, commitment and teamwork and you’ve got an exciting way forward.
- From my last year of USB musings I see the big picture like this. “USB is massive. It has a colossal user base. 2a & 2b above have left it significantly under exploited”. To start with we can show people how to exploit USB by running profitable workshops like this to make money for the space. More excitingly we can support each other in a USB Group within Hackspace to knock-out some fantastic stuff.
Summary: “Let’s give people USB devices they want and make enough money to retire in 5 years.”
When
My aim was to run the first 3 sessions within a 10 day window between Thursday 31 March and Monday 25 April 2011. Seems like I was being a bit unrealistic, if enthusiastic. I still hope to do at least 3 initial sessions like this: -
- 1 x weekday evening session 7pm – 10pm
- 1 x weekday day session 1pm – 4pm
- 1 x weekend day session 1pm-4pm.
Prerequisites
Being fairly geeky will be helpful but is not essential. If the theory gets too heavy for you, have a little sleep or check your email. For practical work you’ll most likely be working with someone else so you could get them to do all the work. You’ll find it helpful to have a computer or laptop. If you don’t, you’ll need to work with someone who has for some of the practical stuff. Summary: At a minimum, just bring you.
Cash
These first USB workshops are free to the Hackspace community. You are the guinea-pigs (or at least, gerbils) who will allow us to develop the format. Eventually we can start charging non-Hackspace attendees for them and bring cash into the space. In the meantime we’ll rely on donations and samples from manufacturers. Cash donations are very welcome and will go on equipment and consumables.
Logistics
- A room – The quiet room’s looking good.
- A Projector (& screen?) – Would be nice but not essential. There’s one available (and a screen) but the window behind washes out the image – need to test.
- From my experience of the arduino workshops it is okay, depending on how you colour your slides. You can also turn off the lights in the quiet room to improve contrast. Putting up some kind of curtain on the windows would also solve this problem. -- Ciarán
- There is no stand for the projector. If you have it pointed up towards the screen on a stack of books that may work. I have always managed to borrow a camera stand from another member which is able to screw into the bottom of the projector.
- Things to draw on like a whiteboard/flipchart and things to draw with – There’s a blackboard which suggests chalk might be useful.
Resources
THE USB book - USB Complete: The Developer's Guide 4th Edition (Complete Guides Series)
- Just bought a cheap old one off Amazon.
MCUs + associated Dev Envs for practical work.
- 8-3-11 – emailed a few chip people. Ask for contributions from Hackspace people.
- 26-3-11 - so far FTDI & Microchip have written back to offer goodies.
- 29-3-11 - received equipment from FTDI
Equipment we have received so far
MCU Dev/Env Wish-list status.
Please suggest any not listed that you may be interested in.
'FTDI – 'www.ftdichip.com/index.html
'Microchip – 'www.microchip.com/usb
'Atmel – 'www2.atmel.com
'NXP – 'www.nxp.com
Links
- Essential - USB Complete: The Developer's Guide 4th Edition (Complete Guides Series)
- http://www.lvr.com/usb.htm - from the author of “USB Complete ...”
- Inevitable - http://en.wikipedia.org/wiki/Universal_Serial_Bus
- Other - http://www.beyondlogic.org/usbnutshell/usb1.shtml
- Arduino Uno - Programming 8u2, 8u2 datasheet (pdf), source code, AVR Lightweight USB Framework, Virtual USB - Used in the NaNODE
- Lightweight USB framework for AVRs
- USB PIC resources
- USB BitWhacker
- USB Picprog
- Vinculum issues list (not at FTDI)
- Vinculum problems
Facilitator(s)
Project Ideas
- controlling multiple arduino from a single usb connection. With some more complicated projects a few arduinos end up being used, if you want to control all these arduinos from one computer you get a messy array of comports to choose from which can be confusing. Perhaps it would be possible to have one USB connection which would link to multiple arduinos and wrap them so they could be addressed more easily.
- Some people want to build USB devices that don't need a lot of programmability, like LED control or serial adapters for various protocols. The FTDI CDs we've received have a PDF on them called 'Embedded USB Design by Example' which explains how to do these things using the FTDI serial chips fitted to Arduino and in some common serial adapter leads. Worth reading, even if you don't expect to need the FTDI Vinculo kits.