Monthly Archives: January 2019

New product: Tic T249 USB Multi-Interface Stepper Motor Controller

via Pololu Blog

I am excited to announce the release of the Tic T249 USB Multi-Interface Stepper Motor Controller, the fourth model in our line of Tic Stepper Motor Controllers. The Tic T249, which is based on the TB67S249FTG IC from Toshiba, features a broad 10 V to 47 V operating range and can deliver up to approximately 1.8 A per phase without a heat sink or forced air flow, making it our highest-power Tic yet. In addition to the array of high-level features offered by the other members of our Tic family, the Tic T249 offers access to several innovative features of the TB67S249FTG driver.

One of the most exciting new features is Toshiba’s Active Gain Control (AGC), which automatically reduces the stepper motor current below the set limit based on the actual load on the motor, allowing for reduced unnecessary heat generation and higher peak power when the motor actually needs it. The driver also incorporates Toshiba’s Advanced Dynamic Mixed Decay (ADMD) technology, which dynamically switches between slow and fast decay modes based on the actual motor current, providing higher efficiency and smoother steps at high speed than you get with traditional timing-based mixed decay.

The AGC has several configuration options, and our Tic Control Center software makes it easy to configure over USB:

The “Input and motor settings” tab for a Tic T249.

Like the other members of the Tic family, the T249 makes basic speed or position control of a stepper motor easy, with lots of configurable parameters (e.g. max speed and acceleration) and support for six high-level control interfaces:

  • USB for direct connection to a computer
  • TTL serial operating at 5 V for use with a microcontroller
  • I²C for use with a microcontroller
  • RC hobby servo pulses for use in an RC system
  • Analog voltage for use with a potentiometer or analog joystick
  • Quadrature encoder input for use with a rotary encoder dial, allowing full rotation without limits (not for position feedback)

This video gives a brief demonstration of these interfaces in action:

The Tic T249 is available with connectors soldered in or without connectors soldered in. If you do not need the high-level interfaces provided by the Tic and want to control Toshiba’s stepper driver directly, we also offer stepper motor driver carriers for the TB67S249FTG and TB67S279FTG.

Here is a handy comparison chart with all four Tic stepper motor controllers:

Tic T500

Tic T834

Tic T825

Tic T249
Operating voltage range: 4.5 V to 35 V(1) 2.5 V to 10.8 V 8.5 V to 45 V(1) 10 V to 47 V(1)
Max continuous current per phase
(no additional cooling):
1.5 A 1.5 A 1.5 A 1.8 A
Peak current per phase
(additional cooling required):
2.5 A 2 A 2.5 A 4.5 A
Microstep resolutions: full
Automatic decay selection: Yes Yes
Automatic gain control (AGC): Yes
Driver IC: MP6500 DRV8834 DRV8825 TB67S249FTG
Price (connectors not soldered): $19.95 $29.95 $29.95 $39.95
Price (connectors soldered): $21.95 $31.95 $31.95 $41.95

1 See product pages and user’s guide for operating voltage limitations.

New firmware features

The Tic T249 also has updated firmware (version 1.06) that includes several new features (which are available to the rest of the Tic family as well).

Example pin configuration for a Tic with limit switches.

By popular demand, this new firmware adds support for limit switches: any of the Tic control pins (SCL, SDA, TX, RX, or RC) can be configured as a digital input for a forward or reverse limit switch. When the limit switch is active, the Tic abruptly shuts down any movement in the specified direction, but allows the motor to move in the other direction. You can use limit switches to help prevent your system from leaving its desired range of motion.

If you configure a limit switch, you can use the Tic’s new homing procedure. The new “Go home” command, which is available over serial, I²C, and USB, starts the homing procedure. The Tic will start moving in the direction specified by the command until it hits a limit switch for that direction. Then it will change directions, move until the limit switch deactivates, and set its current position to 0. The stepping speeds used by the Tic during the homing procedure are configurable.

You can also use the homing feature automatically, without sending a command. If automatic homing is enabled, the Tic performs the homing procedure whenever it is being commanded to go to a specific position but it is uncertain of its current position (e.g. immediately after motor power is applied). This feature is intended to be used in the “RC position”, “Analog position”, and “Encoder position” control modes.

