Monthly Archives: April 2019

Enginursday: How to Develop a Package for Microsoft MakeCode

via SparkFun: Commerce Blog

Microsoft MakeCode is a quite powerful, block-based coding language useful for anybody trying to learn how to code. However, creating packages for this language is sometimes a little difficult. I've developed quite a few of these packages in the past and figured that the somewhat unclear process could use some documentation for posterity. The below tutorial will get you developing your own MakeCode packages in no time.

New!

How to Create a MakeCode Package for Micro:Bit

April 16, 2019

Learn how to develop code blocks for the Micro:bit in Microsoft MakeCode!

comments | comment feed

Antenna Connectors

via SparkFun: Commerce Blog

With a plethora of GPS/GNSS products going live recently, I wanted to talk a bit about the various connectors you'll find. SMA and RP-SMA are some of the older antenna options. SMA stands for SubMiniature version A and was developed in the 1960s with a male connector having the pin, and the female connector having the socket. This means that the female connector is inserted into the male connector (I know, confusing).

Then along came RP-SMA or Reverse Polarity SMA. This connector type reversed the location of the pin and socket but didn't change the gender of the connectors. So, now the female RP-SMA has a pin and the piece is inserted into the male housing.

You'll still see SMA on quite a few boards and antenna, and with their 500+ mating cycles they are fairly popular for instances where you need to change your antenna. One thing to be careful of: I've seen manufactures list boards as SMA while the actual connector is RP-SMA. While technically RP-SMA can be considered a type of SMA, it is worth noting that you should be careful when buying an antenna.

SMA Male SMA Female RP-SMA male RP-SMA Female
SMA Male
Center Pin, Inner Threads
SMA Female
Center Hole, Outer Threads
RP-SMA Male
Center Hole, “Male” Inner Threads
RP-SMA Female
Center Pin, “Female” Outer Threads

The newer u.FL was created by Hirose, but because of its small and fragile size is only rated for about 30 mating cycles. While this is good for permanent connections that really only need to be changed for replacement of faulty parts, it is not so good for constantly swapping out antennas. This is one reason you will see u.FL to SMA adapters. Check out our RF Connector Buying Guide for more information on RF Connectors.

Interface Cable SMA to U.FL

Interface Cable SMA to U.FL

WRL-09145
$4.95
3
Interface Cable - SMA Female to SMA Male (25cm)

Interface Cable - SMA Female to SMA Male (25cm)

WRL-12861
$4.95
1
Interface Cable RP-SMA to U.FL

Interface Cable RP-SMA to U.FL

WRL-00662
$4.95
1
U.FL to U.FL Mini Coax Cable - 200mm

U.FL to U.FL Mini Coax Cable - 200mm

WRL-15114
$1.95

Because of the u.FL's small size and fragile connectors, we've put together some helpful tips on using u.FL to prolong the life of your board, your cables, and your antennas.

Three Quick Tips About Using U.FL

December 28, 2018

Quick tips regarding how to connect, protect, and disconnect U.FL connectors.

comments | comment feed

Beowulf Clusters, node visualisation and more with Pi VizuWall

via Raspberry Pi

Pi VizuWall is a multi-Raspberry Pi MPI computing system with a difference. And the difference is servo motors!

Pi VizWall at Maker Faire Miami

We can thank Estefannie for this gem. While attending Maker Faire Miami earlier this month, she shared a video of Pi VizWall on her Instagram Stories. And it didn’t take long for me to ask for an introduction to the project’s owner, Matt Trask.

I sent Matt a series of questions in relation to the project so I could write a blog post, but Matt’s replies were so wonderfully detailed that it seems foolish to try and reword them.

So here are the contents of Matt’s email replies, in their entirety, for you all to enjoy.

Parallel computing system

The project is a parallel computing system built according to the Beowulf cluster architecture, the same as most of the world’s largest and fastest supercomputers. It runs a system called MPI (Message Passing Interface) that breaks a program up into smaller pieces that can be sent over the network to other nodes for execution.

A Beowulf cluster at Michigan Tech

Beowulf clusters and MPI were invented in 1994 by a pair of NASA contractors, and they totally disrupted the high-performance computer industry by driving the cost of parallel computing way down. By now, twenty-five years later, the Beowulf cluster architecture is found in approximately 88% of the world’s largest parallel computing systems.

Going back to university

I’m currently an undergraduate student at Florida Atlantic University, completing a neglected Bachelor’s Degree from 1983. In the interim, I have had a wonderful career as a Computer Engineer, working with every generation of Personal Computer technology. My main research that I do at the University is focused on a new architecture for parallel clusters that uses traditional Beowulf hardware (enterprise-class servers with InfiniBand as the interconnect fabric) but modifies the Linux operating system in order to combine the resources (RAM, processor cores) from all the nodes in the cluster and make them appear as a single system that is the sum of all the resources. This is also known as a ‘virtual mainframe’.

