Programming FPGAs With Python

If you’ve ever wanted to jump into the world of FPGAs but don’t want to learn yet another language, you can now program an FPGA with Python. PyCPU converts very, very simple Python code into either VHDL or Verilog. From this, a hardware description can be uploaded to an FPGA.

The portion of the Python language supported by PyCPU is extremely minimal, with only ints being the only built-in data type supported. Of course ifs and whiles are still included along with all the assignments and operators. A new addition is a way to get digital IO access with Python, and obvious requirement if you’re going to be programming Silicon.

PyCPU surely won’t replace VHDL or Verilog anytime soon, but if you’re looking to get into FPGAs and the ‘telling a chip what to be’ paradigm it offers, it’s certainly a tool worth looking into.

Hats off to [hardsoftlucid] for sending this in. Our wonderful (we mean that, really) noticed a few mistakes when this was first posted. Those mistakes have been corrected.

Using A Router As A Wireless Embedded Platform

If you’re going to make your next project wireless, you don’t need an XBee, WiFi shield, or even a Bluetooth module. Turning old hardware into a dev board is extremely easy, as [Taikson] shows us by adding an I2C bus to a Fonera router. (Spanish, here’s the Google translation)

To add an I2C bus, [Taikson] took two pins that originally went to a router status pin and soldered on a pair of wires. [Taikson]’s router is running OpenWrt, so adding support for I2C devices is just a matter of changing a few kernel settings.

As for what you can do with a router development platform, the sky’s the limit. Last year, [Taikson] controlled a quadcopter from within a web browser with a similarly modified I2C-enabled router. It’s a clever hack, and with a little bit of work it should be possible to add a few sensors or even a camera to his quadcopter.

Make Your Next Enclosure Out Of Stone

Sure, a laser-cut plywood enclosure adds a lot of maker cred, and custom plastic or cast aluminum enclosure belies an engineering and design prowess. [ardiyno] didn’t want one of these run-of-the-mill enclosures, so he made one from scratch out of limestone.

The stone [ardiyno] used comes from the southern bit of his native Netherlands. It’s a very nice limestone, easily carvable and capable of very fine detail as seen in [ardiyno]’s scary/creepy carved limestone bookends.

Inside the enclosure, [ardiyno] has a calendar/clock/environmental sensor displaying the current date, time, relative humidity, and light level on twelve 14-segment displays. [ardiyno] admits the enclosure is a bit oversized for how much space his project takes up, but the extra space is meant for future internal expansions.

After the break, you can check out [ardiyno]’s method of using a screw driver to carve the limestone. Normally, we’d call foul over someone abusing tools, but the limestone is so soft (the pyramids were made out of limestone using soft copper tools), there’s most likely very little damage to the screwdriver.

via reddit

Continue reading “Make Your Next Enclosure Out Of Stone”

Open Source Graphics Card

Even though NVidia and ATI have been open-source friendly for a while now, there still isn’t a true open-source graphics card. [Anton] and [Per] are trying to fix that by building his own graphics card around an FPGA. The project is called ORSoC, and it’s available on opencores.com.

The guys are building the ORSoC graphics card around a Digilent Atlys FPGA dev board. So far, he can draw lines, textured triangles, bitmap or vector fonts, and throw a few 3D meshes up on the screen. This project isn’t intended to run advanced OpenGL or Steam on Linux, but for all the work that into this graphics accelerator, it’s an amazing piece of work.

There are a few demos after the break; a cube rotating in 3D and a demo drawing and translating polygons and a few textures. The ORSoC is a bit slow, but that’s an artifact of the build not being optimized for the FPGA the team is using. If you’d like to test this graphics card, there’s a Git available. As a bonus you don’t even need an FPGA to play around with this project. There’s also a software emulation of all the functions. Very neat.

Continue reading “Open Source Graphics Card”

Color Multiplexing Through Fiber Optics

If you want to go high bandwidth, fiber optics is the way to go. From trans-oceanic cables to the yet-unseen ‘fiber to every home,’ fiber optics allows a lot more bandwidth than a copper cable. In low-bandwidth applications, fiber optic cable transmits data using one color of light. There’s a way to get more bandwidth out of a fiber optic cable, as [Shahriar] found out while experimenting with an RGB LED.

For his experiment, [Shahriar] used a BlinkM programmable RGB LED and a Sparkfun color sensor. In fiber optic lines with one light, it is possible to send many simultaneously using PWM, but noise becomes a problem at high data rates. Using an RGB LED, [Shahriar] sends three levels of Red, Green, and Blue to transmit 9 bits at a time – perfect for sending a byte with a parity check in one quick light burst.

[Shahriar]’s technique is exactly how the pros pump massive amounts of data through a single fiber optic cable. All the tools, code, and MATLAB functions are available on [Shahriar]’s site, ready to be used by anyone wanting to experiment for themselves.

In the video after the break, [Shahriar] breaks everything down, including the tools, theory, and actual circuits. It’s an amazing video demo, so thorough we’re wondering if [Shahriar] has any teaching ambitions.

Continue reading “Color Multiplexing Through Fiber Optics”

Potting Electronics With Silicone

If you want to improve the reliability of your electronics, just cover them in silicone or epoxy. Potting, as this technique is called, protects your project from impact and loose wires, but most of the time ends up as a gloppy mess. [Charles] figured out an awesome way to make pro-looking potted electronics using silicone and a few supplies from the emergency room.

On one of [Charles]’s trips to the ER, a nurse put Tegaderm on a wound and he noticed his skin could breathe. Figuring Tegaderm would also allow silicone to breathe, he asked for a sample and went back to the lab. After putting a few globs of silicone on a PCB, [Charles] wrapped the whole thing in Tegaderm. Much to his surprise, the silicone cured and made a smooth, glossy protective covering on his board.

[Charles] put up a Picassa album of his Tegaderm/silicone potted electronics, and we’ve got to say they’re looking very professional. This technique could also be applied to [Charles]’ glass PCB touch sensor, allowing for the creation of clear (or at least tranlucent) PCBs.

After the break, you can check out [Charles] potting his ATtinyISP board in silicone with Tegaderm. One word of warning, though: don’t use a silicone that uses acetic acid to cure – that’s a death sentence to electronics. Luckily, there’s an easy test to see if your particular brand of silicone produces acetic acid while curing. Just squeeze a bit of silicone on a piece of scrap, and if it smells like vinegar after a while, don’t use it.

Continue reading “Potting Electronics With Silicone”

GPU Programming For Easy & Fast Image Processing

If you ever need to manipulate images really fast, or just want to make some pretty fractals, [Reuben] has just what you need. He developed a neat command line tool to send code to a graphics card and generate images using pixel shaders. Opposed to making these images with a CPU, a GPU processes every pixel in parallel, making image processing much faster.

All the GPU coding is done by writing a bit of code in GLSL. [Reuben]’s command line utility takes that code, sends it to the graphics card, and returns the image calculated by the GPU. It’s very simple for to make pretty Mandebrolt set images and sine wave interference this way, but [Reuben]’s project can do much more than that. By sending an image to the GPU and performing a few operations, [Reuben] can do very fast edge detection and other algorithmic processing on pre-existing images.

So far, [Reuben] has tested his software with a few NVIDIA graphics cards under Windows and Linux, although it should work with any graphics card with pixel shaders.

Although [Reuben] is sending code to his GPU, it’s not quite on the level of the NVIDIA CUDA parallel computing platform; [Reuben] is only working with images. Cleverly written software could get around that, though. Still, even if [Reuben]’s project is only used for image processing, it’s still much faster than any CPU-bound method.

You can grab a copy of [Reuben]’s work over on GitHub.