Counting Really, Really Fast With An FPGA

fast

During one of [Michael]’s many forum lurking sessions, he came across a discussion about frequency counting on a CPLD. He wondered if he could do the same on an FPGA, and how hard it would be to count high clock rates. As it turns out, it’s pretty hard with a naive solution. Being a bit more clever turns the task into a cakewalk, with a low-end FPGA being able to count clocks over 500 MHz.

The simplest solution for counting a clock would be to count a clock for a second with a huge, 30-bit counter. This is a terrible idea: long counters have a lot of propagation delays. Also, any sampling would have to run at least twice as fast as the input signal – not a great idea if you’re counting really fast clocks.

The solution is to have the input signal drive a very small counter – only five bits – and sample the counter using a slower clock on board the FPGA. [Michael] used a 5-bit Gray code, getting rid of the problem of the ‘11111’ to ‘00000’ rollover of a normal binary counter.

Because [Michael] is using a 5 bit clock with 31 edges sampled at 32 MHz, he can theoretically sample a 992 MHz clock. There isn’t a chance in hell of the Spartan 6 on his Papilio Pro board ever being able to measure that, but he is able to measure a 500 MHz clock, something that would be impossible without his clever bit of code.

A Tiny Robot Family

Back in the late 80s and early 90s, a lot of young electronics hobbyists cut their teeth with BEAM robots – small robots made with logic chips and recycled walkmans that tore a page from papers on neural nets and the AI renaissance of the 80s. Twenty years later, a second AI renaissance never happened because a generation of genius programmers decided the best use of their mental faculties was to sell ads on the Internet. We got the Arduino, though, and the tiny robot family is a more than sufficient spiritual successor to the digital life of the old BEAM bots.

The tiny robot family is [shlonkin]’s growing collection of small autonomous vehicles that perceive the world with sensors and act with different behaviors. They all contain an ATtiny85, a small battery, two motors, and at least one phototransistor and a LED. One robot has left and right eyes pointing down, and can act as a line follower. Another has a group of LEDs around its body, allowing it to signal other bots in all directions. The goal of the project is to create a whole series of these tiny robots capable of interacting with the environment and each other. Video of the line follower below.

Continue reading “A Tiny Robot Family”

2600 And Why Publishing Sucks

26002600: The Hacker Quarterly is the premier (print) infosec publication out there, and depending on who you talk to, the best publication out there that has anything to do with modifying electronics, infiltrating networks, and all the other goodies we post on a daily basis. They’ve also been around for longer than most of our readership, and to lose them would be a terrible loss for anyone who calls themselves a hacker.

Being a print publication, they are completely at the mercy of their distributors. Any sort of media is a very, very dirty business, so when 2600’s distributors recently decided to not pay them for a few previous issues… well, that’s a problem.

2600’s most recent distributor, Source Interlink, was recently dropped as the distributor for Time, throwing the entire company into panic mode. Source Interlink then rebranded itself as TEN: The Enthusiast Network, distributing a disturbing amount of hotrod magazines to bookstores across the country. With this change in names and a little corporatespeak, TEN: The Enthusiast Network has yet to pay 2600 what they’re due.

This isn’t the first time 2600 has faced near oblivion thanks to a distributor. They almost went out of business in 1997 when their distributor declared bankruptcy. 2600 have proven themselves to be resilient folk, though, and all bets are on them making it through this little impasse. Still, they’re still out six months worth of revenue, deep in debt, and they’re putting on a huge conference in a few weeks. It’s really not good timing.

If you’d like to help 2600, buy July’s issue, make them number 1 on Kindle, or buy a ticket for HOPE X. Hackaday is going to have a booth there (awesome!), and we’ll be putting a post up on that when  the already amazing list of speakers is finalized.

Automatic Audio Leveling Circuit Makes Scanning More Fun

alan-scope1

[Alan’s] friend came to him with a problem. He loved listening to his scanner, but hated the volume differences between stations. Some transmitters would be very low volume, others would nearly blow his speakers. To solve the problem, [Alan] built up a quick automatic leveling circuit (YouTube link) from parts he had around the lab.