The Ninja Gap

In the world of parallel supercomputers (branded ‘high-performance computing, or HPC), system manufacturers are motivated to sell their HPC products to industry, but industry has pushed back due to what they call the “Ninja Gap”. MPI programming is hard. It is usually not learned until the programmer is in grad school at the earliest, and given that it takes a couple of years to achieve mastery of any particular discipline, most of the proficient MPI programmers are PhDs. And this, is the Ninja Gap — industry understands that the academic system cannot and will not be able to generate enough ‘ninjas’ to meet the needs of industry if industry were to adopt HPC technology.

Studying Message Passing Interface

As part of my research into parallel computing systems, I have studied the process of learning to program with MPI and have found that almost all current practitioners are self-taught, coming from disciplines other than computer science. Actual undergraduate CS programs rarely offer MPI programming. Thus my motivation for building a low-cost cluster system with Raspberry Pis, in order to drive down the entry-level costs.

This parallel computing system, with a cost of under $1000, could be deployed at any college or community college rather than just at elite research institutions, as is done [for parallel computing systems] today.

Moving parts

The system is entirely open source, using only standard Raspberry Pi 3B+ boards and Raspbian Linux. The version of MPI that is used is called MPICH, another open-source technology that is readily available.

Perhaps one of the more interesting features of the cluster is that each of the Pi boards is mounted on a clear acrylic plate that is attached to a hinging mechanism. Each node is capable of moving through about 90 degrees under software control because a small electric servo motor is embedded in the hinging mechanism. The acrylic parts are laser-cut, and the hinge parts have been 3D printed for this prototype.

Raspbian Linux, like every other Linux version, contains information about CPU utilization as part of the kernel’s internal data. This performance data is available through the /proc filesystem at runtime, allowing a relatively simple program to maintain percent-busy averages over time. This data is used to position the node via its servo, with a fully idle node laying down against the backboard and a full busy node rotating up to ninety degrees.

Visualizing node activity

The purpose of this motion-related activity is to permit the user to visualize the operation of the cluster while executing a parallel program, showing the level of activity at each node via proportional motion. Thus the name Pi VizuWall.

Other than the twelve Pi 3s, I used 12 Tower Pro micro servos (SG90 Digital) and assorted laser-cut acrylic and 3D-printed parts (AI and STL files available on request), as well as a 14-port Ethernet switch for interconnects and two 12A 6-port USB power supplies along with Ethernet cable and USB cables for power.

The future of Pi VizuWall

The original plan for this project was to make a 4ft × 8ft cluster with 300 Raspberry Pis wired as a Beowulf cluster running MPICH. When I proposed this project to my Lab Directors at the university, they balked at the estimated cost of $20–25K and suggested a scaled-down prototype first. We have learned a number of lessons while building this prototype that should serve us well when we move on to building the bigger one. The first lesson is to use CNC’d aluminum for the motor housings instead of 3D-printed plastic — we’ve seen some minor distortion of the printed plastic from the heat generated in the servos. But mainy, this will permit us to have finer resolution when creating the splines that engage with the shaft of the servo motor, solving the problem of occasional slippage under load that we have seen with this version.

The other major challenge was power distribution. We look forward to using the Pi’s PoE capabilities in the next version to simplify power distribution. We also anticipate evaluating whether the Pi’s wireless LAN capability is suitable for carrying the MPI message traffic, given that the wired Ethernet has greater bandwidth. If the wireless bandwidth is sufficient, we will potentially use Pi Zero W computers instead of Pi 3s, doubling the number of nodes we can install on a 4×8’ backboard.

The post Beowulf Clusters, node visualisation and more with Pi VizuWall appeared first on Raspberry Pi.

Batteries? What For?

via SparkFun: Commerce Blog

This is a guest blog post from Andrew Shepherd. Andrew has been studying electronics in earnest for over a decade and loves working with his mind and hands. He specializes in analog electronics, but his interests are eclectic and span seemingly unrelated areas.


If you need a project to be portable, here’s a small crash course on some of the batteries that are available and what situations they are good for.

Types:

There are two main types of batteries: primary and secondary – batteries that can be recharged and those that are one-use-only. Today we'll cover only the most relevant and available types for the sake of brevity, as the full catalog of battery types could fill pages. We will also only explore certain secondary batteries.

Lead-Acid - This is the oldest type of rechargeable battery. They can supply a lot of current but are also very heavy compared to newer types. They tend to be used in cars and stationary equipment, like UPSs (Uninterruptible Power Supplies), due to their durability and tolerance for low temperatures. Cell voltage is ~2.1 V each, but they typically come in 6V or 12V packs. Charging and discharging is quite simple, as long as the upper and lower voltage bounds are not grossly exceeded and the charge current is not too high. If they are abused they can outgas hydrogen and potentially explode.

