Reading Resistors With OpenCV

Here’s a tip from a wizened engineer I’ve heard several times. If you’re poking around a circuit that has failed, look at the resistor color codes. Sometimes, if a resistor overheats, the color code bands will change color – orange to brown, blue to black, and so forth. If you know your preferred numbers for resistors, you might find a resistor with a value that isn’t made. This is where the circuit was overheating, and you’re probably very close to discovering the problem.

The problem with this technique is that you have to look at and decode all the resistors. If automation and computer vision is more your thing, [Parth] made an Android app that will automatically tell you the value of a resistor by pointing a camera at it.

The code uses OpenCV to scan a small line of pixels in the middle of the screen. Colors are extracted from this, and the value of the resistor is displayed on the screen. It’s perfect for scanning through a few hundred through hole resistors, if you don’t want to learn the politically correct mnemonic they’re teaching these days.

Video below, and the app is available for free on the Google Play store.

Continue reading “Reading Resistors With OpenCV”

Hackaday Prize Entry: A 7805 Replacement

The 7805 voltage regulator is a great device if you want a simple way of bringing a voltage down to 5V. It’s a three-pin, one-component solution that puts out five volts and a lot of heat. Simple, not efficient. For his Hackaday Prize entry, [K.C. Lee] is working on a much more efficient drop-in replacement for the 7805.

Linear regulators like the 7805 are great, but they’re not terribly efficient. Depending on the input voltage you might see 50% efficiency. Going to a switch mode supply, that efficiency shoot up to about 90%.

For his drop-in replacement, [K.C. Lee] is using the LM3485, a switch mode regulator that only needs a few extra parts to turn it into a replacement for the 7805. You will need a cap on the input, but you should already be putting those in your circuit anyway, right?

The 2015 Hackaday Prize is sponsored by:

An Amazon Dash-Like Button For The ESP8266

The Amazon Dash Button is a tiny piece of hardware that contains a single pushbutton, a WiFi module, and a nice, shiny corporate logo. Press the button, and products with that logo will be delivered to your house. An impressive bit of marketing, at least. With small, cheap WiFi modules like the ESP8266, it was only a matter of time until something an Amazon Dash clone was developed.

[deqing] created an ESP8266 Dash Button using the ESP-12 module, a button, a 3D printed case, and a pair of AA batteries. Electronically, it’s extremely simple; press the button, the ESP will wake up, request a URL, and put itself back to sleep. That’s all you need to do when you’re replicating the functionality of the Amazon Dash Button – the server will take care of the rest.

To configure the ESP8266, [dequng] is using the ESP-TOUCH app for Android, and setting up new functionality in this ESP button is as simple as putting a URL in the button’s Flash.

Not only is this a great build that has literally hundreds of different uses, it’s also not a breakout board for the ESP8266. It’s great that we’re finally seeing some builds using this cheap WiFi chip in the real world.

Obviously the actual Dash buttons include authentication that this one does not. We recently saw a teardown of the original hardware. We’re still waiting for in-depth analysis of the data squirted to the internet when an order is placed with it, though.

Racing The Beam With Super Hexagon

Early game consoles like the Atari 2600 had a very, very limited amount of RAM. There wasn’t even enough RAM for all the pixels on the screen; instead, pixels were generated by the CPU as they were being drawn. It’s playing with scanlines and colorbusts with code, something we’re now calling. ‘racing the beam’ for some reason.

[Sam] is in the middle of an EE degree right now, and for a digital design class he needed to write some Verilog. At the time he was addicted to the game Super Hexagon, and the game mechanics are simple enough for an FPGA. He built his own implementation, but not one with framebuffers. He’s using a pipelined approach where each pixel’s value is calculated just a few clock cycles before it’s displayed. It vastly reduces the memory requirements, on his Altera DE1 board compared to the framebuffer approach.

Video below.

Continue reading “Racing The Beam With Super Hexagon”

