Monthly Archives: May 2015

Going Beyond Shallow Understanding

via Nuts and Volts

Thanks to readily available kits, DIY articles, and web resources, it’s a simple matter to cobble together a functional circuit with little real understanding of the underlying electronics. The circuit description for an audible siren kit might read something like “Q1 and Q2 form an astable multivibrator.” At some level, this may be adequate. However, if you’re interested in truly understanding an astable multivibrator — or any other circuit for that matter — you have to dig deeper.

Going Beyond Shallow Understanding

via Nuts and Volts

Thanks to readily available kits, DIY articles, and web resources, it’s a simple matter to cobble together a functional circuit with little real understanding of the underlying electronics. The circuit description for an audible siren kit might read something like “Q1 and Q2 form an astable multivibrator.” At some level, this may be adequate. However, if you’re interested in truly understanding an astable multivibrator — or any other circuit for that matter — you have to dig deeper.

New Product Friday: Look! A Thing!

via SparkFun Electronics Blog Posts

Hello Hello! We’re back and we have a couple new things to talk about this week. First, let’s check out the video.

It’s interesting to see how much traffic there really is in the building. This shows just how easy it is to implement a simple sensor network to gather data and post it to the Internet. What a time to be alive.

SparkFun ESP8266 Thing

$ 15.95

Over the past year, the ESP8266 has been a growing star among IoT or WiFi-related projects. It’s an extremely cost-effective WiFi module, that – with a little extra effort – can be programmed just like any microcontroller. The SparkFun ESP8266 Thing is essentially a breakout and development board for the ESP8266 WiFi SoC. Why the name? We lovingly call it the Thing due to it being the perfect foundation for your Internet of Things.

SparkFun’s new development board for the ESP8266 breaks out all of the module’s pins, and comes equipped with a LiPo charger, power supply, and all of the other supporting circuitry it requires. Check out the video above for a demo. This is the perfect board for building a wireless sensor network.

SparkFun Nintendo DS Screen Kit

$ 9.95

Inside each kit is one Nintendo DS Touchscreen and one SparkFun Touchscreen Connector Breakout. All you need to do to set this kit up is to simply attach the touchscreen’s ribbon cable into the connectors connector, solder on some headers or wires and connect it up. The kit makes it really easy to add touch functionality to a project. Check out this demo of how it works:

Mini Microswitch - SPDT (Standard, 2-Pack)

$ 2.49

We also have some new microswitches. These come in a 2 pack and are great for limit switches for sliders or 3D printers. They are rated for 5A at 250VAC.

The SparkFun Guide to Processing

$ 24.95

Finally, we’re excited to announce the upcoming release of our second SparkFun guide - written by Curriculum Curator Derek Runberg and published by No Starch Press - The SparkFun Guide to Arduino! This book will introduce you to the open-source Arduino platform, designed to help total beginners explore electronics. Our first release, The SparkFun Guide to Processing, teaches you to craft your own digital artwork and even combine it with hardware, with no prior programming experience required. Both books are a great classroom resource for teachers, and for a limited time you can pre-order The SparkFun Guide to Processing for 30% off with the code MAKEART! We’ll be announcing more our the Guide to Arduino when it is available for pre-order – but know that it’s coming soon!

That’s it for this week. Thanks for reading as always. We’ll be back next week with more new stuff, see you then!

comments | comment feed

Enginursday: A New Approach to FPGAs!

via SparkFun Electronics Blog Posts

For me, Field Programmable Gate Arrays (FPGAs) have been the penultimate frontier of electrical engineering design (the ultimate would be fabricating our own chips, but once again, that’s a topic for a different blog post). In discussing FPGAs with some of my SparkFun colleagues, we agree that they’re hard to casually tinker with. You don’t just “play around” with them. FPGAs are programmed in their own languages (usually Verilog or VHDL), using techniques based on synchronous hardware, and developed using software that’s extremely sophisticated. Getting into them usually involves a very steep learning curve.

I’ve been on teams that built FPGA based designs a couple of times before, but it’s not a world I’ve comfortably settled into – I get pulled back into regular software design before I’m really up to speed. The FPGA design suites are big, full of menus, pages, tabs and modes, all described in unfamiliar terminology, which takes time to get to know. A lot of my experience was clicking on the wrong option, then having to figure out how to backtrack.

