SPI: Let Go And Use The Force

Take a leap the next time you use SPI and don’t poll for the busy flag. “What, are you crazy? That’s the whole point of the busy flag! It’s a quick check to make sure you don’t kill a byte waiting to be shifted out!” Sure, we thought the same thing, but the other side of the coin is that it takes time to check the busy flag, and that’s time he could be transmitting data. [bigjosh2] calculates that his technique saves 20% of those wasted cycles in this particular case. And he’s “using the force” only because he’s a Jedi master able to rely on the cycle count of a chunk of assembly code.

He’s working with an AVR processor, and pumping out bits to drive the vintage LED display pictured above. The ancient chips don’t have buffered SPI so he has to blank the display while shifting new data in to prevent it from glitching. Because the display blank during the SPI transmission, the slower it goes, the dimmer the lights.

He attacks the problem with synchronous code. It takes 2 cycles for the hardware SPI to send each bit, so he twiddles his thumbs (that’s exactly what he wrote in his code comments) for 16 cycles before reloading the SPI register with his next value. This leaves it up to faith in the silicon that the shifting will always take the same number of cycles, but the nice thing about hardware is that it’s deterministic. He ends up killing a few cycles in order to save time by not polling the busy flag.

Still need a crash course in what SPI actually does? [Bil Herd] has you covered with this SPI communication demo.

A Raspberry Pi Tidy Tide Tracker Predicts Propitious Promenades

The whims of the tides can make walking near the ocean a less than pleasant experience. A beautiful seascape one day may appear as a dismal, mucky, tidal flat the next. Frustrated over these weary walks, [Average Man] created a tidy tide tracker to predict propitious promenade periods.

A Raspberry Pi A+ pulls tide timing information off the web by scraping a web page using Python code. The time for the high tide, when the estuary will be full of water, is shown on a 4-digit 7-seg display. It’s all sandwiched between two smoked black panels to provide a neat case while still letting the LEDs show through.

The code comes from two projects [Average] recalled from a kickstarter timing project and a 7-seg display project. As he points out:

It’s great to learn programming from others, but it’s even better if you learn them well enough to remember, re-use and combine that code later on as well.

The display chips are mounted on a product of his own, the no longer available ProtoPal board. This is a Pi A+ size board with 288 prototyping holes and the standard connector for mounting on the Pi GPIO header. It keeps the project neat and clean.

FPGA To Ethernet Direct

When [iliasam] needed an Ethernet connection, he decided to see how much of the network interface he could put in the FPGA logic. Turns out that for 10 Base-T, he managed to get quite a bit inside the FPGA. His original post is in Russian, but automatic translation makes a passable attempt at converting to English.

This is a classic trade off all FPGA designers face: how much external logic do you use for a particular design. For example, do you add memory to the PCB, or use FPGA resources as memory? Each has its advantages and disadvantages (that’s why it is a trade off). However, if you are trying to keep things cheap, slashing external circuitry is often the way to go.

Continue reading “FPGA To Ethernet Direct”

DIY Mini Butane Torch Would Make MacGyver Proud

Need to MacGyver yourself out of a situation with a mini torch? Well, you might want to watch this video of how to make a mini butane torch out of some random household components.

Built by [Roman UrsuHack], almost all the parts in this assembly are being used completely not as manufacturer intended. Which is why we love it. And why it’s a bit dangerous too.

Using an inkjet printer cartridge refill syringe, a bicycle pump needle, some tubing, a few compression valves (they look almost like medical equipment, for blood donation), a water bottle, a can of butane, lots of hot glue, and a few bicycle pump fittings, [Roman] has created a rather ingenious little butane torch.

Continue reading “DIY Mini Butane Torch Would Make MacGyver Proud”

The Mystery Of The Boiled Batteries

While debugging a strange battery failure in a manufacturing process, [Josh] discovered a new (to us) LiPo battery failure mode.

Different battery chemistries react differently to temperature. We’ve used lithium exclusively in high-altitude ballooning, for instance, because of their decent performance when cold. Lithium batteries generally don’t like high temperatures, on the other hand, but besides the risk of bursting into flames, we had no idea that heat could kill them. When the battery’s voltage is already low, though, it turns out it can.

[Josh]’s process required molding plastic with the battery inside, and this meant heating the batteries up. After the fact, he noticed an unreasonably high failure rate in the batteries, and decided to test them out. He put the batteries, each in a different initial charge, into a plastic bag and tortured them all with ice and fire. (OK, boiling water.)

When the batteries got hot, their voltage sagged a little bit, but they recovered afterwards. And while the voltage sagged a little bit more for the batteries with lower initial charge, that’s nothing compared to the complete failure of the battery that entered the hot water with under 1V on it — see they yellow line in the graphs.

battery_voltages

There’s a million ways to kill a battery, and lithium batteries are known not to like being completely discharged, but it looks like the combination of deep discharge and heat is entirely deadly. Now you know.

Help Needed: No-Soldering ESP8266 IFTTT Button

We all love to see amazing hacks in their finished state and be dazzled by what our peers can do. But that’s just the summit of the hacker’s Everest. We all know that the real work is in getting there. Hackaday.io user [stopsendingmejunk] is working on an ESP8266-based IFTTT Button based on a simple breakout board so that anyone could rebuild it without having to do any soldering, and he’s looking for collaboration.

[stopsendingmejunk]’s project takes off from this similar project on different hardware. The board he’s chosen to use is the EZSBC ESP8266-07 breakout, which should have everything he needs, including an on-board button. It should be an easy enough job, but he’s having trouble getting the thing to stay asleep until the button is pressed.

We’ve seen more than a few hacks of the Amazon Dash button, but aside from hacking for hacking’s sake, we’re also happy to see a ground-up open redesign. Besides, this looks like it’ll be a great introductory project, requiring little fiddling around. With a little help. The code is up here on GitHub. Anyone game?

Home Made Half Life 2 Turret Powered By Pi

To help expand his inter-dimensional empire, [Solderchips] has decided to build his own Half Life 2 turret. This, he hopes, will automatically track and shoot anyone who hinders the work of Our Benefactors. He’s documenting the process, and has just published his first step: creating a 3D model of the turret and printing it out. The final project will use a Raspberry Pi and a webcam to track rebels and fire on them automatically, especially those with crowbars.

He’s made a promising start, using a papercraft model of the turret to build the 3D model, then modifying it to accommodate the brains (the Raspberry Pi) and the brawns, a couple of small servos that will move the top of the turret around. The next step will perhaps be to add a tilt switch so that the whole thing falls asleep if it falls over. The thing to learn from this project, is that at some point you just have to stop thinking about it and actually make something. This paper model is a big step toward success compared to carrying around the dream in your head.

We’ve seen a few Portal Turret builds and a very nice Wheatley build, but not a decent Half Life 2 turret build, so hopefully [Solderchips] will see this through to completion and release all of his files.