You are currently browsing articles tagged geek.

It’s not easy to find concrete examples of shipping costs for McMaster-Carr online, and they don’t tell you what an order is going to cost to ship until after it’s already shipped — and that can be a little scary especially if you’re ordering odd sized parts, even if they only charge their shipping cost. So here’s a real example of shipping costs for a small order with some long parts to NC, USA. The order was placed online and shipped the same day from their Atlanta, GA, USA location. It was ordered on December 29, and received in North Carolina on January 3.

For a reprap build, I ordered these items, which include three 3-foot steel rods, 200 nuts, 292 washers, and 200 machine screws. Shipping was only $6.52 for everything. That’s not bad at all…

Description Ordered Unit Price Total
95462A030 Zinc-Plated Grade 5 Steel Hex Nut, 5/16″-18 Thread Size, 1/2″ Width, 17/64″ Height, Packs of 100 1


Per Pack
90126A509 Zinc-Plated Steel Type A SAE Flat Washer, No. 6 Screw Size, 3/8″ OD, .03″-.07″ Thick, Packs of 100 1


Per Pack
90272A153 Zinc-Plated Steel Pan Head Phillips Machine Screw, 6-32 Thread, 1″ Length, Packs of 100 1


Per Pack
90631A007 Zinc-Plated Grade 2 Steel Nylon-Insert Hex Locknut, 6-32 Thread Size, 5/16″ Width, 11/64″ Height, Packs of 100 1


Per Pack
92005A120 Metric Pan Head Phillips Machine Screw, Zinc-Plated Steel, M3 Size, 10MM Length, .5MM Pitch, Packs of 100 1


Per Pack
8890K41 W1 Tool Steel Rod, .3125″ Diameter, Trade Size 5/16″, 3′ Length 3


90126A030 Zinc-Plated Steel Type A SAE Flat Washer, 5/16″ Screw Size, 11/16″ OD, .05″-.08″ Thick, Packs of 192 1


Per Pack
Merchandise 30.99
Shipping 6.52
Total $37.51

Well, I discovered that Popsicle is a brand name, so I’m officially renaming this little guy “StickBot” so the Popsicle police don’t come after me. To be clear, this little bot has nothing to do with Popsicle brand ice pops, and never did. My appologies Popsicle; I hope you still let me eat your ice pops because life just would not be the same without them.

Now that I’ve come clean, here’s a video that show how to assemble StickBot’s right eye. It’s an analog 555 timer-based 1Hz oscillator that controls the right/left PWM servo signals generated by the left eye.

This is the latest version, powered directly by four 1.5V LR61 batteries (similar to AAAA batteries, and often found inside 9V batteries). As a result, it does away with the voltage regulator.

Details for the previous version can be found here: StickBot V2.0 - Untethered!. The original tethered version can be found here: StickBot: A Simple 6-Legged Walker. I’ll try to get updated schematics and more assembly videos up soon.

I’ve had a few people ask me if I have a kit for this little critter. I’m working on one geared toward kids — it’s a fun project to do with kids, and it seems like they really learn a lot from it.

The parts for this eye include:

  • 555 Timer IC
  • 1k ohm resistor
  • 330k ohm resistor
  • 2.2uF capacitor
  • About 9 inches of Cat 5 network cable, phone cord, or other similar wire
  • Some electrical tape, solder, and soldering iron

Here’s a video of my very hackable 12-channel logic level shifter/translator with a voltage regulator. This video demonstrates how it works. There’s more detail here at the DIY 12-Channel Bidirectional Logic Level Shifter post.

In this example, it’s translating from 7.5V to 3.3V. In another example at the link above, I’ve demonstrated the hackability by wiring it up to drive a 3.3V Nokia 5110 LCD, using five of the 12 channels as logic level translators. Channel two is wired directly to 3.3V for power, channel three is wired directly to ground, and the transistor on channel nine is turned so that the 5V signal controls the gate, which allows PWM control of the LED with full power from the regulator.

Music: “Art Now” by AlexBeroza (CC BY 3.0)

40-pin female headers are inexpensive and easy to trim down to size, and with a dot of CA glue (super glue), you can even easily make other configurations, like 2×4. Sometimes they’re even described as “break-away” headers, although admittedly they don’t break away as easily as the male pin headers. Just keep in mind that if you don’t score it, it could shatter.

