Learn Functional Reactive Programming on Your Arduino

Everyone loves learning a new programming language, right? Well, even if you don’t like it, you should do it anyway, because thinking about problems from different perspectives is great for the imagination.

Juniper is a functional reactive programming language for the Arduino platform. What that means is that you’ll be writing your code using anonymous functions, map/fold operations, recursion, and signals. It’s like taking the event-driven style that you should be programming in one step further; you write a=b+3 and when b changes, the compiler takes care of changing a automatically for you. (That’s the “reactive” part.)

functionalIf you’re used to the first-do-this-then-do-that style of Arduino (and most C/C++) programming, this is going to be mind expanding. But we do notice that a lot of microcontroller code looks for changes in the environment, and then acts (more or less asynchronously) on that data. At that level of abstraction, something like Juniper looks like a good fit.

Continue reading “Learn Functional Reactive Programming on Your Arduino”

How to Have a Beer with Every Electronics Person

This has got to be the ultimate name-dropping post. I’m tempted just to make a list. Or perhaps it should be like Jeopardy, I’ll list the products or companies and you guess who was there. I am of course talking about the Hackaday Bay Area Maker Faire Meetup last Saturday which started off as a steady stream of Faire-weary exhibitors and suddenly the place was packed to the gills. Luckily we have some photographic evidence of the awesome.

Peter Jansen seen on the right
Peter Jansen seen on the right

If you do something three times you can start saying “always”, right? We always host a meetup on the Saturday night of Bay Area Maker Faire at O’Neill’s Irish Pub in San Mateo. It’s our kind of atmosphere: just enough room to set up hacks you tote along with you, they have Guinness, Lagunitas, and a few in-betweens on tap, you can bring in food from the various eateries that border the bar, and the staff is beyond awesome.

Despite my threat to call-out everyone by name, I’ll keep it to a minimum. It was most excellent meeting Peter Jansen who created the Open Source Science Tricorder, fourth place winner of the Hackaday Prize in 2014. I was glad to see Windell Oskay of Evil Mad Scientist Laboratories there since both Windell and Peter are Ph.D. Physicists. Of course it ended up they are able to converse with regular people too.

In the back Erick Schlaepfer was showing off his MOnSter6502 — check out the interview I did with him about it the day before. Astute readers will recognize who he’s showing that to: Hackaday Editor Emeritus Caleb Kraft stopped by on his way to the MAKE staff party. Somehow, although we shared a beer, neither of us thought of taking a picture together — perpetuating the mythos that Caleb is the Tyler Durden to my Tyler Durden. Incidentally, if anyone knows Chuck Palahniuk (or if he reads Hackaday which would be killer) we’d love to have him speak at SuperCon. Email me.

Also on the ‘didn’t get pictures of’ list is Anouk Wipprecht who stopped by later in the evening. I love her work and it was really great to meet her. Oops, and I’m not supposed to be dropping names. Paul Stoffregen (talking to Gerrit Coetzee and me in the bottom left corner of the image at the top of this post). Okay, enough of that.

There seemed to be a critical mass of Amp Hour elites on the scene. I grabbed this image from Chris Gammell’s Twitter. He snapped a still of Tony Long, Alan Yates, and Jeff Keyzer who have all been on the show (or hosted it). Karl Bowers, host of The Spark Gap podcast, photobombs on the left.

This barely brushes the tip of the iceberg. But I figure you get tired of hearing me prattle on. If you attended I’d love to see the photos you snapped, please link them in the comments below. And of course, if you do still want to play name-that-geek-celeb the comments are the place for it.

Thanks to Rich Hogben for taking all of these great photos and posting them up on Hackaday.io. I’d also like to thank Supplyframe for picking up everyone’s first round of drinks that night. Maker Faire has ended, but this evening will always have a special place in my heart. We look forward to seeing everyone there next year!

WTF is Degaussing?