Lead Acid Battery - 12V 7.2Ah

Lead Acid Battery - 12V 7.2Ah

PRT-15066
$47.95

NiMH - These are an improvement on the NiCd batteries, and are a proven and reliable battery technology. They are more power dense than lead-acids, but have a lower cell voltage of ~1.2V under load. Recharging and discharging is also fairly simple given that you don’t draw current below a certain voltage. If abused they can overheat and lose a lot of their capacity.

2500 mAh NiMH Battery - AA

2500 mAh NiMH Battery - AA

PRT-00335
$2.95
-


LiPo/Li-Ion - The difference between LiPo and Li-Ion is subtle and the technologies are typically combined for most batteries, so they will be regarded together. These are lightweight, high power density, high cell voltage (3.7V under load). Their output current capability is consistently better than NiMH for a given size. Their disadvantage is they are less stable than other batteries and care must be taken when charging or discharging. The charging process is more complicated and requires a special process to avoid damage. For multi-cell systems, cell balancing is required for charging and discharging. If these batteries are abused, they can explode and shoot flames and fluoride gas everywhere.

Types of LiPos

These things come in all shapes and sizes and can be used for many applications due to their high power density.

Small Li-Ion Flat Packs - These are useful for small projects and most can interface directly with many SparkFun products. Paper-thin, flexible batteries also exist and may be best for wearables.

Lithium Ion Battery - 850mAh

Lithium Ion Battery - 850mAh

PRT-13854
$9.95
2
<-


18650s - Shaped like a large AA battery, these are a versatile store-and-replace cell with lots of current capability and capacity. Their main advantage is they can be swapped in and out, or be bundled together into a pack.

Lithium Ion Battery - 18650 Cell (2600mAh)

Lithium Ion Battery - 18650 Cell (2600mAh)

PRT-12895
$5.95

Multicell Packs - If you need more voltage than 3.7V this is the way to go. You’ll need a charger capable of cell balancing to use them, however.

Lithium Ion Battery - 2200mAh 7.4v

Lithium Ion Battery - 2200mAh 7.4v

PRT-11856
$15.95

USB LiPo Pack - These are useful for small Arduino projects because they provide USB power (5V at 1A) in a small, handy package.

Lithium Ion Battery Pack - 2.5Ah (USB)

Lithium Ion Battery Pack - 2.5Ah (USB)

PRT-14367
$8.95

LiPo Management

USB Chargers - This USB LiPoly Charger runs from either a DC jack or a micro USB connection and charges a single cell Li-Po through a common JST connector. It also has an output port so it can be used in a project without reconnecting the battery after charging. This charger lets you adjust how much current you want to charge with a basic USB charger.

SparkFun LiPo Charger/Booster - 5V/1A

SparkFun LiPo Charger/Booster - 5V/1A

PRT-14411
$15.95

Boost Converter - This takes a single cell 3.8V LiPo and boosts the voltage up to 5V to make it usable for most microcontroller and LED circuits. It can source up to 1A of current.

LiPower - Boost Converter

LiPower - Boost Converter

PRT-10255
$15.95
5

Multiple Cells

What if you need more voltage or current capability? The solution is to add cells in series for more voltage, and cells in parallel for increased current capability and capacity. With LiPos especially, it is critical the cells can charge and discharge correctly. You can put cells in parallel with each other, but they must be protected somehow. Otherwise, they can discharge into each other and cause damage. One way is to use a Schottky diode in series with each cell, which will allow current to pass out of each cell but prevent damage if one cell gets lower than the others.

Batteries in parallel.

Charging multiple cells requires cell balancing or separate chargers for each cell. The advantage of 18650s is that they can be removed and charged separately in a bay like this.

Tenergy T4s Intelligent Universal Charger - 4-Bay

Tenergy T4s Intelligent Universal Charger - 4-Bay

TOL-14457
$29.95

Useful Resources and Further Learning

  • Dave Jones of EEVBlog explains the charging process of LiPos. It lends clues as to why the charging process is more complicated than NiMH or other batteries, and discusses how you could make a charger yourself.
  • This website carries a lot of different types of batteries, including special ones that might be hard to find elsewhere.
  • DIY battery charger using the TP4056 chip.

comments | comment feed

New products: D36V28Fx Step-Down Voltage Regulators

via Pololu Blog

I am happy to announce the release of our newest regulators, the D36V28Fx family of step-down voltage regulators. These regulators support a wide input voltage range (up to 50 V!) and can deliver up to 4 A, making them well suited for use with power-hungry processors like the Raspberry Pi and projects involving servos or small motors.

Step-Down Voltage Regulator D36V28Fx, assembled on breadboard.

Step-Down Voltage Regulator D36V28Fx, bottom view with dimensions.

