Reverse Engineering Lattice’s ICE40 FPGA Bitstream

Unlike microcontroller projects, projects involving FPGAs cannot yet claim to rely on a mature open-source toolchain. Each FPGA will, at some point, need to be configured with a proprietary bitstream produced from a closed source synthesis tool. This lack of a full FPGA toolchain to take your project from Verilog-or-VHDL to an uploadable bitstream is due to many reasons. First, writing such a “compiler” is complicated. It involves intimate knowledge of the resources available on the FPGA that can assimilate the functionality of the intended design. Second, the entire synthesis procedure is closed-source, a “secret sauce” of sorts for each FPGA vendor.

In response, [Alex] and [Clifford] have taken the first step towards an open-source toolchain for one FPGA; they’ve reverse-engineered the bitstream of Latttice Semiconductor’s iCE40 FPGA. The duo didn’t just pick the iCE40 on a whim. This choice was deliberately because that FPGA is available on a development board for a mere $22 so that others could follow in their footsteps without breaking the bank.

In the video below, [Clifford] demos the functionality of this new tool by synthesizing a design from Verilog to a bitstream and then back from a bitstream to Verilog. Given this feature, a staggering amount of work has been done towards developing a polished open-source toolchain for this particular FGPA.

To snag a copy of the latest code, have a look at its documentation page.

Continue reading “Reverse Engineering Lattice’s ICE40 FPGA Bitstream”