Someone was looking at one of my PCBs and commented that it’s “impossible to break them apart without destroying at least 2-3 pins each time.” Using this technique, I’ve never “destroyed” any more than one, and with a little care, the edges turn out quite nicely.

Music: “The New Music” by AlexBeroza (CC BY 3.0)

He we’re test-driving the our latest robot creation for the first time. It’s the boy’s design and made mostly of wood. The tires are o-rings, and there’s a 12V AA batter pack sandwiched between the two pieces of plywood. The system right now consists of a drive controller using a Modern Device‘s RBBB (small Arduino-compatible) and the Pololu TB6612FNG Dual Motor Driver Carrier, a robot controller, which is a standard Arduino Uno (which doesn’t do a whole lot right now expect forward messages from the remote), and a remote controller, which is another RBBB, joystick and display.

Right now there are two driving modes. The first is a tank drive, where, for example, if the joystick is moved far left, the right wheel moves forward at full speed and the left week backward at full speed. The second mode is what I call “target drive,” in which you set the target speed and direction of each wheel. Soft starting and stopping is built in to the controller, and the jerkiness you see sometimes is a bug in the keep-alive timer — if the robot stops getting messages in target drive mode, then it will stop.

Music is “Don’t you” by stefsax (CC BY 2.5).

Here’s a 12-channel bidirectional logic level shifter with a 3.3V power regulator that I designed so I could easily interface 5V circuits with cool 3.3V widgets like the ADXL345 accelerometer, the NRF24L01+ wireless transceiver, and the Nokia 5110 84×48 LCD. For the one in the picture, I used round machine pin headers because I use it with hookup wire and those female headers are very easy to separate from 40-pin lengths.

12-channel Bidirectional Logic Level Shifter

DIY 12-channel Bidirectional Logic Level Shifter / Logic Level Translator, using AMS1117 and 2N7000 MOSFET pass transistor interfaces

Up to twelve 5-15V logic signals can go into one side and come out as 3.3V signals on the other side, or the other way around (3.3V signals go in and can be read as 5-15V signals) in any combination. The regulator portion converts 5 to 15V DC into a steady 3.3V for up to 1 amp.

In this video, I show how it works translating from 7.5V to 3.3V. The video is from the A Hackable 12-Channel Bidirectional Logic Level Shifter/Translator post.

Why did I not just use a 74HC4050 or some other logic level translator? Because this is much cooler! It’s bidirectional, it has twelve independent channels, in includes a 3.3V regulator, it’s inexpensive, it’s good soldering practice, and it’s hackable. In the photo below, I’ve wired it up to specifically drive a 3.3V Nokia 5110 LCD. It uses only five of the 12 channels as logic level translators, channel two is wired directly to 3.3V for power, and channel 3 is wired directly to ground. The transistor on channel nine is turned so that the 5V signal controls the gate, which allows PWM control of the LED with full power from the regulator. I’ve also used a different resistor. (More photos below.) And why no resistor arrays? Because resistors are usually inexpensive and on hand, and resistor arrays would limit hackability.

Logic Level Shifter Hacked for Nokia 5110 LCD

Logic Level Shifter Hacked for Nokia 5110 LCD

It’s essentially a AMS1117 3.3V regulator with capacitor at the top, and then an array of MOSFET pass transistor interfaces with n-channel 2N7000 MOSFETs. Each side is held high by a resistor 5.6k ohm resistor. If the 5V side is pulled low, the voltage from ground to source will be 2.7V because the diode becomes forward biased, and this turns on the transistor, pulling the 3.3V side low. If the 3.3V side is pulled low, the transistor also turns on with 3.3V, pulling the 5.5V side low.

It was designed using KiCAD (free), and PCBs were ordered through SeeedStudio’s Fusion PCB service. All the components are easily available online, at Digikey or on eBay. Here are the parts I used. The costs reflect per items costs for small bulk purchases (usually around 10-50 pieces) on eBay.

  • 1 AMS1117 3.3V 1A Voltage Regulator – 28¢ (datasheet)
  • 1 22uF electrolytic capacitor – 9¢
  • 12 2N7000 n-channel MOSFET – 60¢ for 12 (datasheet)
  • 24 5.6K ohm resistors – 43¢ for 24
  • 2 12-pin female headers (I used round ones for the one in the picture, but you should use the standard square ones if you’re not just using jumper wires.) – 29¢ for one 40-pin header, then cut into smaller pieces.
  • 2 2-pin female headers
  • 1 custom PCB – $1.12