The family consists of six fixed output voltage versions between 3.3 V and 12 V:

And since we make these ourselves here in Las Vegas, we can also quickly make versions with custom output voltages; please contact us us for more information.

Comparison to the D24V22Fx step-down regulator family

Top view of D36V28Fx step-down voltage regulator.

Top view of D24V22Fx step-down voltage regulator.

The D36V28Fx family now becomes our recommended alternative to the slightly smaller D24V22Fx if you need a little more power or operation above 36 V:

Comparison of the maximum continuous current of Step-Down Voltage Regulators D36V28Fx and D24V22Fx.

The D24V22Fx still outperforms the D36V28Fx when it comes to dropout voltage and quiescent current:

Comparison of the dropout voltage of Step-Down Voltage Regulators D36V28Fx and D24V22Fx.

Comparison of the quiescent current of Step-Down Voltage Regulators D36V28Fx and D24V22Fx.

Introductory special

As usual, we are offering an extra introductory special discount on these new regulators, to help share in our celebration of releasing a new product. The first hundred customers to use coupon code D36V28XINTRO can get up to three units for just $7.77 each!

Friday Product Post: Balancing the Scales

via SparkFun: Commerce Blog

This week, to celebrate the final season of everyone's favorite romcom, Game of Thrones, we've added a bit of a theme! We have the new SparkFun Qwiic Scale to weigh all your coinage, a new TFT LCD Breakout to expand your options for watching your favorite (miniaturized) show, and our new Master of Coin shirts! That's not all though, because we end the week with a new, 12-inch ruler and two strips of APA104 LEDs to light up the darkest, terror-filled night!

Weigh it all in the blink of an eye!

SparkFun Qwiic Scale - NAU7802

SparkFun Qwiic Scale - NAU7802

SEN-15242
$14.95

The SparkFun Qwiic Scale is a small breakout board for the NAU7802 that allows you to easily read load cells to accurately measure the weight of an object. By connecting the board to your microcontroller, you will be able to read the changes in the resistance of a load cell and, with some calibration, get very accurate weight measurements. This can be handy for creating your own industrial scale, process control or simple presence detection. 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.


Display whatever you wish!

SparkFun TFT LCD Breakout - 1.8" (128x160)

SparkFun TFT LCD Breakout - 1.8" (128x160)

LCD-15143
$29.95

The SparkFun TFT LCD Breakout is a versatile, colorful and easy way to experiment with graphics or create a user interface for your project. With a 4-wire SPI interface and microSD card holder, you can use this breakout to easily add visual display/interface capabilities to a project, as well as provide all the storage you might need for multimedia files.


Master of Coin Women's Shirt - Large (Gray)

Master of Coin Women's Shirt - Large (Gray)

SWG-15234
$19.95
Master of Coin Shirt - Large (Gray)

Master of Coin Shirt - Large (Gray)

SWG-15239
$19.95
Master of Coin Shirt - Large (Red)

Master of Coin Shirt - Large (Red)

SWG-15280
$19.95
Master of Coin Women's Shirt - Large (Red)

Master of Coin Women's Shirt - Large (Red)

SWG-15285
$19.95

Our new limited edition tee is here, with a nod to Game of Thrones! These shirts come in red and gray in both men's and women's fitted sizes, and are designed to keep those around you guessing what game you're playing with the positive side of the classic coin cell battery that we carry in our catalog. The back also has our SparkFun emblem on the negative side of the CR2032.

Even though we only show the large sizes in this blog post, please be aware that sizes S through XXL are available as well! Click here to find each size available, but remember: these shirts are only available for a limited time so get them while you can because once they are gone, they are gone!


SparkFun PCB Ruler - 12 Inch

SparkFun PCB Ruler - 12 Inch

TOL-15295
$5.95

One ruler to rule them all! This may look like a basic 12-inch ruler, but it's made from a PCB. We have included useful information you might use on a daily basis, including wire gauge holes, transistor diagrams, common fractions, Roman numerals and metric-to-imperial conversions. Most importantly, the ruler provides you with a straight line, centimeter markings one side and inch markings on the other side.


LED RGB Strip - Addressable, Sealed, 1m (APA104)

LED RGB Strip - Addressable, Sealed, 1m (APA104)

COM-15205
$24.95
LED RGB Strip - Addressable, Bare, 1m (APA104)

LED RGB Strip - Addressable, Bare, 1m (APA104)

COM-15206
$19.95

These are sealed and bare addressable, one-meter, 5V RGB LED strips that come packed with 60 APA104s per meter. There is access to each APA104 LED and each strip length can be easily modified. You will be able to control each RGB LED individually, giving you the ability to create cool lighting effects for your car, or perhaps under-cabinet lighting in your kitchen! These LED strips are compatible with similar WS2812 and SK6812 addressable LEDs.


That's it for this week! 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!

comments | comment feed