Monthly Archives: August 2018

New products: D36V6x step-down regulators

via Pololu Blog

Pololu step-down voltage regulator D36V6Fx/D24V6Fx/D24V3Fx next to a 7805 voltage regulator in TO-220 package.

Wrapping up our new product releases for the month and for the summer is our new D36V6x family of step-down voltage regulators. These small regulator modules support a large input voltage range and are a great alternative to old three-terminal linear voltage regulators that waste a lot of power and get really hot. These new regulators can take an input voltage anywhere from a few tenths of a volt over the set output voltage up through an absolute max of 50 V, and they can deliver up to 600 mA. We have them available in seven fixed voltage options and two adjustable versions:

Pololu step-down voltage regulator D36V6Ax/D24V6Ax/D24V3Ax, bottom view with dimensions.

You might notice that the board for the adjustable version shows a 2010 copyright year (the fixed version is an even smaller board, and we did not fit the year on there). That’s because these new regulators are actually old designs updated with new regulator chips that use the same package and pinout. The older products were our D24V3x and D24V6x families of regulators, which were based on the Texas Instruments LMR14203 and LMR14206 ICs. For the new D36V6x family, we are moving up to the newer LMR16006 regulator. This chip has several exciting new features that we think will make it our favorite general-purpose regulator for many of our products: higher maximum voltage, better low-dropout performance, and better quiescent current.

Higher maximum voltage

The LMR16006 has a 60 V maximum input voltage, up from the 42 V of the LMR1420x parts. Even 42 V covered most of our typical applications, but it’s not quite enough for 36V nominal applications, which are getting more common. Our more advanced, integrated products such as motor controllers are often limited by some complex part or circuit, such as a motor driver, and we would like the overall operating range of the product not to be reduced by the regulator. Many stepper motor drivers, such as TI’s DRV8825 or the Toshiba TB67S249FTG and TB67S279FTG that we released carriers for in June, support maximum input voltages of 45 or 50 volts. It’s nice not to be limited by your regulator when you are making systems with those kinds of parts.

For our new D36V6x modules, we are limited to the 50 V maximum of the capacitors from Vin to ground. Unfortunately, capacitor options get a lot more restricted (and expensive) once we go beyond 50 V, so we decided to stick with our old boards so that we could continue to offer these regulator modules at a low price while still providing some substantial improvements. We might still make a new board with higher-voltage capacitors for those who would like to make full use of the regulator’s 60 V maximum. (For anyone thinking of just removing the caps and putting on your own external ones, you might also want to change the diode, which is also a 60 V part.)

Better low-dropout performance

Having a higher maximum input voltage is nice, but often we’re trying to squeeze the most we can out of a dying battery, so it’s nice to have a low dropout, which is the voltage the regulator needs between the input and output. The older LMR1420x parts had an annoying quality of the dropout voltage going up as the load current went down. The newer LMR16006 has a nice, low dropout as the current goes down, so if you don’t need much current, you can get 5 V out with just 5.2 or 5.3 volts in. Here is a comparison of the dropout performance of the old and new regulators:

Typical dropout voltage of Pololu step-down voltage regulator D24VxF5.

Typical dropout voltages of Step-Down Voltage Regulator D36V6Fx.

Lower quiescent current

The new regulators also have much lower quiescent current, which is the current the regulator uses when it’s just sitting there and your load isn’t drawing anything. On the old regulators, the quiescent current was under 2 mA, and we did not characterize it beyond that. For these new regulators, it’s typically under 200 microamps, ten to twenty times better than the old regulators. I realize it’s not that amazing for modern regulators, but it’s nice to know that your low-cost, general-purpose regulator module isn’t wasting a lot of power.

Typical quiescent currents of Step-Down Voltage Regulator D36V6Fx.

