Fail Of The Week: Don’t Tie Those Serial Lines High

Fail Of The Week is a long-running series here at Hackaday. Over the years we’ve been treated to a succession of entertaining, edifying, and sometimes downright sad cock-ups from many corners of the technological and maker world.

You might think that we Hackaday writers merely document the Fails of others, laughing at others’ misfortunes like that annoying kid at school. But no, we’re just as prone to failure as anyone else, and it is only fair that we eat our own dog food and tell the world about our ignominious disasters when they happen.

And so we come to my week. I had a test process to automate for my contract customer. A few outputs to drive some relays, a few inputs from buttons and microswitches. Reach for an Arduino Uno and a prototyping shield, divide the 14 digital I/O lines on the right into 7 outputs and 7 inputs. Route 7 to 13 into a ULN2003 to drive my relays, tie 0 to 6 high with a SIL resistor pack so I can trigger them with switches to ground. Job done, and indeed this is substantially the hardware the test rig ended up using.

So off to the Arduino IDE to write my sketch. No rocket science involved, a fairly simple set of inputs, outputs, and timers. Upload it to the Arduino, and the LED on pin 13 flashes as expected. Go for a well-deserved lunch as a successful and competent engineer who can whip up a test rig in no time.

Back at the bench refreshed by the finest British pub grub, I started up the PC, plugged the shield into the Arduino, and applied the power. My sketch worked. But wait! There’s a slight bug! Back to the IDE, change a line or two and upload the sketch.

And here comes my fail. The sketch wouldn’t upload, the IDE reported a COM port error. “Damn’ Windows 10 handling of USB serial ports”, I thought, as I’m not a habitual Windows user on my own machines. Then followed something I’ve not done for quite a while; diving into the Windows control panel to chase the problem. Because it had to be a Windows problem, right?

arduino-serial-pinsThe seasoned Arduinisti among you probably spotted my fail four paragraphs ago. We all know that pins 0 and 1 on an Arduino are shared with the serial port, but who gives it a second thought? I guess I’d always had the good fortune to drive those pins from lines which didn’t enforce a logic state, and had never ended up tying them high. Hold them to a logic 1, and the Arduino can’t do its serial thing so sketches stay firmly in the IDE.

I could have popped the shield off every time I wanted to upload a new sketch, but since in the event I didn’t need all those inputs I just lifted the links tying those pins high and shifted the other inputs up the line. And went home that evening a slightly less competent engineer whose ability to whip up a test rig in no time was a bit tarnished. Ho hum, at least the revised sketch worked and the test rig did its job exactly as it should.

So that’s my Fail Of The Week. What’s yours?

Header image: pighixxx.com, CC-BY-ND via MarkusJenkins


2013-09-05-Hackaday-Fail-tips-tileFail of the Week is a Hackaday column which celebrates failure as a learning tool. Help keep the fun rolling by writing about your own failures and sending us a link to the story — or sending in links to fail write ups you find in your Internet travels.

Gear Clock Uses Stepper Motor

[Rjeuch] liked a wooden clock he saw on the Internet, but the gears were produced with a proprietary software tool. So he built his own version. Unlike the original, however, he chose to use a stepper motor to drive the hands.

The clock’s gears aren’t just for show, and the post does a good job explaining how the gears work, how you might customize them, and how they fit together. The clock’s electronics rely on an Arduino.

Continue reading “Gear Clock Uses Stepper Motor”

Home Made Pen Plotter

As someone who started using computers in the last century, I find the current resurgence of pen plotters somewhat nostalgic. The difference, of course, is that this century it is easier to make your own, which is what [Miguel Sanchez] is doing.

Inspired by the Axidraw, he is making his own pen plotter. He’s made great progress so far, creating a design that looks quite simple to build. His design is driven by an Arduino Uno with a stepper shield, a couple of NEMA 17 stepper motors and a servo to raise and lower the pen. Throw in a few rods, a belt or two and a number of 3D printed parts, and you’ve got a decent looking pen plotter.

