The Blinky kits each contain a microcontroller, which is a type of reprogrammable computer chip that can loaded with new code whenever you want. The chip used in each Blinky kit is the PIC16F1823 (PDF datasheet), a general-purpose 8-bit microcontroller made by Microchip.
Each chip contains two types of non-volatile memory for storing data. Here, non-volatile means that the stored data is not lost when the power is turned off. The two types of non-volatile memory are:
- Flash memory, like in a USB pocket drive, stores the main programming code in compiled form. The code is read and executed when the chip is running. The flash memory contains two separate programs: The bootloader (used for reprogramming) and the main code (reads messages from EEPROM and displays them on the LEDs). More details on the design page.
- EEPROM (Electronically-Erasable Programmable Read-Only Memory) stores the messages that are displayed on the Blinky kit’s LEDs. The “read-only” part of the name is a bit of a misnomer but is kept for historical reasons (Wikipedia has more details).
The typical use case for a Blinky kits is to use the nifty optical reprogramming system to update the messages stored in EEPROM, without changing the flash memory. If you want to change the bootloader or the main code stored in flash memory, you’ll need to use a separate process called ICSP (In-Circuit Serial Programming). ICSP requires a hardware programmer, which is typically a USB device used to interface between a computer and the flash memory inside the microcontroller. There are many different types of hardware programmers but our favorite for PIC processors is the PICkit2 (now retired) and PICkit3. They are quite reasonably priced and work great on Windows, OSX, and Linux.
To reprogram a PIC microcontroller with an ICSP hardware programmer requires software on a computer to talk to the programmer, plus five electrical connections between the hardware programmer and the PIC chip. These electrical connections are specified in the ICSP protocol document, and are:
- MCLR / Vpp – Goes to the PIC’s reset pin. Allows the programmer to reset the chip, and provide the high voltage (Vpp) that switches the chip into flash programming mode.
- VDD – This is the chip’s normal power supply connection (usually 3-5 volts). Allows the programmer to either power the PIC itself, or to know what voltage level the PIC is being powered with externally.
- VSS – This is the chip’s normal ground (0 volt) power supply connection. The chip and the programmer need to agree on the ground reference voltage.
- ICSPDAT – Once the programmer switches the chip into flash programming mode, it sends commands and data using a two-wire protocol. This is the data pin of that two-wire protocol.
- ICSPCLK – This is the clock pin of the two-wire protocol.
On the non-SMT Blinky kits (the Blinky Grid and Blinky POV), the ICSP signals are conveniently wired to a five-pin header row along the edge of the circuit board as shown in the image below. You can solder header pins or wires to these holes to connect your ICSP hardware programmer.
On the SMT Blinky kits (the SMT Blinky Grid and SMT Blinky POV, there wasn’t enough room to put the five pins together, but you can still reprogram the PIC chip. Option 1 is to attach test leads to the five pins on the PIC itself:
- Chip pin 4 – MCLR / Vpp (reset/programming)
- Chip pin 1 – VDD (power supply)
- Chip pin 14 – VSS (ground)
- Chip pin 13 – ICSPDAT / UART TX / LED 6 (programming data)
- Chip pin 12 – ICSPCLK / UART RX / LED 7 (programming clock)
Here’s the relevant part of the circuit schematic for reference (click to enlarge). The full schematics are available at the download page.
Option two is to solder wires into these labeled holes:
- “R” – MCLR / Vpp (reset/programming)
- “+” – VDD (power supply)
- “G” – VSS (ground)
- “6” – ICSPDAT / UART TX / LED 6 (programming data)
- “7” – ICSPCLK / UART RX / LED 7 (programming clock)
Once the five ICSP connections are made to the circuit board, use the PICkit software to program a HEX file into the chip. We have all the firmware hex files posted here on the Blinky download page.
I wanted to learn how to design physical objects in 3D mechanical CAD, so I started to learn Autodesk Fusion 360. It’s free for “students, enthusiasts, hobbyists, and startups”, but cloud based and closed source, so it could be vastly more limited since this blog post was written in November 2016. It might be a better idea to try to learn (and maybe contribute to) one of the open source mechanical CAD packages like FreeCAD, but a good friend of mine had good luck with Fusion 360 so I went with that.
To start with, I’ve never used a parametric 3D modeler before, so I am probably doing everything wrong. Here are some of the tutorials I followed:
- Get started with Fusion 360 – 12 tutorials in under 60 minutes
- Fusion 360 Tutorials (with actually-useful video/screencasts)
I wanted to design something simple as my first project in Fusion 360. We do a reasonable amount of laser cutting at W&L, and I’ve noticed that the work-pieces sometimes get little scorch marks where the laser hits the aluminum hexagonal support structure underneath. Our most common piece of stock is 12x12x1/3 inch baltic birch plywood, and I though it might be cool to design and 3D print some simple pieces to support the wood from the corners, to avoid scorch marks and to allow the little cutout pieces to fall through. I had envisioned an L-shaped piece with a ledge for the wood to sit. Maybe with a hole in the corner in case we want to add a screw to hold the wood to the support (if gravity isn’t enough).
If you want to follow-along in Fusion 360, here is a link to the design, where you can download it in Fusion 360 format, STL, or any other of a large number of formats.
As far as I have learned, this kind of 3D CAD tool is organized as a sequence of sketches (where you draw points and lines in a 2D plane) and “actions” (probably the wrong word) such as extrude and fillet. Parametric modelers are cool because you can define parameters, then use those parameters to adjust dimensions in your sketch. This makes it easy for your designs to be flexible, where you can define a “bolt diameter” parameter and adjust if you need to change to metric hardware (for example).
For this simple design I had three sketches, three cuts/extrusions, and one unnecessary and flamboyant fillet 🙂 . I’ll go through each step in this blog post. Again, this is probably a non-optimal way to do this kind of thing.
Sketch 1: The bottom of the thing
Another cool thing about this kind of parametric modeler is that you can specify all sorts of constraints in the sketch, and it will adjust the sketch based on changing parameters. For example, you can add a right-angle constraint between two lines. If you then rotate one of the lines, the system will do its best to keep the lines at a right angle. In the sketch above, you can see some right-angle constraints and a vertical constraint. The overall dimensions are 25 x 25 mm.
I extruded the L-shaped Sketch upward in the vertical direction by 10 mm.
Sketch 2: Building a shelf area
Here I added lines down the middle of each “arm” of the L-shape. This way I can extrude part back down to the create a little shelf for the wood.
I did an extrude (technically a cut) downward to create the little shelf.
A fillet is “a rounding of an interior or exterior corner of a part design” (from Wikipedia), added to help reduce drag, improve mechanical strength, and just make the part look fancy and professional! Here I added a fillet with 0.5 mm radius. I did not apply the fillet to the bottom or the support surface under the wood.
Sketch 3: Adding a hole just in case
I thought maybe we might want to add a screw in the corner to help hold down the work-piece. Easy enough to add at this stage.
The hole is cut/extruded through the whole piece.
Using the Make –> 3D Print menu we can export an STL file suitable for 3D printing.
The four corner holders work quite well for elevating the work-piece above the cutting bed. The small pieces fall through and don’t interfere with the cutting head. The larger pieces don’t get any scorch marks when they are cut out.
Overall, this was a fun thing to design and a decent way to gain experience with Fusion 360 for 3D modeling. Next time I might make the support taller than 10 mm to give more clearance for falling parts.
The latest update to the Bricktronics 6xAA Battery Holder mounting plate (v6) has been released. This version adds four new mounting holes for an alternate battery holder. Our original pick, Eagle Plastic Devices 12BH361A-GR (apparently a Mouser house-brand), has been sporadically out of stock in 2016, so we wanted to find a second source for this part. Memory Protection Devices BH36AAW (DigiKey part BH36AAW-ND) is a pretty good replacement, but has different mounting holes. Version 6 of this mounting plate adds those needed holes.
In the image below, the new design is shown on top, the middle is the original EPD battery holder mounted to the v4 mounting plate, and the bottom is the new MPD battery holder.
When I build electronics prototypes, it’s sometimes difficult to keep all the parts together without falling apart, especially if you need to move everything from one location to another. Between the breadboards, Arduino boards, programmers, FTDI cables, spare wires, and spare parts, I wanted to create a way to keep them all connected together without falling apart or losing anything.
To this end, I designed a laser-cut Project Plate. It has holes for mounting an Arduino or Arduino Mega, a place for sticking a double-breadboard, and a series of customizable short boxes for holding parts.
It took less than 15 minutes to cut on the laser cutter, and assembly took about an hour, plus time for the glue to dry. You don’t have to glue down all the box separators if you want to have larger boxes for longer wires or tools. With the arduino screws extending below the bottom of the plate, I added some adhesive rubber feet to the bottom to elevate it off the work surface.
You can buy rubber feet like this on Amazon for dirt cheap.
If you want to cut your own, I have the SVG design file stored in the LaserCutProjectPlate repo at GitHub. I used 3mm (1/8″) baltic birch plywood and an 80W laser cutter.
Ideas for future improvements:
- Add a spot for a small USB hub?
- Add holes for mounting banana plug binding posts?
- Add a place to glue-down pass-through header pins for easier connections to chip programmers or FTDI cables?
Here are some additional photos:
One of the most important motivations and goals of the recent Bricktronics Software libraries upgrades was to make it much easier to use the Bricktronics hardware and software with other boards besides the Arduino Uno and Arduino Mega 2560. To this end, we’ll be testing out the new libraries with a variety of other boards in the coming weeks, and we’ll post a update for each one. This time we are looking at using the Bricktronics Shield with the Arduino Leonardo, a 5v compatible board very similar to the Arduino Uno, but with a few important differences:
The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.
The ability to appear as a computer mouse or keyboard makes for a lot of cool possibilities! Want to make a simple LEGO keyboard? Use the BricktronicsButton library to read a series of touch sensors and type in different keystrokes for each sensor. You could use the mouse capability with the BricktronicsUltrasonic library to make a theremin-like mouse for your computer! (Actually I might have to make that mouse theremin someday, that sounds too cool to miss!)
Image credit: “Arduino Leonardo Front with headers” by Arduino LLC, licensed CC-BY-SA 3.0
Since the Leonardo is Rev3 compatible, put the I2C select switch in the “Rev3” position.
Unfortunately, while the Leonardo has dedicated Rev3 I2C pins, it also has the I2C signals on the D2 and D3 pins, which are used by both motor 1 and motor 2. This means that the Bricktronics shield cannot use any motors without breaking the I2C communications with the on-board MCP23017 chip. However, it is still possible to use NXT and EV3 motors with the Arduino Leonardo using our new product the Bricktronics Motor Driver, currently in pre-release but available in our store. More details about this new product will be released in the next few weeks, but it lets you drive two NXT/EV3 motors with any 5 volt compatible, real-time microcontroller board.
If no motors are plugged in, the I2C communication to the MCP23017 chip work perfectly, meaning that sensors will work just fine. We have tested all currently-supported sensors on the Bricktronics Shield on the Leonardo, and they work great! If you are looking for a sensors-only Bricktronics solution, then the Bricktronics Shield is a fine choice, as well as the Bricktronics Breakout Boards.
We recently went through a significant refactoring of the Bricktronics software libraries for Arduino (and other platforms). The all-encompassing library was split into separate sub-libraries, one for each motor and sensor type, plus one library for the Bricktronics Shield and Megashield. We’re calling this new set of software libraries “Bricktronics v1.2”.
Highlights of the changes include:
- Complete API documentation for each library
- Addition of two new sensors: Color sensor and Light sensor
- Addition of better PID control for motors, including position control, angle control, as well as brake/coast functionality
- New examples for the new motor API functionality
- Now easier to use the individual libraries with other platforms such as ChipKit, Teensy, etc
- All library dependencies (such as required 3rd party libraries) are clearly mentioned in all examples and Readme files, including links and installation directions.
This is the list of the new individual Bricktronics software libraries. Unfortunately they are not compatible with the original libraries, but since they are better in every way, we strong recommend everyone upgrade to these new v1.2 libraries.
- BricktronicsShield – Support for the Bricktronics Shield (API docs)
- BricktronicsMegashield – Support for the Bricktronics Megashield (API docs)
- BricktronicsMotor – Support for NXT 2.0 and EV3 servomotors (API docs)
- BricktronicsLight – Support for NXT monochrome light sensors (API docs)
- BricktronicsColor – Support for color sensors (API docs)
- BricktronicsSound – Support for sound sensors (API docs)
- BricktronicsButton – Support for pushbutton sensors (API docs)
- BricktronicsUltrasonic – Support for the NXT 2.0 ultrasonic sensors (API docs)
We still have more website updates to make, including new photos, new examples, new demonstration videos, and new hardware(!) but we want to let you know about the new software libraries because we’re really proud of them. Please let us know what you think in the W&L Forum.
One of the features we wanted to add when re-designing the original metronome kit was to make it much easier for people to hack the kit, and add external connections. To this end, we added six header pin connections at the bottom of the circuit board:
The rest of this post will be an explanation of what each of those pins is doing.
Once in a while we’ll get an email along the lines of, “Hey! What happened to the Bluetooth Arcade Controller? I couldn’t find it on your website or your store.” After answering a few of these recently, we decided to make a blog post about it here.
The Bluetooth Arcade Controller (BTAC) was the core component of a neat little project called “Coffee Table MAME Console” in Make Magazine vol 28, that let you build your own arcade-style control panel, and connect it to your computer or Raspberry Pi using a wireless Bluetooth connection.
The world of hobbyist-grade embedded bluetooth keyboard interfaces has advanced greatly in the past couple years since we created the BTAC kit, and it’s no-longer the best solution, in our opinion. We’d suggest trying Adafruit’s new Bluefruit EZ-Key product, which is better in every way (except for number of button inputs) than the BTAC. Plus it’s only $19.95.
They even have some great tutorial documentation on how to get started with it.
If you need more than 12 inputs, you can connect the Bluefruit module to an Arduino Mega or other microcontroller and use the RX/TX connections to send ASCII characters to the bluetooth module, which will then transmit that character as a keypress to the computer. You can even do raw USB HID keyboard or mouse reports to properly handle up to six concurrent keypresses.
Also, you can re-map the default 12 inputs using an FTDI cable and a processing sketch.
At the end of the day, we suggest going with the Bluefruit EZ-Key, as it’s cheaper, more flexible, and all-around better than our Bluetooth Arcade Controller was.
Wayne and Layne is a two person electronics company in Minneapolis. We design and sell electronic kits and projects for kids and adults, beginners and experts. Most of our products are sold online, but some of our products are sold in retail stores across the world!
So far, we’ve given away all our designs. This is so you can learn how we put it together, but we believe so much in giving the designs away that we’re willing to let you do anything with our designs–even to make your own kits for sale. We ask that if you use our designs, you give away your modifications too. (A link and some credit would be nice too!) This is called open source hardware.
We also do design work for other people, like Kickstarters and museum exhibits. Most of this work isn’t open source, but it helps fund our open source work. (We also explicitly reserve the right to release new products that are not open source.)
It might not look like it from our blog, shame shame, but 2014 has been an amazing year for Wayne and Layne! We finished a lot of awesome projects with clients, got an office, put a bunch of cool tools in it, worked on new products, and improved a lot of things behind-the-scenes. On top of that, we worked on open source software like Kicad that everyone can use for free, and your purchases of our products helps us volunteer!
We have an office!
Up until April or so, all of Wayne and Layne was at Adam or Matthew’s apartments, and we’d meet with clients at coffee shops or hackerspaces. This worked great when Wayne and Layne was just starting out, but now that we’re more established, we were outgrowing the space we could carve out of our apartments. It also meant we had to buy twice as much of everything, or ship things around and it seemed like we never had what we needed where we needed it. Now that Matthew and Adam both live in Minneapolis, this seemed like a waste. This came to a head when Adam had to clear out his Wayne and Layne office to turn it into a nursery. (!!!) We tried storing all our inventory in a storage unit, continuing to work from our apartments, but after a month, we decided to look for an office. We looked at some online listings, then put the call out on Twitter, and it didn’t take long before we found a great spot.
We have some space in Minneapolis that isn’t fancy but
- has a great landlord
- is on good bus lines
- we can afford
- is across from a Chinese place that serves xiao long bao
so really, we can’t ask for more!
We have some awesome equipment in our office!
In our new space, we have a pick and place machine, reflow oven, hot air station, stereo microscope souped up for assembly, as well as a laser cutter, an Othermill, and a reliable 3D printer! We also have less fancy equipment, like a shipping station with label printer, laser printer, scale, and barcode scanner. We don’t plan on doing large manufacturing runs in our space, but we’ve definitely leveled up on the prototyping we can do in-house!
We finished our work on the Choosatron!
The Choosatron is a little interactive fiction gaming device funded on Kickstarter. Jerry brought us in before the Kickstarter launched to help with the PCB layout and to help design for manufacturing. It’s just about ready to ship, and it’s turned out even better than we expected.
We made more museum exhibits!
We continued our partnership with a local museum exhibit design company, and helped with lots of new exhibits. Our exhibits this year are all over the US, including right here at the Minnesota State Fair! We had our hand in quite a few of the exhibits you see in the Energy Building. With the museum exhibits, we began to see some patterns in our “one-off” designs, and are investigating how to turn some of those into products. We have some exciting news about our partnership, but can’t reveal it yet. (You can see examples of our museum work at http://www.wayneandlayne.com/exhibits/)
We invented new wearable visual effects with Dessa!
We did a pair of projects with Dessa! We had talked previously on a project that fell through due to scheduling issues with overseas suppliers. This year, she came to us with some rough ideas of wearable visual effects she wanted for a show. (One idea was a still from a cartoon.) We completely blew it out of the water! Everyone was really impressed (including us) by how awesome they turned out. More details here!
We presented at Maker Faire NY!
We were unable to make it to Maker Faire SF this year–Adam was too close to becoming a new dad that his wife couldn’t fly and he couldn’t risk being away, but we did make it to Maker Faire NYC in September. We gave two presentations, one on Lego and Arduino robotics, and another on low-cost pick-and-place machines where we announced our Kicad-to-TM240A converter program.
We supported open source software, like Kicad!
We often write patches for bugs we find in the software we use. We have a one or two line patch in Jenkins, for example. We don’t really keep track of those.
However, in 2014, there were some changes to the Kicad leadership, and we’ve been much more involved since then. We have been spending *lots of hours* since September working on getting usable Mac builds coming out of a continuous integration server. There is a Kicad dev team priority of an official “stable” release on Windows, OS X, and Linux. We’ve got team buy-in on a real feature freeze before stable release–it’s going to be slick, folks! Combined with the amazing work that CERN is doing, like the push-and-shove router, OpenGL acceleration, and the upcoming RF improvements, we are extremely excited to see what Kicad looks like at the end of 2015!
Some of the stuff we did is completely behind the scenes, for example:
We redid all our internal infrastructure.
We completely revamped almost all of our internal infrastructure. This doesn’t mean a lot to you, but we have an easier time getting the right stuff done that we need to in order to be successful. Our revamp also dramatically increases our disaster recoverability. After we did this, we had a 1TB SSD containing ten virtual machines completely die without warning, and we were back up and running within an hour or two! (With no website interruption, I might add!)
This was by no means a complete list of our work this year, just the highlights.
- Adam wrote two chapters for an upcoming book, “Maker Pro”: an interview with Emile Petrone of Tindie, and an essay about the Blinky Grid and Blinky POV retail launch.
- We taught a weeklong class at Leonardo’s Basement to teenagers on Minecraft and digital logic. We built things in Minecraft with Redstone, and in real life with breadboards, LEDs and switches, and 7400 logic chips.
- We taught a half-day class on working with EL wire at Leonardo’s Basement.
- Adam went to PyCon for the first time, and started a “Python + Embedded” room.
- We’re on an advisory board for an unannounced project that you’ll definitely hear about in 2015!
What’s coming up?
We don’t like to announce our stuff too far ahead of time, but we’re far enough along in some projects that we’ll let them slip out here:
- New Bricktronics hardware and software
We did a lot of Bricktronics work this year. We have new Bricktronics (our LEGO Mindstorms + Arduino line) products ready to be released. They’re waiting on the other cool Bricktronics thing we did this year, which was to revamp the software support and make it even more beginner friendly, while opening up some more options for more advanced programmers. This new software support relies on some features of the Arduino IDE which are not available in the official builds, but is coming soon.
- A stable, usable OS X Kicad release
- More products, and a new product line
We’re excited to get back to our roots with new products!
- More museum exhibits
- A new website
- A new shipping backend
This is probably boring to you, but it means means more accurate (cheaper) shipping, order status notifications, and your order will go from ordered to shipped even faster!
That’s about all–I have a brand-new Othermill to play with when I’m done with this post.
Happy hacking, folks!