The modern office has become a sea of LCD monitors. It’s hard to believe that only a few years ago we were sitting behind Cathode Ray Tubes (CRTs). People have already forgotten the heat, the dust, and the lovely high frequency squeal from their flyback transformers.

Image by Søren Peo Pedersen via wikipedia
Image by Søren Peo Pedersen via wikipedia

There was one feature of those old monitors which seems to be poorly understood. The lowly degauss button. On some monitors it was a physical button. On others, it was a magnet icon on the On Screen Display (OSD). Pressing it rewarded the user with around 5 seconds of a wavy display accompanied by a loud hum.

But what exactly did this button do? It seems that many never knew the purpose of that silly little button, beyond the light-and-sound show. The truth is that degaussing is rather important. Not only to CRTs, but in many other electronic and industrial applications.

 

Of Shadow Masks and Aperture Grilles

Close up of a shadow mask by Rauenstein via Wikipedia
Close up of a shadow mask by Rauenstein via Wikipedia

A CRT has quite a few components. There are three electron guns as well as steering and convergence coils at the rear (yoke) of the tube. The front of the tube has a phosphor-coated glass plate which forms the screen. Just behind that glass is a metal grid called the shadow mask. If you had enough money for a Sony screen, the shadow mask was replaced by the famous Trinitron aperture grille, a fine mesh of wires which performed a similar function. The shadow mask or aperture grille’s  job is to ensure that the right beams of electrons hit the red, green, or blue phosphor coatings on the front of the screen.

This all required a very precise alignment. Any stray magnetic fields imprinted on the mask would cause the electron beams to bend as they flew through the tube. Too strong a magnetic field, and your TV or monitor would start showing rainbows like something out of a 1960’s acid trip movie. Even the Earth’s own magnetic field could become imprinted on the shadow mask. Simply turning a TV from North to East could cause problems. The official term for it was “Color Purity”.

magnet-trickThese issues were well known from the early days of color TV sets. To combat this, manufacturers added a degaussing coil to their sets. A coil of wire wrapped around the front of the tube, just behind the bezel of the set. When the set was powered on, the coil would be fed with mains voltage. This is the well-known ‘fwoomp and buzz’ those old TV sets and monitors would make when you first turned them on. The 50 Hz or 60 Hz AC would create a strong moving magnetic field. This field would effectively erase the imprinted magnetic fields on the shadow mask or aperture grille.

Running high current through the thin degaussing coil would quickly lead to a fire. Sets avoided this by using a Positive Temperature Coefficient (PTC) thermistor in-line with the coil. The current itself (or a small heating coil) would heat up the PTC, causing resistance to increase, and current through the coil to drop. After about 5 seconds, the coil was completely shut down, and the screen was (hopefully) degaussed.

As time went on monitors became embedded systems. The PTC devices were replaced by transistors controlled by the monitor’s main microcontroller. Monitor manufacturers knew that their sets were higher resolution than the average TV set, and thus even more sensitive to magnetic fields. Users are also more likely to move a monitor while using it. This lead the manufacturers to add a degauss button to the front of their sets. A push of the button would energize the coil for a few seconds under software control. Some monitors would also limit the number of times a user could push the button, ensuring the coil didn’t get too hot.

Holding a magnet near the front of a black and white (or a monochrome ‘green screen’) CRT created visible distortion, but no lasting damage. Mid-century hackers who tried the same trick with their first color TV quickly learned that the rainbow effect stayed long after the magnet was moved away. In extreme cases like these, the internal degaussing coil wouldn’t be strong enough to clear the shadow mask.

Commercial degaussing coil
Commercial degaussing coil

When all else failed, a handheld degaussing coil or wand could be used. Literally waving the magic wand in front of the screen would usually clear things up. It was of course possible to permanently damage the shadow mask. Back in 2007, I was working for a radar company which had been slow to switch to LCD monitors. Being a radar shop, we had a few strong magnetron magnets lying around. One of these magnets was passed around among the engineers. Leaving the magnet under your monitor overnight would guarantee rainbows in the morning, and a shiny new LCD within a few days.