Justin Rajewski, the Founder and CEO of Embedded Micro, came to us earlier this year with an announcement: they were introducing a new language to ease the transition into FPGA development. I was curious to take a closer look – could they lower the learning curve, and perhaps make it possible for a beginner to casually experiment with an FPGA?


Embedded Micro successfully Kickstarted the Mojo development board in 2013, and it’s been revised a couple of times since then.

Mojo Photo

The Mojo Development Board

The board is currently on version 3, which has:

  • a Xilinx Spartan6 FPGA.
  • 8 user-configurable LEDs
  • 84 I/O Pins.
  • An Atmel AVR 32u4 microcontroller.
  • A flash memory chip to store the FPGA configuration data.

The XC6SLX9 FPGA is the heart of the board, and it has a bunch of goodies under the hood:

  • 9,152 logic blocks.
  • 16 DSP slices.
  • 576 kilobits of RAM.
  • 102 I/O pins.

Developing code for an FPGA is actually describing how the above pieces are configured and interconnected. This could range from a set of simple binary logic operations to a very sophisticated plan for a mathematical algorithm or communication interface. If you want to take a deeper look at the FPGA itself, here is the family datasheet.

In addition to the Mojo hardware, Embedded Micro wrote a series of tutorials that guide the beginner through using the Xilinx tools to develop Verilog code. But, as mentioned above, these tools are cumbersome, and daunting for the beginner.

Enter Lucid

To ease the transition onto the FPGA world, Embedded Micro has now introduced an IDE for the Mojo, and a new FPGA programming language called Lucid.

Mojo IDE Screenshot

The Mojo IDE

The IDE is greatly streamlined in comparison the the Xilinx tools. It’s a single window, with a multi-tab editor, and relatively few buttons and menus. One button builds the code, another loads it on to the board. Since it only supports the Mojo board, a lot of the options present in the Xilinx tools simply aren’t applicable.

Behind the scenes, the Mojo IDE still requires the installation of Xilinx WebpackISE, which is a huge download, and requires navigating a license manager. However, once it’s installed, you don’t need to open it. The Mojo IDE invokes the command line tools in the background (much the same way that the Arduino IDE invokes the GCC compiler).

Lucid itself uses syntax that’s a hybrid of Verilog and C++/Java, with curly braces to denote blocks of code, which will be familiar if you’ve used C++ or Java (as seen in Arduino or Processing). It also includes some higher-level conceptual blocks, such as flip-flips and state machines, which are very useful for FPGA design. Here’s a snippet of Lucid that implements a configurable binary counter.