Even when we put a new chip onto an old circuit board as I have described, we still test and characterize with different parts to get a good overall result. In the case of these regulators, where the circuit is quite simple, this phase of development is much more time consuming than laying out a circuit board. We build and test dozens of prototypes with different inductances, and even though you can’t see it in the pictures, we build the different voltage versions of the regulators with different inductors to get the best performance we can (within a given inductor type and size).

So how about getting a few to have around for general-purpose use on your next project? You can get one for just $3 as part of our introductory promotion using coupon code D36V6XINTRO , limited to the first 100 customers and to three per item (so you could get up to 27 regulators at that price if you get three of each voltage version). It’s always difficult for us to predict which versions will be how popular, so initial stock is limited, but we make these here in Las Vegas, so even if the version you want goes out of stock, you can backorder it with the promotional price, and we should be able to ship within a day or two.

New products: 1- and 31-channel QTR HD reflectance sensor arrays

via Pololu Blog

This week, we released what we expect to be the extremes of our new line of QTR HD reflectance sensor arrays, with two sizes of a single-sensor board on the small end and a massive 31-sensor array for the maximum size. This picture shows the relative sizes of the boards, along with some of the intermediate sizes we have available:

The QTR Reflectance Sensor Arrays are available in many different sizes.

We made the two single-sensor sizes because we could make good arguments for each one. Part of the point of doing a single-sensor board is to make it really small, so you can fit it into tight spaces. But “really small” means different things depending on the dimensions you care about. So we have one version that is only 5 mm (0.2") wide, with components on both sides of the PCB, and one version that is 7.5 mm (0.3") wide, with components on just one side. The 7.5 mm wide version is a little thinner and flatter because it doesn’t have parts on one side, can be used with a 3×1, single row connector, and costs slightly less because of the single-sided assembly.

QTRX-HD-01RC Reflectance Sensor, front and back views.

QTRX-MD-01A Reflectance Sensor, front and back views.

As I mentioned in some of my earlier posts (here and here) about this new line of sensor arrays, we are using two sensor types: more economical units we are calling “QTR”, and higher-performance units with lenses that we are calling “QTRX”. The main appeal of the QTRX sensors is that they can give the same readings at much lower IR emitter currents, which can really make a big difference for big sensor arrays. But if you crank up the current in those QTRX sensors, you can also get more distance. We did not do that on the QTRX arrays because the sensor modules leak light out the sides and interfere with each other when they are closely spaced, but with these single-channel boards, we are also making available the QTRX sensors with the higher 30 mA maximum emitter current, which allows for a range of up to about 8 cm (about 3 inches). We are calling these sensors QTRXL.

This video (taken with an old camera that does not have as much IR filtering as most newer cameras) shows the IR light leakage around the side of the QTRX sensor module:

I should point out that all of these new QTR modules offer variable brightness control by varying the current through the emitter using the control pin. However, if you want to take advantage of the maximum brightness and range, and have several sensors close to each other, you will need some barriers between them to prevent them from blinding each other (or just turn on one emitter at a time).

The 31-sensor arrays are huge! Well, at least compared to the tiny single-sensor boards.

QTRX-HD-31RC Reflectance Sensor Array.

The routing on those boards is quite complex because adjacent IR emitters are not just wired in series (because we want to have separate even/odd emitter control, plus the alternate density population options I discussed in this post), so we ended up having to go to a 4-layer PCB to route it. This did let us make the vertical dimension a little lower, so the board is just 16.5 mm tall, compared to the 20 mm board height for the versions with 15 and fewer sensors. The 31-channel board is also 0.062" (1.6 mm) thick, compared to the thinner 0.040" (1 mm) boards we use for the lower channel counts. You can compare all the dimensions of the various boards in the detailed dimension diagram (1MB pdf).

The sixteen new boards we released this week brings the total available in this new QTR HD product line to 40. You can see the options neatly summarized in the tables below to pick the best array for your application.