1024px-RMS_Queen_Mary_20Jun1945_NewYork
Queen Mary, showing her degaussing coil

CRTs aren’t the only devices which use degaussing coils. The term was originally coined in 1945 by Charles F. Goodeve of the Royal Canadian Naval Volunteer Reserve (RCNVR). German mines were capable of detecting the magnetic fields in a naval ship’s steel hull. Coils were used to mask this field. The Queen Mary is one of the more famous ships fitted with a degaussing coil to avoid the deadly mines.

Even mechanical wristwatches can benefit from a bit of degaussing. A watch which has been magnetized will typically run fast. Typically this is due to the steel balance spring becoming a weak magnet. The coils of the spring stick together as the balance wheel winds and unwinds each second. A degaussing coil (or in this case, more properly a demagnetizer) can quickly eliminate the problem.

A story on degaussing wouldn’t be complete without mentioning magnetic media. Handheld or tabletop degaussing coils can be used to bulk erase floppy disks, magnetic tape, even hard disks. One has to wonder if the degaussing coils in monitors were responsible for floppy disks becoming corrupted back in the old days.

So there you have it. The magic degaussing button demystified!

The Booths Of Hamvention

Hamvention was last weekend in Dayton, Ohio. Last weekend was also the Bay Area Maker Faire, and if you want tens of thousands of people who actually make stuff there’s really only one place to be. Bonus: you can also check out the US Air Force Museum at Wright-Patterson AFB. The ‘Space’ hangar was closed, so that’ll be another trip next year.

The biggest draw for Hamvention is the swap meet. Every year, thousands of cars pull up, set up a few tables and tents, and hock their wares. Everything from radios from the 1920s to computers from the 1980s can be found at the swap meet. This post is not about the swap meet; I still have several hundred pictures to go through, organize, label, and upload. Instead, this post is about the booths of Hamvention. Everything imaginable could be found at Hamvention, from the usual ARRL folks, to the preppers selling expired MREs, and even a few heros of Open Hardware.

SatNOGS

The elevation axis of a SatNOGS ground station
The elevation axis of a SatNOGS ground station

In 2014, Hackaday did something spectacular. We launched The Hackaday Prize, and gave everyone the opportunity to build Open Hardware with the chance to get paid for the same. The first grand prize winner of the Hackaday Prize was SatNOGS, a global network of satellite ground stations.

SatNOGS was founded after the realization that there are hundreds of cubesats and other amateur satellites being dumped into Low Earth Orbit. Most of these cubesats are from universities, with a few from high schools around the world. Getting data from these satellites requires a ground station, and if each cubesat only has one ground station, that satellite is only usable for a few minutes each day when it passes over home base.

SatNOGSSatNOGS is the solution to this problem. It’s a relatively simple device – just a few antennas mounted to a motorize platform, and connected to the Internet with a Raspberry Pi or BeagleBone. By connecting antennas around the globe to the Internet, the SatNOGS team can schedule observations for each individual ground station. This means more data and better science for every amateur cubesat.

While most of the SatNOGS team is busy with the Libre Space Foundation, the not-for-profit founded with Hackaday Prize money, there was enough cash to send a few SatNOGS enthusiasts out to Hamvention. [Corey], aka KB9JHU, from Bloomington, Indiana and SatNOGS station number two brought the team out. He’s been running his station for a while, and there are a few takeaways from his experiences in operating a 3D printed, robotic antenna for a few years. Printing parts in PLA works, surprisingly. There really isn’t much degradation of the 3D printed gears. Weatherproofing is relatively easy, but bug-proofing is not. There was talk of bees before I phased out of the conversation after realizing I don’t know if I’m allergic to bees. There are more SatNOGS stations coming online, and there should be reasonable coverage over most population centers by the time the Libre Space Foundation puts their satellite into orbit.