Apple ][ Disk Emulation

A while ago, [Steve] over at Big Mess ‘O Wires created a device that would emulate old Macintosh disk drives, storing all the data on an SD card. No, it’s not SCSI; the early Apples had a DB-19 connector for connecting 400 and 800kB disk drives. It’s a great piece of hardware for bootstrapping that old Mac you might have sitting around. Apple ][s, IIs, and //s use an extremely similar connector for their disk drives. A few rumors on some forums led [Steve] to experiment with some ancient bromide-stained boxes, and the results are interesting to say the least.

After pulling out an old //e and IIgs from storage, [Steve] found his Macintosh Floppy Emulator didn’t work with the Apples. This was due to the way Apples could daisy chain their disk drives. There’s an extra enable signal on the connector that either brings Drive 1 or Drive 2 into the circuit. Macs don’t care about this signal, but Apples do. Luckily the 800kB drives for the IIgs have an extra board that handles this daisy chain and drive eject circuitry.

After removing this extra board from a IIgs drive and connecting it to the Floppy Emu, everything worked beautifully. With schematics and a working circuit in hand, it’s now a piece of cake to build an adapter board for using the Macintosh Floppy Emu with Apples, or to build that circuit into a future revision of the Floppy Emulator.

Considering how much trouble [Steve] had bootstrapping these Apples without an SD card to Floppy drive emulator, we’re thinking this is great. The current way of making an Apple II useful is ADTPro, a program that uses audio to communicate with Apples over the cassette port. In case you haven’t noticed, microphone and headphone ports on laptops are inexplicably disappearing, making a hardware device like a SD card floppy emulator the best way to bring disk images to 30-year-old hardware.

diy brushless gimbal

Resourceful DIY Brushless Hand-held Camera Gimbal

Holding a video camera while shooting video can lead to finished footage that has some serious shakes. Lucky for us there are some solutions to this problem such as a passive steady cam stabilizer or an active motor-driven gimbal. [Oscar] wanted a smooth-operating brushless motor gimbal but didn’t want to spend the big bucks it costs for a consumer setup so he went out and built his own.

[Oscar] didn’t have a CNC machine or 3D printer to help with his build. He made his gimbal with simple hand tools out of plywood and hardware store bracketry. In his build post, he talks about how it is important to keep the pivoting axes of the gimbal in line with the camera lens and what he did to achieve that goal. The alignment of the axes and the lens ensures that the video is stable while the gimbal adjusts to keep the camera’s angle constant.

[Oscar] purchased the brushless motors and motor controller which included a gyro sensor on a separate PCB board. The gyro is mounted to the camera mount and sends tilt information back to the controller that then moves the brushless motors to keep the camera level. The final project worked out pretty good although [Oscar] admits he still would like to tune the PID settings in the controller a little better. Check out the video after the break where the stabilized camera is compared to one that is not.

Continue reading “Resourceful DIY Brushless Hand-held Camera Gimbal”

Arduino IDE Support For The ESP8266

Despite a wealth of tutorials for setting up and writing code for the ESP8266 WiFi module, there has not been much of anything on programming this cheap wireless module with the Arduino IDE. Finally, this has changed. After many months of coding, the Arduino IDE supports the ESP8266 module.

The Arduino IDE support was announced on the ESP8266 community forum. Setup is fairly simple with downloads for Linux, OS X, and Windows. This isn’t an ESP8266 shield, either: you can write code for the ESP module, connect the serial pins, and hit the program button.

The basic functions of the Arduino IDE – pinMode, digitalRead, digitalWrite, and analogRead – are available. Most of the WiFi functions work just like the WiFi shield library.

There are a few things that aren’t written yet; PWM doesn’t work, as the ESP8266 only has one hardware PWM source. SPI and I2C slave mode aren’t done yet, and uploading sketches via WiFi needs a little bit of thought. That said, this is a great introduction to programming the ESP module. If the Arduino IDE isn’t your thing, you could always do it the cool way with [CNLohr]’s programming tutorial we featured last week.

In Which Robots Fight The Console Wars

Though the names have changed over the years, the console wars wage on. [moop] must have been feeling nostalgic for the NES vs. SEGA days when he started his current project, Foobot, which is a tabletop football (soccer) game played by robots that are controlled with classic NES and SEGA controllers.

Each team has two robots that tool around on laser-cut perspex wheels attached directly to 16,000RPM motors. An SN754410 controls the motors, and each robot has an ATtiny2313 brain. They all communicate with a single transmitter over their 433MHz 1402 radio receiver modules. To avoid collisions, [moop] used a packet system, wherein each robot has an ID. The messages all contain a robot ID, message payload, and checksum. The robots ignore messages addressed to others, and any message with an invalid checksum.

[moop] has made everything available on his github, including the PCB layouts and CAD files for the robot chassis and transmitter case. Watch them battle it out after the break. If the Foobots have riled you up about vintage gaming, check out these sweet arcade hacks.

Continue reading “In Which Robots Fight The Console Wars”

Arduino SRL To Distributors: “We’re The REAL Arduino”

Arduino SRL (formerly known as Smart Projects SRL) sent out a letter to its distribution partners yesterday. If you’ve been following along with the Arduino vs Arduino story (we’ve previously published two installments), the content isn’t entirely surprising; it’s essentially a tactical move to reassure their distribution channels that Arduino SRL is the “One True Arduino”. That said, there’s still some new tidbits buried inside. You can skip down to read the full text below, but here’s our take.

The Business History of Arduino

arduino_vs_arduino_tnA quick summary of the legal situation. Arduino LLC was formed in April 2008 by the original five founders to provide a corporate entity behind the Arduino project. Smart Projects SRL, controlled by one of the founders, was tasked with the actual production of the boards. It turns out that Smart Projects had trademarked the Arduino brand in Italy in December 2008, before Arduino LLC got around to filing in April 2009 in the USA. But everyone was friends, right? As long as the licensing fees keep flowing.

Fast-forward to September 2014, when Arduino LLC filed a lawsuit in Italy against Smart Projects claiming that they had infringed LLC’s trademark and that they had recently stopped paying licensing fees on their use of the Arduino name. In October, Smart Projects filed with the USPTO to revoke Arduino LLC’s trademark. In late 2014, Smart Projects changed its company name to Arduino SRL (a “Società a responsabilità limitata” is one form of Italian limited-liability company) and hired a new CEO, [Federico Musto].  Around the same time, Arduino SRL opened up the website arduino.org (different from long-existing arduino.cc) but with nearly identical style. In January 2015, Arduino LLC filed a lawsuit in the US, claiming their right on the Arduino name.

The Gist of it

In short, Arduino LLC has been working on developing the Arduino platform, software, and community while Smart Projects / Arduino SRL was the major official producer of the hardware for most boards. Both are claiming to “be” Arduino, and going after each other in court. So it’s not strange that Arduino SRL would like to try to keep its hold on the distribution channels. Which brings us to their letter to distributors.

March 27 Letter

Arduino-Distributor-Update-0A good portion of the letter reads to be a very carefully worded defense of why Arduino SRL is the true Arduino:

“Arduino Srl (aka Smart Projects Srl), as you know has been from the  beginning of the Arduino® project, the place where the ideas were turned into reality and into a business.”

This is of course strictly true — Smart Projects was certainly the largest manufacturer of Arduino boards. But it sidesteps the issue at hand in the trademark suits: whether they were simply a licensed producer of the boards or whether they’re “Arduino”.

Similarly, in the questions section of the letter, they ask if there are actually two “Arduino” product manufacturers, and answer “not really”. Of course, that’s true. Arduino LLC doesn’t manufacture boards, but exists to license their trademark out to fund development.

The only real news in the letter is that Arduino SRL is replacing its old distribution and logistics company, Magyc Now, with a new one named CC Logistics. Both Magyc and CC Logistics are named as defendants in the US lawsuit filed by Arduino LLC, so it’s unlikely that this change is due to legal fallout.

What this Means

In conclusion, Arduino SRL’s letter to its distributors seems to essentially follow the line of reasoning in their trademark lawsuit in the US against Arduino LLC: since Arduino SRL is doing the manufacturing and using the Arduino name, they’re the true Arduino. Whether or not this will stand up in court, or whether Arduino LLC can make its case that SRL was simply a licensed manufacturer, remains to be seen.

We’ve embedded the contents of the letter after the break. You can also download the original PDF.

Continue reading “Arduino SRL To Distributors: “We’re The REAL Arduino””

A Recycled Robot Arm For All!

It’s mind boggling how much e-waste we throw out. Perfectly good components, mass produced for pennies. And at the end of their life, going straight to a landfill or some poor country to be melted down. Don’t you wish you could help?

Stepper motors are a dime a dozen when it comes to e-waste, and there’s tons of cool projects you can do with a stepper motor — [Madivak] is just starting on a robot arm design over at Hackaday.io that makes use of recycled components.

It’s fairly early in development, but that means it’s a great time to start following it on the project site. The robotic arm is being designed for his final year project in his undergrad degree. Besides the steppers, he’s using his school’s Utilimaker 3D printer to manufacture all of the other mechanical components with control coming from DRV8825 stepper drivers and the Freescale Freedom KL25Z dev kit. Check out the clips after the break to see current state of the build.

Continue reading “A Recycled Robot Arm For All!”