QTR sensors
2.9 V to 5.5 V; 30 mA max LED current(1); 5 mm optimal range
Board
width
Configuration Max board
current(2)
Max range Output
type
Name 1-piece
price
5.0 mm 1 sensor (HD)
32 mA 30 mm analog QTR-HD-01A $1.79
RC (digital) QTR-HD-01RC
7.5 mm 1 sensor (MD)
32 mA 30 mm analog QTR-MD-01A $1.61
RC (digital) QTR-MD-01RC
10.2 mm 4 mm × 2
32 mA 30 mm analog QTR-HD-02A $2.12
RC (digital) QTR-HD-02RC
17.0 mm 4 mm × 4
62 mA 40 mm analog QTR-HD-04A $3.26
RC (digital) QTR-HD-04RC
29.0 mm 8 mm × 4
62 mA 40 mm analog QTR-MD-04A $3.44
RC (digital) QTR-MD-04RC
4 mm × 7
125 mA 40 mm analog QTR-HD-07A $5.40
RC (digital) QTR-HD-07RC
61.0 mm 8 mm × 8
125 mA 40 mm analog QTR-MD-08A $6.39
RC (digital) QTR-MD-08RC
4 mm × 15
250 mA 50 mm analog QTR-HD-15A $10.82
RC (digital) QTR-HD-15RC
125.0 mm 4 mm × 31
495 mA 50 mm analog QTR-HD-31A $21.66
RC (digital) QTR-HD-31RC
QTRX sensors
2.9 V to 5.5 V; 3.5 mA max LED current(1); 10 mm optimal range
Board
width
Configuration Max board
current(2)
Max range Output
type
Name 1-piece
price
5.0 mm 1 sensor (HD)
5 mA 30 mm analog QTRX-HD-01A $2.17
RC (digital) QTRX-HD-01RC
7.5 mm 1 sensor (MD)
5 mA 30 mm analog QTRX-MD-01A $1.99
RC (digital) QTRX-MD-01RC
10.2 mm 4 mm × 2
5 mA 30 mm analog QTRX-HD-02A $2.88
RC (digital) QTRX-HD-02RC
17.0 mm 4 mm × 4
9 mA 40 mm analog QTRX-HD-04A $4.78
RC (digital) QTRX-HD-04RC
29.0 mm 8 mm × 4
9 mA 40 mm analog QTRX-MD-04A $4.96
RC (digital) QTRX-MD-04RC
4 mm × 7
17 mA 40 mm analog QTRX-HD-07A $8.06
RC (digital) QTRX-HD-07RC
61.0 mm 8 mm × 8
17 mA 40 mm analog QTRX-MD-08A $9.43
RC (digital) QTRX-MD-08RC
4 mm × 15
34 mA 50 mm analog QTRX-HD-15A $16.52
RC (digital) QTRX-HD-15RC
125.0 mm 4 mm × 31
68 mA 50 mm analog QTRX-HD-31A $33.44
RC (digital) QTRX-HD-31RC
QTRXL sensors
2.9 V to 5.5 V; 30 mA max LED current(1); 20 mm optimal range
Board
width
Configuration Max board
current(2)
Max range Output
type
Name 1-piece
price
5.0 mm 1 sensor (HD)
32 mA 80 mm analog QTRXL-HD-01A $2.17
RC (digital) QTRXL-HD-01RC
7.5 mm 1 sensor (MD)
32 mA 80 mm analog QTRXL-MD-01A $1.99
RC (digital) QTRXL-MD-01RC
1 Can be dynamically reduced to any of 32 available dimming levels.
2 With all LEDs on at max brightness setting.

Our introductory promotions are still going strong! Be one of the first 100 customers to use coupon code QTRINTRO and get any of these new sensors at half price! (Limit 3 per item per customer.)

Free PCB coupon via Facebook to 2 random commenters

via Dangerous Prototypes

BP

Every Friday we give away some extra PCBs via Facebook. This post was announced on Facebook, and on Monday we’ll send coupon codes to two random commenters. The coupon code usually go to Facebook ‘Other’ Messages Folder . More PCBs via Twitter on Tuesday and the blog every Sunday. Don’t forget there’s free PCBs three times every week:

Some stuff:

  • Yes, we’ll mail it anywhere in the world!
  • We’ll contact you via Facebook with a coupon code for the PCB drawer.
  • Limit one PCB per address per month, please.
  • Like everything else on this site, PCBs are offered without warranty.

We try to stagger free PCB posts so every time zone has a chance to participate, but the best way to see it first is to subscribe to the RSS feed, follow us on Twitter, or like us on Facebook.

Big Timer

via Dangerous Prototypes

BigTimers

Dr. Scott M. Baker has a nice write-up about a powerful timing node for Node-Red, the Big timer:

Big Timer is (probably) the best-ever timing node for Node-Red, providing a general purpose timer as well as  handling summer/winter correctly as well as (importantly) lighting up time (for which you should provide longitude and latitude). After all you probably don’t turn the outside lights on at 6pm!! You turn them on when it gets DARK.

Project info on Scargill’s Tech blog.

Friday Product Post: Ardubots, Roll Out!

via SparkFun: Commerce Blog

This week we have the new Pixhawk 4 Flight Controller Kit, the Arduino Engineering Kit to help experiment with MATLAB, a kit to help repair your Shapeoko and three different types of wire strippers. We have a ton of diverse products this week that should help you in a multitude of ways!

As a reminder, our Liquidation Sale is currently in full force! We’ve slashed the prices on these items to their lowest ever. Take a look and see if you can find a bit of treasure; the sale runs until the end of today, August 31st! If you miss it after today, you’ll have to wait until next year!

Don’t make this hawkward…

Pixhawk 4 Flight Controller

Pixhawk 4 Flight Controller

ROB-14841
$210.95

The Pixhawk 4 is an advanced development kit for the PX4 autopilot, and is the latest update to the family of Pixhawk flight controllers. The flight controller has been designed and developed in collaboration with Holybro and Auterion, and optimized to run PX4. It comes preinstalled with the latest PX4 firmware and features advanced processor technology from STMicroelectronics, sensor technology from Bosch, InvenSense and a NuttX real-time operating system, delivering incredible performance, flexibility and reliability for controlling any autonomous vehicle.


Arduino Engineering Kit

Arduino Engineering Kit

KIT-14831
$299.00

Engineering just got cooler with the Arduino Engineering Kit! Bring the power of the Arduino MKR1000 to the classroom with MATLAB and Simulink. The Arduino Engineering Kit is the ideal solution for university students, providing a state-of-the-art, hands-on incorporation of Arduino technology in an educational setting. The kit is primarily for three types of users: students learning about engineering, professors teaching engineering and makers with an interest or background in engineering.


Shapeoko Maintenance Kit

Shapeoko Maintenance Kit

TOL-14899
$99.00

Keep your Shapeoko up and running with this maintenance kit. Broke a v-wheel? Need a new belt? Eccentrics worn out? Regardless of what you need it for, the Shapeoko Maintenance Kit will get you back up and running in no time! This kit includes everything you might need to repair your Shapeoko v3, Shapeoko XL or Shapeoko XXL.


Self-Adjusting Wire Strippers

Self-Adjusting Wire Strippers

TOL-14872
$16.95

Let’s face it, wire strippers can be problematic to use if you aren’t sure what you’re doing, and could result in you accidentally wasting material. Lucky for you, there is this Self-Adjusting Wire Stripper that can take any almost any wire, place it in the head of the tool and compress the handles, and you will have a perfectly stripped wire every time. This Self-Adjusting Wire Stripper also doubles as a wire cutter, and triples as an insulated and non-insulated crimper as well!


Wire Strippers

Wire Strippers

TOL-14762
$12.95
Wire Strippers - 20-30AWG

Wire Strippers - 20-30AWG

TOL-14763
$14.95