SDR Wizardry From Colorado

Electronic wizard and SDR hipster [Michael Ossman] was at Hamvention, showing off the latest of his SDR goodies.

The PortaPack for the HackRF One
The PortaPack for the HackRF One

[Ossmann] is famous around these part for the HackRF One, a software defined radio that’s good from 1MHz to 6GHz. Everything you could ever want is in this band, and the HackRF One transmits, too. He and his buddies were showing off the PortaPack, a ‘shield’, for lack of a better term, for the HackRF One that allows for portable control of the SDR. It’s a display, an old iPod scroll wheel thingy, and a shell to protect everything.

Sometimes you don’t need a good SDR that goes all the way into GHz territory, and for that [Ossmann] has the YARD Stick One. It’s sub-1GHz, based on the IM-Me radio circuit. For the booth demo, the Great Scott Gadgets crew connected a bicycle pump to an MDF box with an acrylic lid. Pop in a tire pressure monitor, and you have an excellent demo for receiving sub-GHz wireless transmissions.

The SEC Has a Thing for Crowdfunding

Kickstarter is not a store. Indiegogo is not a store. No matter what crowdfunding platform you’re on, you’re not in a store. This is an undeniable truth, and no matter how angry you are about not being able to bring a cooler with a blender to the beach this summer, you did not buy this cool cooler, you were merely giving someone money to develop this cooler.

This reality may seem strange for the most vocal Internet commenters out there, leading them to the conclusion their pledge for a crowdfunding campaign was an investment. Surely there must be some guarantee in a single pledge, and if it’s not exchanging money for some consumer goods, it is exchanging money for a stake in a company. If that were true, backers of the Oculus Rift would have received several thousand dollars each, instead of a $600 VR headset.

Crowdfunding is not a store, and according to Kickstarter and Indiegogo, it is not an investment, either. Last week, the Securities and Exchange Commission’s rules for “crowdfunded investing”, “Regulation Crowdfunding”, or “Title III Crowdfunding” kicked into gear. Is this the beginning of slack-jawed gawkers throwing their life savings into a pit of despair filled with idiotic consumer products that violate the laws of physics?

Continue reading “The SEC Has a Thing for Crowdfunding”

Meter All The Phases: Three Phase Energy Meter With OpenWrt

Keeping track your overall electricity usage is a good thing, and it’s even better if you know where all the kilowatt-hours are going. [Anurag Chugh’s] house has the three phases coming from the electrical distribution box tidily organized: One for the lighting and fans, one for household appliances, and one for the hot water supply. To monitor and analyze the electrical fingerprint of his house, [Anurag] installed a 3 phase energy meter and hooked it up to the internet.

Continue reading “Meter All The Phases: Three Phase Energy Meter With OpenWrt”

Black Line Follower: A Modern Bristlebot

It’s been a while since we’ve seen much action on the bristlebot front, which is too bad. So we’re happy to see [Extreme Electronics]’s take on the classic introductory “robot”: the Black Line Follower. The beauty of these things is their simplicity, so we’ll just point you to his build instructions and leave the rest to you.

The original bristlebot is a fantastic introduction to electronics, because it’s simple enough that you can cobble one together in no time. A battery, a pager motor, and a toothbrush head are all you need. But it goes where it wants, rather than where you want it to go.

Adding steering is as simple as tying two bristlebots together and firing one motor at a time to execute a turn. The Black Line Follower is of this style.

Of course, any good idea can be taken to extremes, as in this giant weight-shifting bristlebot, or this super-tiny IR-controlled bristlebot.

But that was more than five years ago now. What happened to the mighty engines of bristlebot creativity? Has the b-bot seen its finest hour? Or are we just waiting for the next generation to wiggle up to the plate?

Continue reading “Black Line Follower: A Modern Bristlebot”