The total unit cost was $2.81, plus time and solder. I’ve decided to sell off the extras either as PCBs or as kits, so let me know if you’re interested by commenting below.

Here’s the schematic and a screenshot of the PCB design, as well as a larger version of the image above:

I used the excellent Quick KICAD Library Component Builder recently to build a new component for eeschema in KiCAD, but when I imported the library, I got an error dialog that said, “Library component load error error in DRAW command X> occurred at line 38 .” [sic] Line 38 was line after the pin definitions — the “ENDDRAW” line.

KiCAD Eeschema Component Load Error message

KiCAD Eeschema Component Load Error message

It turns out the exception was caused by a space in a pin name: I had typed “SER IN” as the name of the pin, where I should have used an underscore and typed “SER_IN”. The library utility doesn’t prohibit this, and KiCAD clearly doesn’t like it.

Before I placed my order, I had questions about Seeed Studio Fusion PCB service turn-around time for shipping to the USA, and so I figure others might as well.

Here are details of my order of the ten 5cm square PCB’s shown in DMD: Dual Motor Doohickey (Modular RBBB and TB6612FNG Driver Board). The total cost was $13.42, including shipping (subtotal $9.90, plus $3.52 Registered Air Parcel). There were no “extras” (like 100% e-test, special colors or shipping methods, etc.).

  • 8/02/2011
    • 7:52 AM – Order placed. The total charge appeared on my PayPal account six minutes later, and the order confirmation with order number arrived at the same time.
    • 8:47 AM – I added the order number to the silkscreen layer of the PCB as requested and sent the gerber files to the email address specified about an hour after the order was placed. The design and gerbers were created with Fritzing.
    • 6:26 PM – Received an order update email: The order has been changed to status “Processing.”
  • 8/03/2011, 4:37 AM – Received an order update email: The order has been changed to status “In production.”
  • 8/04/2011, 1:49 AM – Received a person email from Dwin, I assume because when I ordered I had asked them to let me know if there were any problems: “Your PCB is under processing. If the file and design meets requirements, they will be processed and shipped in 4-6 working days.”
  • 8/08/2011
    • 4:33 AM – Received an order update email: The order has been changed to status “Traceable.”
    • 4:56 AM – Received an order update email: The order has been changed to status “Shipped.” (Yay!)
    • 9:21 PM – Received an order update email with a link for tracking the order.
  • 8/09/2011, 4:44 PM – Tracking status: “Acceptance” at Hong Kong; Tracking status: “Origin Post is Preparing Shipment.”
  • 8/11/2011, 10:53 AM – Tracking status: “Processed Through Sort Facility” at Hong Kong. “The item left Hong Kong for its destination.” (United States of America)
  • 8/23/2011
    • 7:29 AM – Tracking status: “Arrival at Unit” at my local post office.
    • 4:01 PMDelivered. I actually received 12 (instead of 10), and they all look great. They were very well packaged in a small corrugated cardboard box with lots of bubble wrap.

That’s 21 days or three calendar weeks start to finish — not bad at all! Tonight, I solder!

Math Monday came early this week, and we had some fun exploring Reuleaux triangles. Next to a circle, they’re the simplest curve of constant width you can make — that basically means you can roll a plank on top of them as smoothly as on wheels. The kids didn’t expect that one! (They also would make great manhole covers!)

Although they roll very smoothly, they do tend to wobble around a bit, so I built a little gutter on the plank to make it easier for the kids to experiment with. It was a quick project, and lots of fun for the kids. You don’t have to use a band saw or even the sander; all you really need is a jigsaw or coping saw, some scrap wood, and some nails.

Music credits: “260809 Funky Nurykabe” by spinningmerkaba (CC-BY 3.0)

Here’s an Arduino-compatible GI-SP0256-AL2 speech synthesizer module that I’m finishing up. It’s a great 1980’s-era allophone speech synthesizer chip that was used in Intellivision expansion modules and sold at RadioShack stores for years for about $12. You can still find them from time to time on ebay, and they produce a fantastic synthesized speech sound. The chip is sometimes called the “SPO256-AL2” (with the letter “O” as opposed to the numeral “0”) due to a typo in the original documentation from RadioShack.

First, here’s a video of the speech synthesizer in action:

The chip works by sending it a series of allophones (59 to choose from) that make up all the sounds of the English language. It’s a real rats nest when wired up on a breadboard, so I thought I’d throw it together on a little 5cm circuit board. (Let me know by commenting below if you’re interested in one.)