Of course if you are looking for a wire stripper in a more common configuration, we also have these 22-30AWG and 20-30AWG versions instead. These are your run-of-the-mill wire strippers that most people prefer on their work bench or in their tool box.


Alright everyone, 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!

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

comments | comment feed

Learn to write games for the BBC Micro with Eben

via Raspberry Pi

Long-time fans of the Raspberry Pi will know that we were inspired to make a programmable computer for kids by our own experiences with a machine called the BBC Micro, which many of us learned with in the 1980s.

This post is the first of what’s going to be an irregular series where I’ll walk you through building the sort of game we used to play when we were kids. You’ll need a copy of BeebEm (scroll down for a Linux port if you’re using a Pi – but this tutorial can be carried out on a PC or Mac as well as on an original BBC Micro if you have access to one).

I’m going to be presenting the next game in this series, tentatively titled Eben Goes Skiing, at the Centre for Computing History in Cambridge at 2pm this afternoon – head on down if you’d like to learn how to make scrolling ascii moguls.

Helicopter tutorial

We’re going to build a simple helicopter game in BBC BASIC. This will demonstrate a number of neat features, including user-defined characters, non-blocking keyboard input using INKEY, and positioning text and graphics using PRINT TAB.

Let’s start with user-defined characters. These provide us with an easy way to create a monochrome 8×8-pixel image by typing in 8 small numbers. As an example, let’s look at our helicopter sprite:

Each column pixel position in a row is “worth” a different power of 2, from 1 for the rightmost pixel up to 128 for the leftmost. To generate our 8 numbers, we process one row at a time, adding up the value for each occupied pixel position. We can now create custom character number 226 using the VDU 23 command. To display the character, we change to a graphics mode using the MODE command and display it using the PRINT command.

Type the following:

10MODE 2

70VDU 23,226,0,248,32,116,126,116,112,0

RUN

PRINT CHR$(226)

You should see the little helicopter on the screen just above your prompt. Let’s define some more characters for our game, with character numbers 224 through 229. These represent leftward and rightward flying birds, a rightward flying helicopter, the surface of the sea, and a landing pad.

Type the following:

50VDU 23,224,0,14,12,104,16,28,8,0

60VDU 23,225,0,112,48,22,8,56,16,0

80VDU 23,227,0,31,4,46,126,46,14,0

90VDU 23,228,0,102,255,255,255,255,255,255

100VDU 23,229,255,255,0,0,0,0,0,0

Trying running your program and using print to view the new characters!

Now we’re ready to use our sea and platform characters to build the game world. Mode 2 on the BBC Micro has 20 character positions across, and 32 down. We’ll draw 20 copies of the sea character in row 30 (remember, rows and columns are numbered from zero) using a FOR loop and the PRINT TAB command, and pick a random position for the platform using the RND() function.

Type the following:

110FOR I%=0 TO 19

120PRINT TAB(I%,30) CHR$(228);

130NEXT

140P%=RND(20)-1

150PRINT TAB(P%,30) CHR$(229);

RUN

You should see something like this:

Don’t worry about that cursor and prompt: they won’t show up in the finished game.

It’s time to add the helicopter. We’ll create variables X% and Y% to hold the position of the helicopter, and Z% to tell us if it last moved left or right. We’ll initialise X% to a random position, Y% to the top of the screen, and Z% to zero, meaning “left”. We can use PRINT TAB again to draw the helicopter (either character 226 or 227 depending on Z%) at its current position. The whole thing is wrapped up in a REPEAT loop, which keeps executing until the helicopter reaches the ground (in row 29).

Type the following:

160X%=RND(20)-1:Y%=0:Z%=0

180REPEAT

260PRINT TAB(X%,Y%) CHR$(226+Z%);

290UNTIL Y%=29

RUN

You’ll see the helicopter sitting at the top of the screen.