The new firmware also adds several features to the Tic’s TTL serial interface that make it more usable in systems with large numbers of Tics and in half-duplex serial buses. Specifically, it adds support for an alternative device number so any Tic can optionally be addressed by two different device numbers. It adds an option to enable 14-bit device numbers so you can have more than 128 Tics on a serial bus. The Tic now has an option to encode its serial responses using only bytes between 0 and 0x7F, which can be useful in setups where the serial response from one Tic will be seen by other Tic devices, and you don’t want it to be misinterpreted as a command. We also implemented several changes to make the Tic less susceptible to noise on the serial lines, and you can now enable CRC bytes for serial responses sent by the Tic so that you can confirm the data you received matches what the Tic sent.

Introductory special

As usual, we are offering an extra introductory special discount on the Tic T249, to help share in our celebration of releasing a new product. The first hundred customers to use coupon code T249INTRO can get up to three units for just $19.95! And we’ll even cover the shipping in the US!

Enginursday: Motion-Controlled, Wearable LED Dance Harness

via SparkFun: Commerce Blog

I’m pretty ambitious whenever I get inspired to do a project – after research and testing, I consider the time constraints and how much experience I have doing whatever I’m interested in doing. I then usually take a step back and dial it down to something a bit more manageable. Instead of tackling the whole project all at once, I break it down and complete it in small chunks. This was the case after being inspired by some dancers using EL wire for their performance. In 2014, I started drawing out plans to build some light up costumes for my students at the old SparkFun building. I thought it would be cool and fun for them.

If you remember from my Enginursday post last year, I shared two designs that I used with my students. The first design used EL tape and panels. The second design used non-addressable LED strips.

Mark I: EL Dance Shirt Mark II: LED Dance Harness

Mark III: Motion Controlled Wearable LED Dance Harness

It would have been a shame to not reuse the parts that I spent so much time building for seven students. Instead of designing a new costume, I decided to focus my energy on a small upgrade at their 2016 spring performance with Streetside Studios. For Mark III, I mixed different colors and replaced the custom power adapter with a motion controller. The motion controller used an ADXL335 triple axis analog accelerometer, transistor, and Arduino Pro Mini to switch the LEDs between patterns. It was simple and easy to use. Here’s a quick demo of it in action with one of my bboys.

Motion Controlled Wearable LED Dance Harness in Action

How Do You Build Such a Thing?

Assuming that you have already prepared the LEDs and harness tailored to your size, check out the tutorial linked below for more details on making your very own motion-controlled wearable LED dance harness! Oh and don't be scared of the numbers that I provided for calibrating all eight sensors; they’re pretty interesting in my opinion.

Motion Controlled Wearable LED Dance Harness

Have you ever added an accelerometer or IMU to a wearable project involving dance or movement? Let us know your thoughts below in the comments. Tune in sometime in the future when I show you Mark IV. I’ll need a bit more time to explain what I did for the next version. ;D

comments | comment feed

Rover team from IIT Madras places first in Indian Rover Challenge

via Pololu Blog

Congratulations to Team Anveshak from IIT Madras, who took first place at the 2019 Indian Rover Challenge! The IRC is a robotics and space exploration-based competition for college students. Participating teams design and build a Martian rover prototype and use that rover to compete in various tasks like obtaining soil samples, operating electrical racks, and picking up and delivering objects.

Team Anveshak’s winning rover, Caesar, uses 10 different Pololu products! We are especially excited to hear that their rover prominently features our newer G2 High-Power Motor Driver 24v13 and TB9051FTG motor drivers, using 9 of each of those boards.

We love seeing all the awesome things like this that people are doing with our products! For a more complete list of the Pololu parts used in Caesar, check out the related products listed below. If you want to learn more about the team, check out their website.

8 March 2019 Update: See a video of Caesar in action here.

More Python with the SparkFun LumiDrive!

via SparkFun: Commerce Blog

Last week, we started poking at SparkFun’s new LumiDrive LED Driver and played a little with the available digital pins broken out on the board. This week, we’ll take a look at the analog pins, play with them as inputs, and see if we can put something together using both digital and analog pins.

