Skip to content
Apr 16 18

Now selling: Blinky Grid SMT pre-assembled kits

by Layne

Wayne and Layne is proud to announce that we are now selling pre-assembled Blinky Grid SMT kits!

A few years ago we purchased some “panelized” circuit boards of the Blinky Grid SMT design, which means that there are several copies (16 in this case) of the same circuit board design connected together in a snap-apart panel. This makes it easier (and quicker!) to assemble the boards in bulk.

The first step in bulk assembly is to apply solderpaste to all the exposed pads on the circuit board. We purchased a stainless steel stencil that matches the 16-board panels, then used a squeegee to apply lead-free solder paste through the holes in the stencil.

After all the pads have solder paste, the next step is to place each part on the board, stuck down into the solder paste. To place the parts, we use a machine called a Pick-‘n-Place (PnP). This is a desktop computer-controlled robot with a small vacuum nozzle that can pick up a part, optionally rotate it, and place it down in a precise location on the circuit board. Here’s a two-minute video of the PnP machine in action:

After the parts have been placed on the board, we need to heat it up to melt the solder to attach the parts. We use a small soldering oven to do this.

After the boards have been baked, the solder has melted and connected all the parts to the circuit board. The remaining steps include:

  • Solder the through-hole parts, like the pushbutton and sensors
  • Program the microcontroller with the Blinky Grid program code
  • Test that everything works correctly, including programming
  • Package and label each kit for sale

You can now find the pre-assembled Blinky Grid SMT kits in the Wayne and Layne Store.

Apr 10 18

Blinky programmer: raw mode and debug mode

by Layne

This blog post is a short introduction to a pair of useful modes of operation for the Blinky Programmer webpage.

The standard Blinky Programmer webpage is a decent way to interactively create and program new messages into a Blinky Grid or Blinky POV kit. However, there are two main requests that we’ve received for new functionality for the programmer:

1. “How can I restore the original messages that were on the Blinky kit?”
2. “Is there any way I can save and restore the messages that I set up in the programmer webpage?”

Now, we have a way to do both of these!

First, a little background. The programmer webpage converts the messages that are created using the visual interface into a series of numbers, that are then optically transmitted to the Blinky kit. Details of the message formatting and transmission are available here.

The enhancements we’ve added are two-fold: First, we added a way to see “under the hood” of the blinky programmer webpage, so you can see the underlying data stream that is generated from the visual editor. This is a debug mode, enabled by adding “?debug” to the end of the website address, like this: https://www.wayneandlayne.com/blinky_programmer/?debug

