MicroDMA And LEDs

[Jordan] has been playing around with WS2812b RGB LED strips with TI’s Tiva and Stellaris Launchpads. He’s been using the SPI lines to drive data to the LED strip, but this method means the processor is spending a lot of time grabbing data from a memory location and shuffling it out the SPI output register. It’s a great opportunity to learn about the μDMA available on these chips, and to write a library that uses DMA to control larger numbers of LEDs than a SPI peripheral could handle with a naive bit of code.

DMA is a powerful tool – instead of wasting processor cycles on moving bits back and forth between memory and a peripheral, the DMA controller does the same thing all by its lonesome, freeing up the CPU to do real work. TI’s Tiva C series and Stellaris LaunchPads have a μDMA controller with 32 channels, each of which has four unique hardware peripherals it can interact with or used for DMA transfer.

[Jordan] wrote a simple library that can be used to control a chain of WS2812b LEDs using the SPI peripheral. It’s much faster than transferring bits to the SPI peripheral with the CPU, and updating the frames for the LED strip are easier; new frames of a LED animation can be called from the main loop, or the DMA can just start again, without wasting precious CPU cycles updating some LEDs.

Scope Noob: Bridge Rectifier

Welcome back to this week’s installment of Scope Noob where I’m sharing my experiences learning to use my first oscilloscope. Last week I started out measuring mains frequency using an AC-AC wall wart adapter. Homework, for those following along, was to build a bridge rectifier and probe the signals from it. Let’s take a look.

Continue reading “Scope Noob: Bridge Rectifier”

Astrophotography And Data-Analysis Sense Exoplanets

[David Schneider] was reading about recent discoveries of exoplanets. Simply put these are planets orbiting stars other than the sun. The rigs used by the research scientists include massive telescopes, but the fact that they’re using CCD sensors led [David] to wonder if a version of this could be done on the cheap in the backyard. The answer is yes. By capturing and processing data from a barn door tracker he was able to verify a known exoplanet.

Barn Door trackers are devices used to move a camera to compensate for the turning of the earth. This is necessary when taking images throughout the night, as the stars will not remain “stationary” to the camera’s frame without it. The good news is that they’re simple to build, we’ve seen a few over the years.

Other than having to wait until his part of the earth was pointed in the correct direction (on a clear night) at the same time as an exoplanet transit, [David] was ready to harvest all the data he needed. This part gets interesting really quickly. The camera needed to catch the planet passing in between the earth and the star it revolves around (called a transit). The data to prove this happened is really subtle. To uncover it [David] needed to control the data set for atmospheric changes by referencing several other stars. From there he focused on the data for the transit target and compared points across the entire set of captured images. The result is a dip in brightness that matches the specifications of the original discovery.

[David] explains the entire process in the clip after the break.

Continue reading “Astrophotography And Data-Analysis Sense Exoplanets”

Improving The T-962 Reflow Oven

The T-962A is a very popular reflow oven available through the usual kinda-shady retail channels. It’s pretty cheap, and therefore popular, and the construction actually isn’t abysmal. The controller for this oven is downright terrible, and [wj] has been working on a replacement firmware for the horribly broken one provided with this oven. It’s open source, and the only thing you need to update your oven is a TTL/UART interface.

[WJ] bought his T-962A even after seeing some of the negative reviews that suggested replacing the existing controller and display. This is not in true hacker fashion – there’s already a microcontroller and display on the board.

The new firmware uses the existing hardware and adds a very necessary modification: stock, the oven makes the assumption that the cold-junction of the thermocouples is at 20°C. The controller sits on top of an oven with two TRIACs nearby, so this isn’t the case, making the temperature calibration of the oven slightly terrible.

After poking around the board, [WJ] found an LPC2000-series microcontroller and a spare GPIO pin for a 1-wire temperature sensor. The temperature sensor is placed right next to the terminal block for the thermocouples for proper temperature sensing.

All the details of updating the firmware appear on a wiki, and the only thing required to update the firmware is a serial/USB/UART converter. A much better solution than ripping out the controller and replacing it with a custom one.

Announcing The Trinket Everyday Carry Contest

Now that we’ve recovered from our Munich party and the awarding of The Hackaday Prize, we’re ready to announce our latest contest. We’ve been having a lot of fun with our Trinket Pro boards, both the 10th anniversary edition and the new Hackaday.io branded models.  While we were soldering, compiling, and downloading, a contest idea took root. Trinket Pro really excels when used in small projects, the kind which would fit in a pocket. To that end we’re holding the Trinket Everyday Carry Contest, a showcase for small, pocketable projects which are useful everyday. ‘Useful everyday’ is a bit of a broad term, and we intended it that way. Tools are useful of course , but so are jewelry pieces. It’s all in the eye of the builder and users. We’re sure our readers will take this and run with it, as they have with our previous contests.