If you didn’t catch its release, let me introduce you to the SparkFun LuMini LED Driver. This board boasts a SAMD21G-AU microcontroller, to allow you to run Python, micropython, circuitpython, etc.


The SparkFun LumiDrive LED Driver. So powerful. So elegant. So red.

Let’s dig into analog input on the LumiDrive. The first thing we need to do is import the proper library. So just as we imported the digitalio library to read and control things connected to the digital pins, this time we’ll need to import the analogio library.

import analogio

# Then we impliment it with this line

analog_in = analogio.AnalogIn(board.A3)

There is another way to do this, which I didn’t discuss last week. Unlike programming in Arduino, with Python (or microPython, or circuitPython) you don’t need to import the entire library. If you are only using a single element from that library, it is also possible to do this:

from analogio import AnalogIn

# Now our sketch knows where AnalogIn came from, so
# we don't need to instruct it where to look. We can just use

analog_in = AnalogIn(board.A3)

High value potentiometers

If you’re coming from the world of Arduino (or C), you would expect the analog value coming in from your potentiometer to be somewhere in the 0-1023 range – and you would be correct. However, things are a little different here. Your analog reading will fall within the range of 0-65535 (assuming 16-bit), so there’s a much higher resolution.

Let’s say we just want to see what value our trim pot is returning. Well first, of course, we need to attach our potentiometer. The hookup to the LumiDrive is simple, and just as you would expect. The outside legs of your potentiometer go to 3.3V and GND, with your center leg going to an analog pin. In this case I’m using A3.

Breadboard setup

Adding digital inputs to D8 and D9, and an analog input to A3

The pin.value call will return the raw data from your potentiometer, so with a simple sketch, we can see what our potentiometer is telling us.

import time
import board
import analogio

analog_in = analogio.AnalogIn(board.A3)

# Just read pin value
def get_pin_value(pin):
    return pin.value

while True:
    print (get_pin_value(analog_in))