When the debug mode is enabled, a few new text boxes appear at the bottom of the page. These boxes are initially blank, but are populated as soon as you press the Go button. The first two boxes show the raw message data as a series of bytes, separated by columns (first box is decimal, second box is hex). These are the bytes that we want to store into the Blinky kit (first byte indicates how many messages are included, followed by the bytes of each message in turn). The second set of boxes show the “packaged” data to transmit (“xmit”), which surrounds the message data with some meta-data about where the message data should go inside the chip, and adds a checksum to protect against transmission mistakes (basically, we are packing the message data into the Intel HEX file format. The final text box shows the raw binary equivalent of the packed xmit data, which is the string of ones and zeros that are actually flashed out by the webpage. The most useful box here is the “message_data:” text box.

The second enhancement is a new version of the Blinky programmer webpage that enables “raw” programming. The new raw programmer is located here: https://www.wayneandlayne.com/blinky_programmer/raw.php. “Raw” simply means that instead of using the visual editor to create text-based or pixel-based messages, you can simply type-in or copy-paste the message data into a text box, which will then be transmitted. This enables restoring the original set of messages, as well as being able to save your creations (by copying the contents of the “message_data” text box) and then pasting it into the raw programmer.

Back to the list of requested features, this time with some answers!

1. “How can I restore the original messages that were on the Blinky kit?”

Easy to do:

  1. Go to the raw programmer webpage.
  2. Copy-paste one of these long lists of numbers into the upper text field:
    POV:
    6, 145, 16, 24, 60, 62, 31, 62, 60, 24, 0, 96, 240, 248, 124, 248, 240, 96, 00, 33, 10, 11, 21, 18, 23, 20, 34, 41, 25, 24, 31, 145, 14, 128, 64, 32, 16, 8, 4, 2, 1, 2, 4, 8, 16, 32, 64, 17, 7, 17, 14, 21, 21, 24, 41, 41, 253, 14, 170, 85, 170, 85, 170, 85, 170, 85, 170, 85, 170, 85, 170, 85, 211, 01, 170
    Grid:
    8, 230, 14, 170, 85, 170, 85, 170, 85, 170, 85, 170, 85, 170, 85, 170, 85, 10, 11, 17, 14, 21, 21, 24, 41, 32, 24, 27, 21, 13, 234, 7, 4, 98, 97, 9, 97, 98, 4, 10, 11, 32, 10, 34, 23, 14, 38, 21, 10, 34, 23, 14, 222, 14, 48, 72, 68, 34, 68, 72, 48, 48, 120, 124, 62, 124, 120, 48, 10, 34, 11, 21, 18, 23, 20, 34, 41, 16, 27, 18, 13, 41, 18, 28, 41, 10, 41, 28, 22, 10, 27, 29, 41, 21, 14, 13, 41, 22, 10, 29, 27, 18, 33, 37, 10, 40, 11, 21, 18, 23, 20, 34, 41, 16, 27, 18, 13, 41, 32, 10, 28, 41, 22, 10, 13, 14, 41, 11, 34, 41, 32, 10, 34, 23, 14, 41, 10, 23, 13, 41, 21, 10, 34, 23, 14, 37, 10, 60, 11, 21, 18, 23, 20, 34, 41, 16, 27, 18, 13, 41, 18, 28, 41, 27, 14, 25, 27, 24, 16, 27, 10, 22, 22, 14, 13, 41, 11, 34, 41, 17, 24, 21, 13, 18, 23, 16, 41, 18, 29, 41, 30, 25, 41, 29, 24, 41, 34, 24, 30, 27, 41, 28, 12, 27, 14, 14, 23, 37
  3. Scroll down and press the Go button to begin transmission.

2. “Is there any way I can save and restore the messages that I set up in the programmer webpage?”

Definitely possible:

  1. Using the normal Blinky Programmer webpage, but add “?debug” to the end of the address, like this: https://www.wayneandlayne.com/blinky_programmer/?debug
  2. Create your text-based or pixel-based messages like normal. Transmit them into your Blinky kit to double-check that the message is correct.
  3. Select all the text in the “message_data” text box and copy-paste it into a separate document on your computer that you can save and access later.
  4. When you’re ready to program one of your old saved messages, go to the raw programmer webpage.
  5. Copy-paste one of your saved messages into the upper text box.
  6. Scroll down and press the Go button to begin transmission.

Hope that helps! If you have any questions, please ask in the forum or contact us.

Nov 14 16

Reprogramming Blinky kits with ICSP programming

by Layne

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.

medium-pic16f1823-pdip-14

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

blob

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:

  1. Chip pin 4 – MCLR / Vpp (reset/programming)
  2. Chip pin 1 – VDD (power supply)
  3. Chip pin 14 – VSS (ground)
  4. Chip pin 13 – ICSPDAT / UART TX / LED 6 (programming data)
  5. 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.
blob

Option two is to solder wires into these labeled holes:

  1. “R” – MCLR / Vpp (reset/programming)
  2. “+” – VDD (power supply)
  3. “G” – VSS (ground)
  4. “6” – ICSPDAT / UART TX / LED 6 (programming data)
  5. “7” – ICSPCLK / UART RX / LED 7 (programming clock)

blinky_pov_smt

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.

Nov 11 16

3D design: Laser cutter corner supports in Fusion 360

by Layne

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:

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
sketch1
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.

Extrude 1
extrude1
I extruded the L-shaped Sketch upward in the vertical direction by 10 mm.

Sketch 2: Building a shelf area
sketch2
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.

Extrude 2
extrude2
I did an extrude (technically a cut) downward to create the little shelf.

Fillet
fillet1
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
sketch3
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.

Extrude 3
extrude3
The hole is cut/extruded through the whole piece.

3D Printing
Using the Make –> 3D Print menu we can export an STL file suitable for 3D printing.
cura

Results
action_shot_1
action_shot_2
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.

Conclusion
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.

Oct 20 16

Bricktronics 6xAA Battery Holder Mounting Plate v6

by Layne

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.

Download SVG and PDF of new design from our GitHub repository.

Sep 28 16

Seven years ago today

by Layne

My photo manager just reminded me that this photo was taken seven years ago today. It’s a photo of the first version of the metronome kit.

pasted-image-at-2016_09_28-01_33-pm

Apr 16 16

Laser Cut Project Plate

by Layne

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.

top_view

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.

bottom

You can buy rubber feet like this on Amazon for dirt cheap.

rubber_feet

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.

design_screenshot

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:

angled_view

arduino_detail

angled_view_2

back

no_cables

Oct 27 15

Bricktronics Shield compatibility with Arduino Leonardo: All sensors, but no motors :-(

by Layne

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!)

ArduinoLeonardoFront_2

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.

Motors

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.

Sensors

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.

Oct 25 15

Bricktronics software updates – v1.2

by Layne

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.

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.

Jul 10 15

Tap-Tempo Metronome 2 – External Connections

by Layne

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:

ttm2_expansion_pins

The rest of this post will be an explanation of what each of those pins is doing.

read more…