He originally started with laser cut components, but shifted over to 3D printing as the design evolved. It’s not as fancy as the HP pen plotter I used to print out rude words in giant letters with in my youth (a HP7475, I think), but it is a neat build. Check it in action in the video below.

Continue reading “Home Made Pen Plotter”

Arduino Quadcopter Game Uses Serial Monitor

Every new generation of computers repeats the techniques used by the earlier generations. [Kim Salmi] created an ASCII-based quadcopter simulation game using an Arduino that displays on the Arduino serial monitor. The modern twist is the controller: an accelerometer supplements the joystick for immersive play. And of course there are flashing LEDs.

An Arduino Uno provides the processing power and drives the serial monitor. A joystick and a Hitachi H48C accelerometer are mounted on a breadboard and wired to the Uno. The tilting of the accelerometer controls the height and left-right motion of the quadcopter on the screen. The joystick sets the the ‘copter in hover mode and lowers a ‘rescue’ line. Another LED warns when the maximum height, the vertical limit of the screen, is reached. The joystick also selects one of the three quadcopters, which have different performance characteristics.

There’s a video after the break. [Kim] provides the source code so  you use it as a reference for handling the joystick and accelerometer inputs.

More proof that what is old is new.  Continue reading “Arduino Quadcopter Game Uses Serial Monitor”

Atomic Arduino (and Other) Development

Even the most die-hard Arduino fan boys have to admit that the Arduino development environment isn’t the world’s greatest text editor (they’d probably argue that its simplicity is its strength, but let’s ignore that for now). If you are used to using a real code editor, you’ll probably switch to doing your Arduino coding in that and then use the external editor integration in the IDE.

That works pretty well, but there are other options. One we noticed, PlatformIO, extends GitHub’s Atom editor. That makes it cross-platform, powerful, and with plenty of custom plug ins. It also supports a range of platforms including Arduino, many ARM platforms, MSP430, and even desktop computers running Linux or Windows.

Continue reading “Atomic Arduino (and Other) Development”

DIY Arduino Watch

We first thought [Alexis Ospitia]’s watch was a sports watch made with an Arduino, but it’s actually a sporty watch made with an Arduino. This explains the watch’s strange ability to tell you the current temperature and humidity.

The core of the watch is an Arduino Mini. To make it good for time telling, a real-time clock module was added. A DHT11 monitors the temperature and humidity. A charge circuit and lithium battery provide power. Finally, the watch displays the date, time, and other data with an LCD from a Nokia 5110. We can tell you the last part that’s going to break on this.

Even if you think the watch is a bit chunky, the tutorial is very slick. [Alexis] has taken the trouble to individually draw and describe each portion of the watch’s construction. He explains each pin, what they do, and provides a Fritzing drawing of the wires to the Arduino. The code is provided; to program the watch a USB-to-serial module must be used.

For the housing he made a box from a thin gauge aluminum sheet and attached leather straps to the assembly. The final construction is cool looking in a techno-punk way, and is fairly compact. One might even say sporty.

“That’s Not A Knife…”

[Robin Baumgarten] likes to play dangerously. His latest creation, Knife To Meet You cuts to the quick of cooperative gaming. 3 humans play together against the machine. The object of the game is to hold your button down as long as possible. The game makes this difficult by sweeping a knife across the play field, right at finger level. (Video below.)

Knife to meet you is controlled by a flesh eating Arduino. In addition to reading the controls and driving a servo to move the knife, the Arduino also displays encouraging messages on a 2×20 character LCD.

The idea is to scare people, not to actually slice them up. To this end, the knife is actually a capacitive sensor. When the game detects the knife has contacted soft human flesh, it stops the knife before blood starts flowing. The game indicates a player has been defeated by making several chopping motions toward the loser. If the losing player still has all their digits, a new round begins.

The project was created as part of a 24 hour game jam. The final product is quite nice, built into a wood case that closes up for travel. It even has a carrying handle, so you can bring it to parties and find fresh victims players.

We’re not sure what it is about knives and Arduinos. It was only a few months ago that we saw an Arduino driving a knife wielding tentacle. Could the world’s friendliest microcontroller board be turning on us?
Continue reading ““That’s Not A Knife…””