Hackaday Prize Entry: A Pic32 Game Console

The official theme of the 2015 Hackaday Prize is to build something that matters. Solving the challenges facing the world is hard, and retro video games, despite what you read on Hackaday, do not matter.

That doesn’t mean there’s not space for the weird, esoteric builds out there; we have a best product prize that will dump $100k, a six month residency in the Hackaday Design Lab, and contacts with a lot of engineers with expertise in manufacturing. [Alex]’s extremely ow cost game console on a Pic32 is exactly what this prize category is looking for.

[Alex]’s project – XORYA – is based on the Pic32MX170F256, a chip that runs up to 50MHz, has 256kB of flash, and a full 64k of RAM. This is far beyond what the guys at Atari imagined back in the 70s, allowing the XORYA to have some amazing graphics.

Right now most of the build is dedicated to fleshing out the video system, and [Alex] has a great demo: rendering the Mandelbrot set in real time in 16 colors on an NTSC display with a resolution of 160×100. That’s a single-chip game console that’s right up there with the Uzebox, and a great example of the potential of the best product category for this year’s Hackaday Prize.

The 2015 Hackaday Prize is sponsored by:

Inside The Amazon Dash Button

The Amazon Dash Button is a tiny WiFi-enabled device that’s a simple button with a logo on the front. If you get the Tide-branded version, simply press the button and a bottle of laundry detergent will show up at your door in a few days. Get the Huggies-branded version, and a box of diapers will show up. Get the sugar-free Haribo gummi bear-branded version, and horrible evil will be at your doorstep shortly.

[Matt] picked up one of these Dash Buttons for 99 cents, and since a button completely dedicated to buying detergent wasn’t a priority, he decided to tear it apart.

The FCC ID reveals the Amazon Dash Button is a WiFi device, despite rumors of it having a Bluetooth radio. It’s powered by a single AA battery, and [Matt] posted pictures of the entire board.

Since this piece of Amazon electronics is being sold for 99 cents, whatever WiFi radio chip is inside the Dash Button could be used for some very interesting applications. If you have an idea of what chips are being used in [Matt]’s pictures, leave a note in the comments.

Xilinx Borrows Code For Their Own Devices

Back in 2012, [tmbinc] discovered a neat little undocumented feature in the Xilinx ISE: the ability to use TCP/IP instead of JTAG cables. [tmbinc] was working on an Open Hardware USB analyzer and discovered the nearly undocumented Xilinx Virtual Cable, a single ‘shift’ command that opens up a TCP connection and sends JTAG data out to another computer on the network. It’s extraordinarily useful, [tmbinc] wrote a daemon for this tool, and everything was right with the world.

Yesterday, [tmbinc] discovered the Xilinx Virtual Cable again, this time in one of Xilinx’s Github repos. The code was extraordinarily familiar, and looking closer at a few of the revisions, he saw it was very similar to code he had written three years ago.

The offending revision in the Xilinx repo is nearly identical to [tmbinc]’s Xilinx Virtual Cable Driver daemon. Variable names are the same, the variables are declared in the same order, and apart from whitespace, code conventions are the same. This is not to say someone at Xilinx stole code from [tmbinc], but if this were a computer science lab, there would be an academic disciplinary hearing. What’s worse, Xilinx plastered their copyright notice at the top of the code.

In an issue [tmbinc] raised, he said he was flattered, but clarified that his code was developed entirely from scratch. He believes the Xilinx code was derived from his own code written three years ago. Since [tmbinc]’s code was uploaded without a license, it defaulted to All Rights Reserved. This does not bode well for the Xilinx legal department.

In any event, you really, really have to wonder what Xilinx’s internal documentation looks like if a random person on the Internet can discover a barely-documented protocol, write a daemon, put it on the Internet, and have someone at Xilinx use that code.

Thanks to the anonymous tipster for sending this into the Hackaday tip jar.