module counter #(
    SIZE = 8 : SIZE > 0, // Width of the output
    DIV = 0  : DIV >= 0, // number of bits to use as divisor
    TOP = 0  : TOP >= 0, // max value, 0 = none

    // direction to count, use "up" or "down"
    DIRECTION = "up" : DIRECTION == "up" || DIRECTION == "down"  
    input clk,
    input rst,
    output value[SIZE]
) {
    .clk(clk), .rst(rst) {
    dff ctr[SIZE+DIV];

const MAX_VALUE = c{TOP, DIVx{1}}; // value when maxed out

always {
    value = ctr.q[SIZE+DIV-1-:SIZE]; // set the output

    if (DIRECTION == "up") { // when this is an up counter
        ctr.d = ctr.q + 1; // increase
        if (TOP != 0 && ctr.q == MAX_VALUE) { // reached the top?
            ctr.d = 0; // reset
    } else { // down counter
        ctr.d = ctr.q - 1; // decrease
        if (TOP != 0 && ctr.q == 0) { // reached the bottom?
            ctr.d = MAX_VALUE; // reset to top

The IDE also lets you intermix Lucid and Verilog source files, which can be useful if you’ve already got a Verilog module that you want to include. When you press the “Build Project” button, the IDE translates the Lucid files into Verilog, then passes them to the Xilinx Verilog tools. Those intermediate Verilog files are also saved in the build tree, in case you want to export them to use in a Verilog workflow.

In Use

I’ve been playing with Lucid on the Mojo for about 10 days now. It’s been a slow process, but more productive than 10 days with a traditional FPGA design suite. I’m finding that with fewer menus, options and buttons, I’m a lot less likely to take a wrong turn and wind up in some mode I wasn’t expecting. This has allowed me to focus on troubleshooting my code, rather than the development environment.

I was hoping to have some sort of ambitious project to share for this blog post, but it’s not coming together as quickly as I was hoping. My divisibility by 3 checking hardware isn’t fully functional, and I’m still a ways from building an I2S port from scratch.

Working with the tools, I’ve also found a couple of little issues with the language and IDE. In each instance, Embedded Micro have been quick to respond. They guided me toward better Lucid practices, and updated the IDE with missing features.

Epilogue: Future Developments

Lucid is very new – it was released on April 13th! It’s still in its infancy, and has room to grow. As such, I asked Embedded Micro for a peek at their roadmap. There are some things we can expect to see:

  1. More Lucid tutorials, eventually augmenting the older Verilog tutorials.
  2. Several new hardware shields.
  3. Some extensions to the IDE, adding timing simulation, and interactive debug features. You’ll be able to configure part of the FPGA as timing debugger or logic analyzer.

A New Path Into FPGA Development

If you’re looking to jump from Arduino into FPGA programming, the Mojo has an extra advantage. The 32U4 microcontroller (the same chip as is found on the the Pro Micro) is Arduino-compatible. You can use the Arduino IDE to program the microcontroller, and add your own code that can interact with the FPGA.

Embedded Micro have released the source code for the loader firmware. It exposes some hooks to run additional user code, which are described in their Arduino IDE Tutorial.

My Final Thoughts

Knowing what I know now, if I had to start fresh, I’d probably take a different path through the materials Embedded Micro provides.

  1. I’d start by printing out the Lucid Language Reference. It’s got syntax examples that demonstrate the basic features of the language.
  2. With the guide in hand, I’d work through the basic tutorials. Their current tutorials are for combinatorial logic and synchronous logic.
  3. Before forging ahead on my own, I’d carefully study all of the pieces listed in the ‘project->add components’ menu. These are actually modules written in Lucid, some of which implement non-trivial hardware like multi-channel PWM, or UART serial ports. It turns out that several of these were items that I’d been reinventing on my own.

I’ve also spent enough time playing with Lucid to develop some debugging strategies. If you get stuck, try the following:

  • Check the build output in the lower pane of the IDE. In one instance, I was able to find an error I’d made assigning signals to pins in the constraints file…which directly leads us to the next item:
  • Route internal signals to pins, and observe them with an oscilloscope or logic analyzer. Sometimes, you need to open your own windows into the chip. This might be the equivalent of peppering an Arduino sketch with Serial.print() calls.
  • When things are misbehaving, consider a different approach. Sometimes my initial instinct for implementation isn’t right, and things can be done differently.
  • If you really need help with a Lucid project, reach out to Embedded Micro. They’ve been very helpful, and are eager to see people using the language.

comments | comment feed

AVC 2015 – What’s new this year?

via SparkFun Electronics Blog Posts

Here are some of the changes we are planning for AVC 2015, including new programming, more external vendors, new building tours, combat ‘bots and the grand opening of the SparkFun Emporium, an on-site SparkFun product store! With continual improvement in mind, we have made the following changes to AVC:

The biggest change this year is the addition of “Hack Tracks.” Hack Tracks are basically programming topics. The Tracks for 2015 are: Robotics/Soldering/Iot Hacks, Craft/Cosplay/eTextiles Hacks, Media/Music Hacks and Agriculture/Eco Hacks. Each Hack Track will have its own area at AVC, where spectators and ‘bot entrants can check out cool demos, exhibits, presentations and workshops hosted by internal SparkFun staffers as well as external partners and organizations. For example, we have MOOG, makers of the Moog Werkstatt-Ø1, doing a music hacking demo. With the increased focus on being more inclusive, we have added SparkHacks to the AVC name, because it’s not just about the 'bots anymore! But it still is about the 'bots, of course.

AVC 2014 start line

As you have probably heard, there will be no aerial this year. With highway 119 so close to the new SparkFun building, and without having the reservoir to fly over, the danger of a ‘bot hitting a person, car or piece of property is just too high. That being said, we promise that next year we’ll try to find a way to bring the aerial category back. If you have ideas for how to make that happen, put them in the comments below!

We will be offering special edition building tours with a AVC slant. The tours will showcase the new building, the production floor complete with working pick-and-place machines, and some fun stuff we have going on upstairs at SparkFun that you may not know about yet (think IoT).

SparkFun is charging admission for AVC 2015. The $6.00 fee ($4.75 for admission, $1.25 for Eventbrite) will help us offset some of the cost of AVC. Each year, we spend more and more to try to make the ever-growing event bigger, cooler and more exciting. For AVC, we need to purchases event rentals, like tents, tables, chairs and generators, and supplies like hay bales, signage, and promo material. In past years, we also had to pay for the location (Boulder Reservoir), and this year, being back at the SparkFun building, we’ll be paying for increased landscaping (grass to make things less muddy), soldering supplies, and upgrades to our outdoor wifi. And that’s not even counting staff labor costs! Of course, at SparkFun we try as hard as possible to be scrappy and make anything we can ourselves, but even so, putting on an event like AVC costs money, and increasing our cost each year is not sustainable. For that reason, we decided to try to get a bit of money back from admission, as well as sponsorship from external companies and organizations for the event. We will be selling tickets at the door day-of. And you heard it here first - we will have FREE AVC 2015 tickets at the SparkFun booth at Denver Comic Con (this coming weekend) and Denver Maker Faire! So come on by!

in the pits - AVC 2014

Another change this year is having external companies and organizations come to AVC! By inviting these partners to demo or sell their goods at AVC, we hope to grow the tech and maker community here in the Boulder area and allow our friends to get some exposure. We asked local tech, maker, education and fun companies to join us. So far we have the educational toy company WABA Fun and the commercial drone maker UASUSA hosting booths at AVC.

One other notable addition this year is the Combat Bots! Our own Casey “Chopper” Kuhns will be heading up the Combat Bot competition. It is based on the the SPARC (Standardized Procedure for Advancement of Robot Combat) standards and this year, we are accepting 1lb and 3lb ‘bots. If you think you are up for the challenge, please register your autonomous ground 'bot OR a combat 'bot here. Let’s get ready to rumble!

barrel! - AVC 2014

In addition to all the robot fun, we’ll be helping local humans learn to solder. That’s right, the first ever SparkFun Soldering Booth at AVC! If you have ever seen us at Maker Faire, USASEF or SXSW, you know we love to teach people to solder. This year at AVC, we’ll be running our soldering workshop featuring the SparkFun Badgers. The Badgers debuted at SXSW this year with much acclaim. These powerful Badgers not only look awesome, once soldered together the Badger Stick and LED matrix they can be reprogrammed to display new messages or control almost anything. And of course, once you are inside AVC, all activities are free, including soldering!

The last, and maybe most exciting change to AVC this year is SparkFun’s much anticipated retail space grand opening! That’s right, we’ll be debuting the new SparkFun Emporium at AVC, complete with retail sales on a select mix of products and some special AVC bundles. The space looks amazing and is full of electronics demos, a SparkFun timeline and of course all the cool products!

So come on by to AVC 2015. It’s SparkFun’s biggest event and this year promises to be the most unforgettable yet. Remember, AVC will be held on Saturday, June 20th (exactly one month out from today!), at SparkFun Headquarters, and will be open to the public from 9 a.m.-4 p.m.

If you’d like to buy ticket and register to spectate, please go here.

if you like to register a ‘bot for ground races or the combat competition, please go here (you must be logged into the SparkFun site).

We hope to see you there!

AVC band - 2014

comments | comment feed

Just because you can, doesn’t mean you should

via SparkFun Electronics Blog Posts

3D printing is challenging the ideas of modern manufacturing. From rocket engine parts to prosthetics, 3D printing is opening many doors to the home builder. We have a few printers around the office and they are great for making small brackets, enclosures, and turtle action figures. But sometimes, ideas should just stay on the drawing board. For an upcoming episode of SparkFun Live, I sent out a quick, company-wide call for “terrible things to 3D print.” Here is a sampling of what we got:

  • Scissors
  • Bike Lock
  • Trailer Hitch
  • Grilling Spatula
  • Exhaust Brackets
  • Hammer
  • Replacement Ladder Rung
  • Roller Blades
  • Screw Driver
  • Skateboard trucks
  • House Key
  • Dentures
  • TV wall mount
  • Soldering Iron Stand
  • Slap Bracelet

I’ll choose a few winners, print them, and put them to questionable and amusing use during SparkFun Live. For those who want to play along at home and submit item suggestions, here are some guidelines:

  1. Prints will be done on the LulzBot Mini 3D Printer
  2. Printing material is HIPS
  3. Keep it PG

If I end up picking one of your inadvisable ideas, we’re willing to mail you the aftermath - potentially in unrecognizable condition - when all is said and done. How’s that for an incentive?!

comments | comment feed