We’re almost there: let’s give our helicopter the ability to move left, right and down. On each trip round the loop, we move down one row, and use the INKEY() function to read the Z and X keys on the keyboard. If Z is pressed, and we’re not already at the left of the
screen, we move one column left. If X is pressed, and we’re not already at the right of the screen, we move one column right.

Type the following:

210IF INKEY(-98) AND X%>0 THEN X%=X%-1:Z%=0

220IF INKEY(-67) AND X%<19 THEN X%=X%+1:Z%=1

230Y%=Y%+1

RUN

You should see something like this:

The game is much, much too fast to control, and the helicopter leaves trails: not surprising, as we didn’t do anything to erase the previous frame. Let’s use PRINT TAB to place a “space” character over the previous position of the helicopter, and add an empty FOR loop to slow things down a bit.

Type the following:

190PRINT TAB (%,Y%)"";

280FOR I%=1 TO 200:NEXT

RUN

Much better! This is starting to feel like a real game. Let’s finish it off by:

  • Adding a bird that flies back and forth
  • Detecting whether you hit the pad or not
  • Getting rid of the annoying cursor using a “magic” VDU 23 command
  • Putting an outer loop in to let you play again

Type the following:

20REPEAT

30CLS

40VDU 23,1,0;0;0;0;

170A%=RND(18):B%=10:C%=RND(2)-1

200PRINT TAB(A%,B%) "";

240A%=A%+2*C%-1

250IF A%=0 OR A%=19 THEN C%=1-C%

270PRINT TAB(A%,B%) CHR$(224+C%);

300IF X%=P% PRINT TAB(6,15) "YOU WIN" ELSE PRINT TAB(6,15) "YOU
LOSE"

310PRINT TAB(4,16) "PRESS SPACE"

320REPEAT UNTIL INKEY(-99)

330UNTIL FALSE

RUN

And here it is in all its glory.

You might want to try adding some features to the game: collision with the bird, things to collect, vertical scrolling. The sky’s the limit!

I created a full version of the game, using graphics from our very own Sam Alder, for the Hackaday 1K challenge; you can find it here.

Appendix

Here’s the full source for the game in one block. If you get errors when you run your code, type:

MODE 0
LIST

And compare the output very carefully with what you see here.

10MODE 2
20REPEAT
30CLS
40VDU 23,1,0;0;0;0;
50VDU 23,224,0,14,12,104,16,28,8,0   
60VDU 23,225,0,112,48,22,8,56,16,0
70VDU 23,226,0,248,32,116,126,116,112,0
80VDU 23,227,0,31,4,46,126,46,14,0
90VDU 23,228,0,102,255,255,255,255,255,255
100VDU 23,229,255,255,0,0,0,0,0,0
110FOR I%=0 TO 19
120PRINT TAB(I%,30) CHR$(228);
130NEXT
140P%=RND(20)-1
150PRINT TAB(P%,30) CHR$(229);
160X%=RND(20)-1:Y%=0:Z%=0
170A%=RND(18):B%=10:C%=RND(2)-1
180REPEAT
190PRINT TAB(X%,Y%) " ";
200PRINT TAB(A%,B%) " ";  
210IF INKEY(-98) AND X%>0 THEN X%=X%-1:Z%=0  
220IF INKEY(-67) AND X%<19 THEN X%=X%+1:Z%=1
230Y%=Y%+1
240A%=A%+2*C%-1
250IF A%=0 OR A%=19 THEN C%=1-C%
260PRINT TAB(X%,Y%) CHR$(226+Z%);
270PRINT TAB(A%,B%) CHR$(224+C%);
280FOR I%=1 TO 200:NEXT
290UNTIL Y%=29
300IF X%=P% PRINT TAB(6,15) "YOU WIN" ELSE PRINT TAB(6,15) "YOU LOSE"
310PRINT TAB(4,16) "PRESS SPACE"
320REPEAT UNTIL INKEY(-99)
330UNTIL FALSE


The post Learn to write games for the BBC Micro with Eben appeared first on Raspberry Pi.