Faster Benchmarks With Slower Hardware

hardware

The Bus Pirate is a cheap, simple, Swiss army knife of electronic prototyping, capable of programming FPGAs, and writing to Flash memory. The uISP is possibly the most minimal way of programming Atmel chips over USB, using less than $5 in components. Although the uISP is using a slower chip and bit-banging the USB protocol, it turns out it’s actually faster when operating as a programmer for SPI Flash memories.

Most of [Necromancer]‘s work involves flashing routers and the like, and he found the Bus Pirate was far too slow for his liking – he was spending the better part of four minutes to write a 2 MiB SPI Flash. Figuring he couldn’t do much worse, he wrote two firmwares for the uISP to put some data on a Flash chip, one a serial programmer, the other a much more optimized version.

Although the ATMega in the uISP is running at about half the speed as the PIC in the Bus Pirate, [Necromancer] found the optimized firmware takes nearly half the time to write to an 8 MiB Flash chip than the Bus Pirate.

It’s an impressive accomplishment, considering the Bus Pirate has a dedicated USB to serial chip, the uISP is bitbanging its USB connection, and the BP is running with a much faster clock. [Necro] thinks the problem with the Bus Pirate is the fact the bandwidth is capped to 115200 bps, or a maximum throughput of 14 kiB/s. Getting rid of this handicap and optimizing the delay loop makes the cheaper device faster.

THP Judge: Ian from Dangerous Prototypes

ian-dangerous-prototypesAs we start to get into the swing of The Hackaday Prize we want to take some time to talk to the judges.

[Ian Lesnet] is an accomplished hardware developer. He is, of course, near and dear to our hearts as a Hackaday writer emeritus.

During his time here he came up with an idea for an amazing tool that would let you work with components using a multitude of protocols before heading off to write your firmware. The tool was called the Bus Pirate and [Ian] built an formidable Open Hardware community up around this and several other tools and unique ideas.

[Hackaday] Why do you think people should put together an entry for The Hackaday Prize?

[Ian] There’s never a bad time to hack something together, but with an incentive like SPACE!!! how can you refuse?

[Hackaday] If you could enter, what style of project would you build and where would you try to go with the idea?

[Ian] We like to make electronics hardware that helps debug stuff, but lately we’re rocking more potentially deadly machines that do things. I’d finish up our death chomp robot that slices and dices reels of components into handy kit-sized lengths, while printing values and part numbers on the back paper. Definitely not a winner, but it looks great when it’s chewing parts!

[Hackaday] Is there anything that participants can do with their project write-ups to make your life easier as an adjudicator?

[Ian] Writing and English classes are a special hell for me, but there are some good tips for clear communication. I always start with an overview – “tell them what you’re going to tell them”. This usually means a description of the hack, the major components used, and how they work together. The introduction should have enough info that another hacker can piece everything together without digging through the whole writeup. An overview illustration or hand drawing explaining the methodology is really helpful for visualizing a complex hack.

[Hackaday] You have vast experience with Open Hardware projects. I think one of the tough things for beginners is navigating the Open Hardware licenses available. Do you have any advice for noobs to learn more about licenses and perhaps on narrowing them down?

[Ian] If you want the world to be a better place put all your work in the Public Domain (Creative Commons Zero) for anyone to use however they want. That’s the license with the least bullshit attached. If you have a billion dollar secret idea by all means keep it in your closet and show it to no one, because that’s about the only thing that will protect it from innovators and imitators. Other licenses fall somewhere in the middle, but for our stuff we’ve decided to go Public Domain wherever possible.

[Hackaday] We’ve seen a lot of collaborative projects come out of DP. Do you have any advice you can share for finding collaborators for a hardware project?

[Ian] The best advise I’ve heard (not mine) is to wait until a project is done to decide ownership share. Hackers are quick to settle on equal ownership, but during the project (or the long haul support period) collaborators may loose interest or be unable to continue as planned. With equal ownership remaining team members must finish the whole project just get a portion of the future gains. It demotivates the remaining team members and kills momentum. By waiting to see how things play out you’ll have a much better idea how to divide ownership for a successful long term collaboration.

[Hackaday] Can you name a favorite piece of bench equipment and tell us why it is at the top of your list?

[Ian] For years I used $10 “fire starter” soldering irons, even for surface mount soldering. An adjustable iron is a nice thing to have though, along with a bright light and head magnifier. A hot air rework station is the tool I can’t live without. It’s for fixing mistakes, which I make constantly, and when it dies everything crashes to a halt.

[Hackaday] What do you think of the evolution of the kit and small-run electronics industry over the last decade? Where would you like to see it go, and do you have any insights about what will get it there, or possible barriers that stand in the way?

[Ian] It’s huge now. Crowd source funding sites alone have become home to how many cool hacks, designs, and projects? Local, short-run assembly houses using a fairly standard set of components would make it a lot easier to get into hardware without 1337 soldering skillz.


SpaceWrencherThe Hackaday Prize challenges you to build the future of connected devices. Build the best and claim a trip into space or one of hundreds of other prizes.

The Arduino Operating System

WGPIOhile Arduino and its libraries are the quickest way to interface with a sensor and blink an LED, sometimes you shouldn’t have to write and compile code to do something exceptionally simple. [Oliver] realized most of the overly simple functions of a microcontroller could be done from a command line running on that microcontroller and came up with the MiniPirate, the Arduino command line tool.