[Alan’s] calan-scope2ircuit isn’t new, he states right in the video that various audio limiting, compressing, and automatic gain control circuits have been passed around the internet for years. What he’s brought to the table is his usual flair for explaining the circuits’ operation, with plenty of examples using the oscilloscope. (For those that don’t know, when [Alan] isn’t building circuits for fun, he’s an RF applications engineer at Tektronix).

Alan’s circuit is essentially an attenuator. It takes speaker level audio in (exactly what you’d have in a desktop scanner) and outputs a limited signal at about 50mv peak to peak, which is enough to drive an auxiliary amplifier. The attenuator is made up of a resistor and a pair of 1N34A Germanium diodes. The more bias current applied to the diodes, the more they will attenuate the main audio signal. The diode bias current is created by a transistor-based peak detector circuit driven off the main audio signal.
But don’t just take our word for it, watch the video after the break.

Continue reading “Automatic Audio Leveling Circuit Makes Scanning More Fun”

Xkcd’s Virus Aquarium Made Real

A surprising number of projects here are in some way influenced by the webcomic xkcd, but usually not as directly as this. Comic 350, “Network” is the tale of a very odd stickman who keeps multiple VMs running an unprotected, old version of Windows. Between the VMs, they have virtually every virus and are, effectively, a computer virus aquarium.

Now it’s a real thing, and best of all, it’s open to the Internet for normal humans to view, complete with screencaps of all seven nodes updated every 30 seconds, the ability to view all processes on each node, and anyone on the Internet can upload any file to a node. All the files uploaded to the nodes are executed, so you get to see in real-time what the effects of “1TB_of_porn_this_took_a_while_to_upload.exe” are on node 3.

The idea of a virus aquarium is cool, but this actually gets much, much more interesting when the project metas itself. Every 24 hours, a virus scanner runs on each node. As of right now, all the nodes are clean making this not a virus aquarium, but a script kiddie aquarium. On at least one node, TeamViewer is running but your guess is as good as mine as to how anyone will get that working.

Continue reading “Xkcd’s Virus Aquarium Made Real”

WiFinder Is A Python Driven Roommate Warning System

WiFinder

We’ve all been there. Your roommate is finally out of the house and you have some time alone. Wait a minute… your roommate never said when they would be back. It would be nice to be warned ahead of time. What should you do? [Mattia] racked his brain for a solution to this problem when he realized it was so simple. His roommates have been warning him all along. He just wasn’t listening.

Most Hackaday readers probably have a WiFi network in their homes. Most people nowadays have mobile phones that are configured to automatically connect to these networks when they are in range. This is usually smart because it can save you money by not using your expensive 4G data plan. [Mattia] realized that he can just watch the wireless network to see when his roommates’ phones suddenly appear. If their devices appear on the network, it’s likely that they have just arrived and are on their way to the front door.

Enter wifinder. Wifinder is a simple Python script that Mattia wrote to constantly scan the network and alert him to new devices. Once his roommates are gone, Mattia can start the script. It will then run NMap to get a list of all devices on the network. It periodically runs NMap after this, comparing the new host list to the old one. If any new devices show up, it alerts with an audible beep and a rather hilarious output string. This type of scanning is nothing new to those in the network security field, but the use case is rather novel.

Fold-out Laser Cutter Prototype Promises Portability (But Maybe Not Safety)

 

fold out laser cutter

Often times it’s tricky to make space for a full size laser cutter… so a group of friends over at Pittsburgh TechShop have been working on designing a fold-out version for easy storage. It’s still a prototype/proof of concept, so we’ll overlook the obvious safety concerns for now.

It’s built predominately out of aluminum extrusion and a few custom machined parts. A 40W CO2 laser tube sits in the back with optics reflecting it out to the laser head. The X-axis pivots on a heavy duty hinge mechanism and then locks in place for use. Unfortunately there are no videos of it in action, but the whole arm-linkage is apparently quite rigid and robust.

Like we said, this is one of their first prototypes or proofs of concept — as they continue to enhance the design they are considering taking it to Kickstarter down the road. They plan on enclosing the beam path in order to make it safe, and we’ll certainly be interested to see how that works out!

For more info on the project, there’s a thread on Reddit going strong.

[Thanks Ollie!]