Posts Tagged ‘how-to’

How to Whack a Mole with your FPGA, but Not Physically!

Tuesday, November 1st, 2016

https://youtu.be/pausAon7RFw

Good day FPGA Enthusiasts! FPGAs can be used for a versatile set of applications from real time engineering solutions to building funny games. Today’s post is going to focus on the latter where we build yet another game concept using a FPGA board (you may need to adapt your own). The game in consideration is a simple version of ‘Whack a Mole’. Since the FPGA already has a segment display, Switches and LEDs the peripherals required to run the game are minimum.

The only Hardware required for building this game (you may need more parts depending on your FPGA board) is a FPGA and 3 LEDs (2 of the same color preferably red and one different color preferably white or green). Since only 3 LEDs are being used, you can simply plug them right into the FPGA without using a breadboard or jumpers as shown by the author.

The entire project uses a simple architecture that houses 5 key components which are the LFSR, Score keeper, Clock divider, LED controller and the 7 segment display. Each component significance and working principle has been detailed by the author.

The coding has been done in simple modules and each module has been shared under the corresponding architectural component explanation. The coding language used is VHDL (.vhd) and the code is easy to follow and relate to.

Though the game is fun, there are a few bugs in the code which can be corrected to make the game truly addictive and perfect.

Whack down all those bugs and enjoy!

By fuzmike2

9 Easy Steps to Build a Photosensitive Synth Machine with FPGA

Tuesday, September 27th, 2016

https://youtu.be/2zdZzn7RD0Y

Hello FPGA lovers! Engineering traditional synth machines using development platforms like Arduino and FPGAs is becoming quite the trend now. Today’s post however takes a twist from the traditional synth machines where sounds are produced by either flicking switches or pressing buttons. The synth machine under discussion is a photosensitive synth machine which uses LDRs interfaced with FPGA in place of button switches and this gives an almost touch screen like feel to the device.

The Hardware required is a FPGA board (adaption may be required), 16 LDRs, 16 high value resistors, a speaker, adequate jumpers and 2 breadboards. The entire project has only 2 sets of hardware implementation off the FPGA board. A speaker is directly wired to the FPGA board besides 16 LDRs which function as the photosensitive keyboard. These LDRs work as a 16 bit Keyboard that inputs signals to the FPGA board to convert to sound signals. The connection diagrams and screen shots are given here.

The coding used for the project has been done in VHDL and the author has given the codes in different modules. The note decoder module on Step 2 is one of the most crucial modules in the whole code as it assigns a particular frequency for the 16 bit value from the LDR keyboard. The sound generator module on Step 4 is the next crucial module as it sends the respective frequency (pitch) values to the speaker interfaced with the FPGA.

Through this link you will find the ucf files for the project. This can be modified according to your convenience in case you would like to add more functionality like sustain buttons and other effects.

By Evan_Ashley_Lauren

Visualize Music with a Muscled FPGA

Tuesday, September 13th, 2016

Picture of LED Music Visualizer with Zybo Board

The Zybo Board is one of the most powerful tools in FPGA and this is because it is FPGA combined with an ARM processor that widens the spectrum of possibilities with FPGA. Today’s post is yet another dive into Zybo’s possibilities and in this project a visualization of audio signals or music will be accomplished. The author has been very detailed about this project and has explained every aspect of it in 18 steps.

The Hardware needed for carrying out this project are the Zybo Zynq 7000 FPGA board, a neo pixel LED matrix, a 5V 10 A power supply, a female DC power adapter, 3 pin male to male header, a 1mF capacitor, an audio splitter and some jumper wires. The connection diagram is provided by the author in step 17.

The code basically uses the principle of FFTs to detect frequency components in the audio file. Depending upon the magnitude of frequencies received, the LED display has been programmed to light up. 16 steps starting from opening Vivado to run the code to generating a bit file for the FPGA has been provided by the author. You can download a zip file which contains all modules relevant to the project. The author has used a combination of C, custom Verilog and HDL to code the project. This gives an ease in defining GPIO ports and makes the circuit a lot simpler.

Another interesting aspect is that the FPGA has been so coded that with the help of switches, your LED matrix can either act as a spectrogram or as a visualizer seen in media players.

Let me challenge you to achieve similar results adapting your own FPGA!

By jtdykstra

Build Your Own Globe of Persistence with FPGA

Thursday, September 8th, 2016

https://youtu.be/I-0oLg9Pwpk

Hey there FPGA lovers! The human eye is far from being perfect, and this imperfection helps us in coming up with a lot of ideas and products (take the television for example!). Today’s post exploits the Human eye’s persistence of vision to build a globe of persistence using FPGA. These globes can be used to build circular LED displays using just 1 column of LEDs which make them highly cost effective and fun to build with FPGA.

The trick when it comes to the globe of persistence is to balance the RPM of the globe and the timing of the LEDs switching colour. The author has shared details regarding the hardware needed for the project in the introduction. An FPGA board (you may need to adapt yours for this project), a neopixel 12 LED strip, a 12 wire slip ring, a photo interrupter and a photo interrupter breakout board, a 12V DC motor, a micro SD card and a cross compiler for ARM processors.

The project also needs an interfacing board for the FPGA and globe which has been explained in step 2. Building the globe’s mechanical structure with the DC motor has been explained in detail in step 5, and soldering the wires in the right way has been shared by the author too.