The MiniPirate is just a sketch compiled on the Arduino that allows pins to be set high or low, set a PWM value, or reading and writing I2C bytes. It’s basically an extremely slimmed down version of the Bus Pirate meant for extremely simple modifications of circuits and peripherals.

[Oliver] demos his MiniPirate by taking a DS1307 real-time clock, wiring up the I2C bus, and writing values to set the time. It’s a very simple implementation meaning he needs to write everything in hex, but it’s still easy enough to find a use in many other projects.

A FPGA based Bus Pirate Clone

XC6BP

A necessary tool for embedded development is a device that can talk common protocols such as UART, SPI, and I2C. The XC6BP is an open source device that can work with a variety of protocols.

As the name suggests, the XC6BP is a clone of the Bus Pirate, but based on a Xilinx Spartan-6 FPGA. The AltOR32 soft CPU is loaded on the FPGA. This is a fully functional processor based on the OpenRISC architecture. While the FPGA is more expensive than a microcontroller, it can be fully reprogrammed. It’s also possible to build hardware on the FPGA to perform a variety of tasks.

A simple USB stack runs on the soft CPU, creating a virtual COM port. Combined with the USB transceiver, this provides communication with a host PC. The device is even compatible with the Bus Pirate case and probe connector. While it won’t replace the Bus Pirate as a low-cost tool, it is neat to see someone using an open source core to build a useful, open hardware device.

Hackaday Links: January 26, 2014

hackaday-links-chain

The automotive industry is rolling more and more tech into their offerings. This is great for us because replacement or salvaged parts are great for projects. Here’s one component to look for. [MikesElectricStuff] tears apart the thermal imaging camera form an Audi. [via Hacked Gadgets]

Give your valentine an analog love note on the big day. [Tom's] LED heart chaser design does it without any coding. It’s a 555 timer with CD4017 decade counter. The nice thing about the setup is a trimpot adjusts the chaser speed.

[Jan] is overclocking his Arduino to 32 MHz. For us that’s kind of an “eh” sort of thing. But his statement that you need to use a clock generator because the chip won’t work with an oscillator at that frequency raised an eyebrow. We saw an AVR chip running from a 32MHz crystal oscillator in the RetroWiz project from yesterday. So do we have it wrong or does [Jan]? Share your opinion in the comments.

Download a copy of the Apple II DOS source code… legally. Yay for releasing old code into the wild! The Computer History Museum has the DOS source code and a bunch of interesting history about it. [via Dangerous Prototypes]

While we were prowling around DP for the last link we came across [Ian's] post on a new version of Bus Pirate cables. We’ve got the old rainbow cables which are pretty convenient. But if you’ve used them you’ll agree, hunting for the correct color for each connection isn’t anywhere near a fool-proof method. The new cable uses shrink tube printed with probe labels. They sound like a huge pain to manufacture. But this makes connections a lot easier. In our experience, when it doesn’t work its always a hardware problem! Hopefully this will mean fewer botched connections.

Make your tiny LiPo cells last longer. Not capacity wise, but physically. The delicate connections to the monitor PCB break easily, and the plug is really hard to connect and disconnect. [Sean] shows how he uses electrical tape for strain relief, and a bit of filing to loosen up the connector.

KerbalEdu: Kerbal Space Program for education. That’s right, you can play Kerbal as part of school now. Some may shake their heads at this, but school should be fun. And done right, we think gaming is a perfect way to educate. These initiatives must be the precursor to A Young Lady’s Illustrated Primer method of education. Right?

Reverse geocache based on STM32 and GPS wristwatch

reverse_geocache

[Renaud Schleck] somehow got lucky enough to find a GPS wristwatch in the trash. It had a broken LCD screen so its wouldn’t be of much use on that next hiking trip, but he knew it still had potential. He used the GPS module and a few other parts to build this reverse geocache box.

Reverse geocache is a container that is locked, opening only in a pre-defined geographic location. We’ve seen plenty of these projects around here, like this one that talks, or this one which was given as a Christmas gift. They’re popular projects both because of the unique method of getting at the prize inside, and because it doesn’t take a whole lot of hardware to build one. Once [Renaud] had the GPS module he simply need a user interface, locking mechanism, and a microcontroller to pull it all together.

The interface uses a screen from an old cellphone and one push button. The latching system is a tiny geared motor salvaged from a Laptop optical drive. These, along with the GPS watch board are all monitored by the STM32 microcontroller which he programmed using OpenOCD and the Bus Pirate.

[via Reddit]

Disassembling and reprogramming Webkeys

Webkeys are small, inexpensive USB devices which launch a web browser when plugged into a computer. They’re given out as a promotional item, but they can be fun to hack as well. [Brad Antoniewicz] recently got his hands on one and decided to crack it open to see what he could accomplish.

The majority of the device was packaging but it didn’t take him long to get down to the guts seen here. There are two units shown in the image above so that we can get a look at both sides of the circuit board. As you can see, there’s a chip-on-board processor (that black blob) that handles the USB connectivity. But the data which is pushed to a computer is stored in that EEPROM chip at the top. It’s got legs which are just begging to be probed. [Brad] wasn’t able to find the exact datasheet but he got some clues as to the pinout. Using his Bus Pirate he was able to establish communications and sniff the i2c traffic. With that success he went on to overwrite that data. You can see a quick demonstration of it after the break.

[Brad] hopes to do a bit more with the hardware. He thinks those four pads can be used to reprogram the MCU. We’ll keep our eyes out for updates as he moves along on that mission.

[Read more...]

Follow

Get every new post delivered to your Inbox.

Join 96,756 other followers