Once you’ve saved that sketch to your LumiDrive (as or, you can open up a serial terminal and you should see something like this.

Analog Read

Returned analog values from our potentiometer

Note! Even though Mu has its own serial window, the LumiDrive is not yet recognized by it, and will tell you something like:

Could not find an attached device.

Make sure the device is plugged into this computer.

Blah blah blah other important things.

For the time being, I'm simply using TeraTerm. You should have no problems with TeraTerm, CoolTerm or whatever your favorite terminal program happens to be.

Now you probably notice that the value never gets all the way down to zero. With a resolution of 65535 across its rotation, and the little bit of float, that is to be expected. There are ways to eliminate that, but that’s an issue for a whole different post.


A potentiometer is a means to an end. That is, the values returned from a potentiometer are generally not as exciting as what we do with those values. Let’s consider a few ideas.

Suppose we want to know the voltage going through our potentiometer. Since we’re on a 3.3V setup, we’ll want to take the returned value from our pot, multiply it by 3.3, and then divide it by the full range of our potentiometer. So it’s not just a stream of numbers flying by, let’s tell the casual observer what we’re showing them. Try this.

import time
import board
import analogio

analog_in = analogio.AnalogIn(board.A3)

# Read pin value, calculate voltage on a 3.3V circuit
def get_voltage(pin):
    return (pin.value * 3.3) / 65535

while True:
    print ("Voltage is ", (get_voltage(analog_in)))


Notice that to print a string and a variable together, you just need to add a comma between the two. Now what if instead of voltage, you want to change your RGB values? Just like with the voltage indicator, you simply need to multiply the pin value by the number of your desired range - in this case 256 - and then divide it by the potentiometer’s resolution, 65535.

import time
import board
import analogio

analog_in = analogio.AnalogIn(board.A3)

# Map pin value to a scale of 0-255
def get_color(pin):
    return (pin.value * 256) / 65535

while True:
    print ("Color value is ", (get_color(analog_in)))



Returning a value in the range of 0-255. But come on, your LED isn’t interested in (0, 255, 87.6239).

Of course, this gives us a float, when we really just want an integer. There are a few different ways to do this, and if you have a favorite, or you think my way is terrible, please let me know! For this example, I’m going to use the truncate command from the math library. Remember, we can either import the entire math library, of just the part we need.

import time
import board
import analogio
from math import trunc

analog_in = analogio.AnalogIn(board.A3)

# Map pin value to a scale of 0-255
def get_color(pin):  # Returning only integers this time
    return trunc((pin.value * 256) / 65535 ) #If we used 'import math', this would need to be return math.trunc()

while True:
    print ("Color value is ", (get_color(analog_in)))



Ah, now that’s more like it. Integers as far as the eye can see.

Off the screen and into the wild

We’ve only seen our values returned to us in our serial terminal window. Let’s try to make something happen that doesn’t need a computer screen to show results.

With our three digital inputs from last week, and our analog input from this week, let’s try this. Since I just added components to last week’s breadboard, I still have a yellow momentary button on D8, and a green momentary button on D9, and I’m just adding a potentiometer on A3. We’ll use D6 as well, since it’s there. I want to create a circuit that does the following:

If I push the green button, the LuMini 2-inch ring lights up green; push the yellow button, and the ring lights up yellow; push the on-board button, and the ring will light up red. I’m pretty sure that’s close to what we did last week. But I also want it to blink, and I want to be able to control the speed of the blink with my potentiometer. Let’s try this:

import adafruit_dotstar # The LED library
import math
import time
import board
import digitalio
import analogio

# Setting up the board's blue stat LED to blink
led = digitalio.DigitalInOut(board.D13)
led.direction = digitalio.Direction.OUTPUT

analog_in = analogio.AnalogIn(board.A3)

#Setting up the board's onboard button
button6 = digitalio.DigitalInOut(board.D6)
button6.direction = digitalio.Direction.INPUT
button6.pull = digitalio.Pull.UP

# Setting up the digital IO pins as input buttons
button8 = digitalio.DigitalInOut(board.D8)
button8.direction = digitalio.Direction.INPUT
button8.pull = digitalio.Pull.UP

button9 = digitalio.DigitalInOut(board.D9)
button9.direction = digitalio.Direction.INPUT
button9.pull = digitalio.Pull.UP

# These two variables should be adjusted to reflect the number of LEDs you have
# and how bright you want them.
num_pixels = 40 #The 3" ring has 60, the 2" ring has 40, the 1" ring has 20
brightness = 0.25 #Set between 0.0 and 1.0, but suggest never running at full brightness

# Some standard colors.
BLACK = (0, 0, 0)
RED = (255, 0, 0)
YELLOW = (255, 150, 0)
ORANGE = (255, 40, 0)
GREEN = (0, 255, 0)
TEAL = (0, 255, 120)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)
MAGENTA = (255, 0, 20)
WHITE = (255, 255, 255)

# This creates the instance of the DoTStar library.
pixels = adafruit_dotstar.DotStar(board.SCK, board.MOSI,
    num_pixels, brightness= brightness, auto_write=False)

# This function takes a color and a delay and fills the entire strand with that color.
# The delay is given in the case you use multiple color fills in a row.
def color_fill(color, wait):

# Here's where the action happens
while True:
    if not button8.value:
        led.value = True
    elif not button9.value:
        led.value = True
    elif not button6.value:
        led.value = False
        led.value = False

    time.sleep((analog_in.value * 2) / 65535) #delay is determined by potentiometer reading

    color_fill(BLACK, 0)

    time.sleep((analog_in.value * 2) / 65535) #delay is determined by potentiometer reading

You’ll notice a couple of things in this last example. The first is that while we defined functions to get our analog values in all of the previous examples, we did not in this one. To read our time.sleep variable, we read the analog_in.value within our while True loop. I did this because Python can’t convert a function to a float, and the time.sleep call expects a float as its argument. Second, in getting the value for our time.sleep, I’ve multiplied our analog_in value by two before dividing it by 65535. This sets our maximum sleep time at two seconds, just like multiplying by 3.3 in the earlier example gave us our voltage range.

Wait, there’s more!

But not this week. Again, this is mostly geared toward those among us (myself included) who haven’t done much Python programming as it applies to the physical world. I’m sure there are better or more efficient ways to do exactly what I’ve just done, and since as long as I’m still breathing, I’m still learning, I’d love to see your suggestions and improvements in the comments.