The author has gone to great lengths to explain how to execute the project. Step 1 gives complete details about generating an FSBL file and a PDF in case you have doubts. The coding for the project has been done in Linux. But even if you are unfamiliar with Linux, the author has explained Linux for FPGA in detail in steps 3 and 4. The code has been broken down to modules, and there are clear instructions available on how to program the FPGA. Step 7 is the final step that explains how to get your globe working, and also gives details regarding building custom applications using the globe of persistence and FPGA.

 Have fun!

By NicolasD3

How to Build an Arcade Obstacle Avoidance Game Using FPGA

Tuesday, September 6th, 2016

Image result for obstacle avoidance game

Hello FPGA innovators! Remember the arcade obstacle avoidance game where blocks of pixels fall on you and you steer clear of them moving left or right? Today’s project attempts to re engineer the same game using a VGA and FPGA. Here, a pseudo random code is used to generate obstacles that fall down and buttons on the FPGA are used to move the cursor so that none of the obstacles hit it.

The only hardware required to execute this project is an FPGA board (you might need to adapt yours if different from the author’s), a computer monitor and connection cables. This is because the FPGA board has inbuilt push buttons that can be used to move the cursor of the game, and also has the necessary DACs and VGA interfaces required to run the game.

The coding done by the author is in VHDL and everything starting from a functional flowchart to running the bit file for FPGA has been described from steps 1 to 9. Since the buttons on the FPGA has a bouncing issue, a separate debouncer code needs to be run which is available on step 2. Details regarding the VGA, coding for random obstacles and checking for collisions and updating the game are given from steps 3 to 7.

Though the authors put in 50+ hours of effort and made a great attempt, the game still could be done in a lot more simpler ways. The main code is available in the introduction to spare other followers from putting in more additional effort, but starting from choosing a different FPGA board to running through basics of other games implemented using VGA and FPGA can end up delivering something better with a lot less effort.

Give it a try and have fun!

Save on Your Electricity Bill with Your FPGA

Thursday, August 25th, 2016

https://youtu.be/Pi0lp_kIV58

Greetings FPGA innovators! Ever had the problem of forgetting to switch off the room lights on your way out? Do you have frequent guests who are not as mindful as you when it comes to power saving? In today’s project we see how to build a simple gadget with the FPGA to switch off your room lights once there is no one in. Not only will The FPGA trip light save power and work intelligently, but it will also help you cut power costs.

The Hardware needed for the project are a FPGA board (adaptation to your own device might be required), 2 off IR transceiver pairs, 4 off 1000 ohm resistors, 2 off 33 ohm resistors and 2 off 100 ohm resistors besides 2 breadboards and jumper wires. The author has shared details regarding the circuit setup, the FPGA board and the Breadboard connections in step 4. A housing model for the circuit has been shown in step 5 which will help the circuit to be used in a more compact and practical way.

The FPGA has been coded with the VHDL language. The black box diagram for implementing in the FPGA and its descriptions has been given in detail in step 2. The code has been divided into modules and has been given for ready availability in step 3.

The basic operation of the gadget is such that one transceiver pair counts the number of people entering the room, and the other counts the number of people leaving the room. The FPGA acts as a simple comparator and when both the counts are equal, the room lights are turned off.

 

By nyssabackes

Remotely Control your TV with Your FPGA

Tuesday, August 23rd, 2016

FQHFTBUIHWIKX7D.MEDIUM

Hello FPGA enthusiasts! The FPGA is truly a tool that can stretch the horizon of possibility and in today’s project we will find out how an FPGA can be used as an universal remote control. Ever had the problem of falling asleep while watching TV? Not anymore! The Universal Timed remote with FPGA is a timed remote which can be used to switch off any TV set once the timer ticks down!

The Hardware needed for this project are a FPGA Board, a breadboard, a 300 ohm resistor, male to male connecting wires and an IR LED and Sensor pair besides a TV set to test the device on. The circuit diagram has been given by the author in step 2.

The code has been written using VHDL and the VHDL setup for the FPGA is given in step 3. The code has been subdivided into modules and the whole file has also been attached in step 3 as a zip file. The main modules are the IR control and the Timer, which work in tandem to switch off the TV once the timer counts down.

Future enhancements and possible improvements have also been shared by the author. The timer can be set between 1 hour and 99 hours though it has been designed only to work for your own TV set. But a little bit of tweaking can make this a universal remote too!

 

By JoeD67

[DIY] How to Make a FPGA-based Electric Composer

Tuesday, June 28th, 2016

audio-wing2

Hello FPGA enthusiasts! Today’s project takes sound production using FPGA to another level. The project under focus is building an electric keyboard/composer using FPGA. The keyboard acts as a song tune composer where a network of switches on the FPGA board is connected in precedence such that while a switch is on, the corresponding note plays.

The major hardware components needed are just a FPGA board (you may need  to adapt this project to your own board), a speaker capable of playing a wide range of frequencies, and not just a monotone, and an auxiliary cable or suitable wires for connecting the speaker to the FPGA board.

The coding has been done using Xilinx ISE in the VHDL (.vhd). The author has given a detailed pin assignment as well as a basic VHDL background explanation. The code has been shared from step 5 to 9 and each module has been well explained by the author. The modules basically consist of a frequency division for playing different frequencies of sound and process statements for fixing parameters like precedence and sensitivity.

Setting the port map and executing the program has been explained in steps 10 and 11. By switching different switches you get different tones, though combinational tones cannot be made since precedence is followed.

The show must go on!

By krosenfeld7