Building An Automatic Bicycle Transmission In A Week

1

Every year, the ECE department of Carnigie Mellon University hosts Build18, an engineering festival intended to get students out of the classroom and into the workshop. [Andrew Toth] along with team members [Jenna MacCarley], [Peter McHale], and [Nicolas Mellis] have been busy this last week putting together an automatic bicycle transmission.

Most cyclists agree that a cadence of 80 RPM is just about right for most cycling. The team’s transmission uses Hall effect sensors to sense the cadence of the rider and will change to a higher gear if the cadence drops below 60 RPM and a lower gear if the cadence is above 100 RPM.

One of the requirements of the Build18 festival is the completed project must cost less than $250. By using an Arduino Mega and a servo to change gears, the team has a fairly low cost solution to automatically changing bicycle gears.

It’s a very cool project, and hopefully we’ll see a video once the competition is over at noon, EST today.

Making Better Noises With Dual PWM

pwm_16b_sm

Although it’s technically possible to get 16 bits of resolution on a ATMega328, most implementations of PWM on everyone’s favorite ‘mega – including just about every Arduino sketch – are limited to 8 bit PWM. This means the pins can only output 256 different values, so if you’re playing around with music made on an Arduino don’t expect very high fidelity.

There is a clever way around this: use two PWMs, and use one pin for high bytes and another for low bytes. That’s what Open Music Labs did when working on a synthesizer project that needed very high quality audio.

The basic idea behind the build is that PWM pins can be used to create audio frequencies. Using two PWM pins and adding them together means it’s possible to add extra bits of resolution. This requires using different values of resistors on each pin. For example, using the same value of resistors on two PWM pins increases the resolution by one bit. Two pins with a resistor value ratio of 1:4 increases the resolution by four bits, and so on.

There’s a great tutorial for setting up these higher resolution, dual PWM outputs on an ATMega or Arduino, as well as a distortion analysis for this dual PWM setup.

Raspi Astrophotography Board Also Does Everything Else

FPGA

A few years ago the folks at Astro Designs put together a board that took off-the-shelf CCD sensors from point and shoot cameras and turned them into respectable astrophotography sensors. Since then, the world has seen an explosion of Raspberry Pis, Arduinos, and other microcontroller platforms, making this the perfect time for a hardware revision.

Their PiXi-200, like their previous AstroCam board, is able to take image sensors out of cameras and turn them into telescope mounted cameras. That’s only one of its tricks, though: The PiXi-200 also has accelerometers, gyroscopes, enough UARTs to do just about anything, a four channel ADC and four channel DAC, two dozen GPIO pins, enough LEDs and buttons for any project, and a 200,000 gate FPGA. All this in a board that plugs directly into the GPIO pins on the Raspberry Pi just like an Arduino shield. Needless to say, there’s a lot you can do with this board.

Right now, the design is still in the prototype stage, but once everything is finalized the basic model of the board will sell for £30 GBP ($50 USD). The high-end “Model C” board, with all the bells and whistles, will sell for £45 GPB ($70 USD).

A Steampunk Combination Sketchbook

book

[Admiral Aaron Ravensdale], fine craftsman of steampunk wares, just finished up a new project. It’s a sketchbook protected by two layers of security, covered in gilded leather and drenched in the expositions of a [Jules Verne] novel.

The first layer of security for this sketchbook is a combination lock. On the cover are four switches, each with four positions. These are connected to a PICAXE microcontroller which goes to the next stage of the lock once the correct combination is entered.

The book’s security also includes a knock sensor. With a small piezo element hidden under the cover, [Ravensdale] deeds to tap the book with a specific pattern before it opens. The mechanical part is a small hobby servo also mounted to the cover that releases a pair of brass clasps once both locks are opened.

Like all of the [Admiral]’s builds, it’s a fine piece of craftsmanship, equally well suited to take on a holiday with the baron or to the opium dens of Ceylon.

You can check out [Admiral Ravensdale]’s demo of his sketchbook after the break.

Continue reading “A Steampunk Combination Sketchbook”

Print Your Own 30 Round AR15 Magazine

AR

Here’s a 30 round magazine for an AR15, made just in time to add to the national conversation over things that look scary.

This magazine is the product of Defense Distributed who have previously graced the front page of Hackaday with their 3D printed scary bang bang machine. While continuing to work on their WikiWeapon – a gun printable on a home-built 3D printer – the team decided they could subvert more obtuse gun laws by making their own high-capacity magazine.

The magazine is printed on an extremely expensive commercial 3D printer, but the team is working to make it printable on more affordable models. The prototype magazine survived unloading a full 30 rounds. Video demo of that after the break.

Also on Defense Distributed’s DEFCAD is a sound moderator for paintball and air guns. While the design isn’t yet finalized for those big scary assault weapons, it should be possible to modify it for the big guns.  One of their next projects is a stock, hopefully one that includes a hinge.

Continue reading “Print Your Own 30 Round AR15 Magazine”

Evolutionary Algorithms Computes The Best Blackjack Strategy

blackjack_banner

Don’t want to learn about evolutionary algorithms the usual way, by generating sentences from random letters, or randomly placing pixels to generate the Mona Lisa? Then make your own evolutionary algorithm! With blackjack!

[Brian] has been playing around with evolutionary algorithms, and wanted a task that’s well suited for optimization. He chose blackjack, because of the limited number of hands that can be dealt to the player (32) and low number of hands the dealer can have (10).

Even with the low number of initial conditions for the player and the dealer, there are still 4.562 x 10^192 possible combinations of hands, so brute forcing a blackjack strategy would require the computational power of the entire planet. An easier way to compute a good strategy is an evolutionary algorithm, implemented by [Brian] with the Watchmaker Java library.

For each generation in [Brian]’s program, a 32×10 grid was generated, one cell each for possible player’s hands against the dealer’s hand. In each cell, the computer put a ‘hit’, ‘stay’, or ‘double down’, and played thousands of hands with that strategy. The best strategies were bred and eventually [Brian] ended up with a good blackjack strategy.

The resulting best strategy is pretty good – using his strategy, he can walk out of an Atlantic City casino with 96% of the money he arrived with.

There’s Something Strange About This Game Boy

emu

What looks to be a stock brick Game Boy with two additional buttons is actually one of the coolest portable mods we’ve ever seen.

Instead of the classic 1989 hardware, the interior of this Game Boy is stuffed with a Dingoo A330 portable emulation machine capable of playing Game Boy, Game Boy Advance, and other 8 and 16-bit console classics.

After a great deal of modification to the original Game Boy enclosure, [Alex] cut down two Game Boy PCBs to wire the D pad, A, B, select and start buttons to the Dingoo. An extra pair of buttons were added and the shoulder buttons present on the Dingoo were emulated with rocker switches placed where the original volume and contrast controls were.

All this and a new color LCD (and screen bezel) means this Game Boy looks nearly stock, save for the addition of an extra pair of buttons. It’s a fabulous piece of work, and we’re exceedingly jealous for [Alex]’s friend receiving this for his birthday.

You can check out this build in action after the break.

Continue reading “There’s Something Strange About This Game Boy”