There are some great prizes in store for the entrants, including a brand new Rigol DS1054Z  oscilloscope! The top 50 entrants will get custom Trinket Everyday Carry Contest T-shirts. Check out the contest page for a full list. 

submit-project-to-trinket-edcWe know you all love to procrastinate with your entries, so we’re going to be offering a few perks to those who enter early and update often. Each week, we’ll throw all the entrants who have published at least one project log full of details into a drawing for a special prize from The Hackaday Store. To be considered you must officially submit your project which is accomplished through a drop-down list on the left side of your project page.

Remember, the contest isn’t just about winning a scope, a meter, or any of the other prizes. It’s about creating new Open Hardware designs that nearly anyone can build. So grab those soldering irons, load up those copies of the Arduino IDE, AVR-GCC, or WinAVR, and get hacking!

You can view the all of the contest entries in this list.

Direct Digital Synthesis (DDS)

Direct Digital Synthesis (DDS) Explained By [Bil Herd]

One of the acronyms you may hear thrown around is DDS which stands for Direct Digital Synthesis. DDS can be as simple as taking a digital value — a collection of ones and zeroes — and processing it through a Digital to Analog Converter (DAC) circuit. For example, if the digital source is the output of a counter that counts up to a maximum value and resets then the output of the DAC would be a ramp (analog signal) that increases in voltage until it resets back to its starting voltage.

This concept can be very useful for creating signals for use in a project or as a poor-man’s version of a signal or function generator. With this in mind I set out here to demonstrate some basic waveforms using programmable logic for flexibility, and a small collection of resistors to act as a cheap DAC. In the end I will also demonstrate an off-the-shelf and inexpensive DDS chip that can be used with any of the popular micro-controller boards available that support SPI serial communication.

All of the topics covered in the video are also discussed further after the break.

Continue reading “Direct Digital Synthesis (DDS) Explained By [Bil Herd]”

[Sprite_TM]’s Keyboard Plays Snake

Hackaday Prize judge, hacker extraordinaire, and generally awesome dude [Sprite_TM] spends a lot of time at his computer, and that means a lot of time typing on his keyboard. He recently picked up a board with the latest fad in the world of keyboards, a board with individually addressable LEDs. He took this board to work and a colleague jokingly said, ‘You’ve had this keyboard for 24 hours now, and it has a bunch of LEDs and some arrow keys. I’m disappointed you haven’t got Snake running on it yet.” Thus began the quest to put the one game found on all Nokia phones on a keyboard.

The keyboard in question is a Coolermaster Quickfire Rapid-I, a board that’s marketed as having an ARM Cortex CPU. Pulling apart the board, [Sprite] found a bunch of MX Browns, some LEDs, and a 72MHz ARM Cortex-M3 with 127k of Flash and 32k of RAM. That’s an incredible amount of processing power for a keyboard, and after finding the SWD port, [Sprite] attempted to dump the Flash. The security bit was set. There was another way, however.

Coolermaster is actively working on the firmware, killing bugs, adding lighting modes, and putting all these updates on their website. The firmware updater is distributed as an executable with US and EU versions; the EU version has another key. Figuring the only difference between these versions would be the firmware itself, [Sprite] got his hands on both versions, did a binary diff, and found only one 16k block of data at the end of the file was different. There’s the firmware. It was XOR encrypted, but that’s obvious if you know what to look for.

flashdata The firmware wasn’t complete, though; there were jumps to places outside the code [Sprite] had and a large block looked corrupted. There’s another thing you can do with an executable file: run it. With USBPcap running in the background while executing the firmware updater, [Sprite] could read exactly what was happening when the keyboard was updating. With a small executable that gets around the weirdness of the updater, [Sprite] had a backup copy of the keyboard’s firmware. Even if he bricked the keyboard, he could always bring it back to a stock state. It was time to program Snake.

The first part of writing new firmware was finding a place that had some Flash and RAM to store the new code. This wasn’t hard; there was 64k of Flash free and 28K of unused RAM. The calls to the Snake routine were modified from the variables the original firmware had. If, for example, the original keyboard had a call to change the PWM, [Sprite] could change that to the Snake routine.

Snake is fun, but with a huge, powerful ARM in a device that people will just plug into their keyboard, there’s a lot more you can do with a hacked keyboard. Keyloggers and a BadUSB are extremely possible, especially with firmware that can be updated from a computer. To counter that, [Sprite] added the requirement for a physical condition in order to enter Flash mode. Now, the firmware will only update for about 10 seconds after pressing the fn+f key combination.

There’s more to playing Snake on a keyboard; Sprite has also written a new lighting mode, a fluid simulation thingy that will surely annoy anyone who can’t touch type. You can see the videos of that below.

Continue reading “[Sprite_TM]’s Keyboard Plays Snake”