I also recall saying last week that if all went well, I would try to use all of this in some sort of practical application or project. Well, things went well, but not quite that well. I have a head full of ideas as to how to use all of this in a build, but this week there just wasn’t enough time, so that will be a post for another day.

comments | comment feed

Friday Product Post: Going Turbo!

via SparkFun: Commerce Blog

Welcome back, everyone! We have another big week of new products, starting with the RedBoard Turbo. We also have the Qwiic MP3 Trigger, which just graduated up from SparkX, as well as another board to join the LuMini line (this one is an 8x8 LED matrix!). We round out the day with a smart machine vision camera from JeVois.

We felt a little nostalgic this week with our presentation!

SparkFun RedBoard Turbo - SAMD21 Development Board

SparkFun RedBoard Turbo - SAMD21 Development Board


If you’re ready to step up your Arduino game from older 8-bit/16MHz microcontrollers, the SparkFun RedBoard Turbo is a formidable alternative. At its heart, the RedBoard Turbo uses the ATSAMD21G18, which is an ARM Cortex M0+, 32-bit microcontroller that can run at up to 48MHz. With an impressive 4MB of external flash memory and a UF2 (USB Flashing Format) bootloader, the RedBoard Turbo provides you with an economical and easy to use development platform with more power than the classic RedBoard.

SparkFun Qwiic MP3 Trigger

SparkFun Qwiic MP3 Trigger


Sometimes you just to play an MP3, whether it’s a theme song as you enter the room or a power song when you’re working out. The SparkFun Qwiic MP3 Trigger takes care of all the necessary requirements – all you need to do is send a simple I2C command and listen to whatever is on your micro SD card. Utilizing our handy Qwiic system, no soldering is required to connect it to the rest of your system. However, we still have broken out 0.1"-spaced pins in case you prefer to use a breadboard.

SparkFun LuMini LED Matrix - 8x8 (64 x APA102-2020)

SparkFun LuMini LED Matrix - 8x8 (64 x APA102-2020)


This is the 8x8 SparkFun LuMini LED Matrix, packed with 64 individually addressable LEDs, each capable of producing 16 million colors. It provides you with a great way to add a square of light to just about anything, or even make a screen of a custom shape! LuMini is a miniaturized version of our Lumenati LED line, but instead of utilizing 5mm by 5mm APA102 LEDs (APA102-5050), LuMini uses a 2mm by 2mm package (APA102-2020). This allows for incredibly tight pixel densities, and thus, a screen with less pixelation!

JeVois Smart Machine Vision Camera

JeVois Smart Machine Vision Camera


The JeVois Camera is a low cost, all-in-one 1.3MP machine vision camera. With an on-board quad core CPU and MicroSD slot, all computer vision algorithms run on the device itself, and it can interface to computers or other devices, such as Arduinos, via USB or serial connection. At just 1.7 cubic inches and 17g, this sensor is one of the smallest TensorFlow-enabled, deep learning AI, smart cameras on the market today. With the added ability to run most popular machine vision frameworks (Open CV 4.0.0, Caffe, Darknet), you will have plenty of options when it comes to deciding how you want to operate your new camera!

And that’s it for this week! Let us know if you liked the video format or whether you prefer the broken up videos instead. As always, we can’t wait to see what you make! Shoot us a tweet @sparkfun, or let us know on Instagram or Facebook. We’d love to see what projects you’ve made!

We’ll be back next week with even more fantastic new products!

comments | comment feed

TI Robotics System Learning Kit (TI-RSLK) in EDN’s hot 100 products of 2018

via Pololu Blog

EDN recently released their hot 100 products of 2018, and we are excited to share that the TI Robotics System Learning Kit (TI-RSLK), which is based on our Romi platform, is included in the list. For those not familar with the TI-RSLK, it is a complete robotics kit and curriculum aimed at university students. Twenty modules with lecture notes, lab activities, and over a hundred videos are all publicly available.

The kit was included in the Tools & Development section of the list, and you can read EDN’s review of the kit from earlier in the year here. Kits can be purchased from Element14.