The board leaves open (and accessible) four analog pins and four digital pins (two with PWM), plus two additional analog pins in you use the serial clock and data lines that are set up for I2C communication by default. The eight non-I2C pins are paired with ground pins, and three are set up by default to configure the device address for I2C communication. It requires regulated 5V via a standard 6-pin FTDI connection (you don’t need to use all pins unless you’re programming it), and there’s an output jumper at the bottom that can be amplified to power a speaker.

Here’s the design. It’s about 2 inches square. I’ll post the code when I get it finished up. Let me know if you’re interested!

Arduino-compatible SP0256-AL2 Speech Synthesizer

Arduino-compatible SP0256-AL2 Speech Synthesizer

Some Code

Here’s some of the code I used for my test. I’ve updated the code on Februay 18, 2012 to include the required loop() method (which I’d accidentally left out) and to rename the “SS” constant so it doesn’t conflict with the Slave Select constant in case that’s defined.

// Voice Pins -- The SP0256 address pins are all on the same port here.
// This isn't necessary but it does make it a lot easier to pick an
// allophone in code using PORTC in this case.
#define PIN_A1  A0
#define PIN_A2  A1
#define PIN_A3  A2
#define PIN_A4  A3
#define PIN_A5  A4
#define PIN_A6  A5
#define PIN_ALD  2
#define PIN_LRQ  12

// some words to say
byte purple[] = {PP, ER1, PP, LL };
byte monkey[] = {MM, AX, NN1, KK1, IY };
byte garden[] = {GG1, AR, PA3, DD2, IH, NN1 };
byte moment[] = {MM, OW, MM, EH, NN1, TT2 };

void setup() {
  // Set pin modes
  pinMode( PIN_ALD, OUTPUT );
  pinMode( PIN_LRQ, INPUT );
  DDRC = B00111111;  // Sets Analog pins 0-5 to output

  digitalWrite(PIN_ALD, HIGH);

  speak( purple, (byte)(sizeof(purple) / sizeof(byte)) );
  speak( monkey, (byte)(sizeof(monkey) / sizeof(byte)) );
  speak( garden, (byte)(sizeof(garden) / sizeof(byte)) );
  speak( moment, (byte)(sizeof(moment) / sizeof(byte)) );

void loop() {

void speak( byte* allophones, byte count ) {
  for( byte b = 0; b < count; b++ ) {
    speak( allophones[b] );
  speak( PA4 ); // short pause after each word

void speak( byte allophone ) {
   while ( digitalRead(PIN_LRQ) == HIGH )
    ; // Wait for LRQ to go low

  PORTC = allophone; // select the allophone

  // Tell it to speak by toggling ALD
  digitalWrite(PIN_ALD, LOW);
  digitalWrite(PIN_ALD, HIGH);


Here are the allophone definitions:

#define PA1 0x00
#define PA2 0x01
#define PA3 0x02
#define PA4 0x03
#define PA5 0x04

#define OY  0x05
#define AY  0x06
#define EH  0x07
#define KK3 0x08
#define PP  0x09
#define JH  0x0A
#define NN1 0x0B
#define IH  0x0C
#define TT2 0x0D
#define RR1 0x0E
#define AX  0x0F
#define MM  0x10
#define TT1 0x11
#define DH1 0x12
#define IY  0x13
#define EY  0x14
#define DD1 0x15
#define UW1 0x16
#define AO  0x17
#define AA  0x18
#define YY2 0x19
#define AE  0x1A
#define HH1 0x1B
#define BB1 0x1C
#define TH  0x1D
#define UH  0x1E
#define UW2 0x1F
#define AW  0x20
#define DD2 0x21
#define GG3 0x22
#define VV  0x23
#define GG1 0x24
#define SH  0x25
#define ZH  0x26
#define RR2 0x27
#define FF  0x28
#define KK2 0x29
#define KK1 0x2A
#define ZZ  0x2B
#define NG  0x2C
#define LL  0x2D
#define WW  0x2E
#define XR  0x2F
#define WH  0x30
#define YY1 0x31
#define CH  0x32
#define ER1 0x33
#define ER2 0x34
#define OW  0x35
#define DH2 0x36
#define SSS 0x37
#define NN2 0x38
#define HH2 0x39
#define OR  0x3A
#define AR  0x3B
#define YR  0x3C
#define GG2 0x3D
#define EL  0x3E
#define BB2 0x3F

« Older entries § Newer entries »