How-To: Mapping Server Hits With ESP8266 And WS2812

It has never been easier to build displays for custom data visualization than it is right now. I just finished one for my office — as a security researcher I wanted a physical map that will show me from where on the planet my server is being attacked. But the same fabrication techniques, hardware, and network resources can be put to work for just about any other purpose. If you’re new to hardware, this is an easy to follow guide. If you’re new to server-side code, maybe you’ll find it equally interesting.

I used an ESP8266 module with a small 128×32 pixel OLED display connected via an SSD1306 controller. The map itself doesn’t have to be very accurate, roughly knowing the country would suffice, as it was more a decorative piece than a functional one. It’s a good excuse to put the 5 meter WS2812B LED strip I had on the shelf to use.

The project itself can be roughly divided into 3 parts:

  1. Physical and hardware build
  2. ESP8266 firmware
  3. Server-side code

It’s a relatively simple build that one can do over a weekend. It mashes together LED strips, ESP8266 wifi, OLED displays, server-side code, python, geoip location, scapy, and so on… you know, fun stuff.

Continue reading “How-To: Mapping Server Hits With ESP8266 And WS2812”

Junkbox MIDI

Do you ever peer into the void…of your hardware scrap box? It may be a wonderland of parts with near-infinite potential, and they just need to be assembled and depending on what you hoard, programmed. Access to a laser engraver doesn’t hurt either. The stuff in [Mr. Sobolak]’s bin is cooler than average, at least by Hackaday writer standards. His sound palette project is a wild mixture of interfaces, hardware, channels, and color. There are arcade pushbuttons, slider potentiometers, rotary potentiometers, miniature laser harp, touch piano, and drum pads which earns the title of junk box build extraordinaire.

Under the hood, we find the usual copper tape, wire and solder connecting operators to a Teensy 3.2. In the more esoteric part of the BOM, we find some fancy SoftPots which look like great fun to play. All the code is linked in the Instructable, but there is absolutely no reason to make an exact copy. MIDI is from the 80s and libraries abound for this protocol so the building may be the hardest part of making an interface that fits your character. Some of the techniques in the Instructable may help you, like how to connect a piezo element so it can read something lighter than a wrecking ball or the laser harp roughly the size of your palm.

We are not short of MIDI interfaces if you are thinking of making your own or be truly random.

Continue reading “Junkbox MIDI”

Make That Special Cup Of Coffee By Completely Tweaking The Coffee Machine

An interesting part of working on the Building Management and Control (BMaC) project – as previously covered on this site – was the reverse-engineering and ultimately the gaining of full control over the coffee machines at the office. Not the boring filter coffee machines, mind you, but the fully automatic espresso machine type that grinds beans, makes coffee, adds milk, and much more. Depending on one’s budget, naturally.

These little marvels of engineering contain meters of tubing, dozens of sensors, valves, ceramic grinders, and heating elements. The complexity of this machinery made us think that maybe there was more that we could do with these machines beyond what their existing programming and predefined products would allow. Naturally, there was.

Continue reading “Make That Special Cup Of Coffee By Completely Tweaking The Coffee Machine”

Hack My House: UL Certification And Turning The Lights On With An ESP8266

It’s hard to imagine a smart house without smart lighting. Maybe it’s laziness, but the ability to turn a light on or off without walking over to the switch is a must-have, particularly once the lap is occupied by a sleeping infant. It’s tempting to just stuff a relay in the electrical boxes and control them with a Raspberry Pi or micro-controller GPIO. While tempting, get it wrong and you have a real fire hazard. A better option is one of the integrated WiFi switches. Sonoff is probably the most well known brand, producing a whole line of devices based on the ESP8266. These devices are powered from mains power and connect to your network via WiFi. One disadvantage of Sonoff devices is they only work when connected to Sonoff’s cloud.

Light switches locked in to a cloud provider are simply not acceptable. Enter Tasmota, which we’ve covered before. Tasmota is an open source firmware, designed specifically for Sonoff switches, but supporting a wide range of ESP8266 based devices. Tasmota doesn’t connect to any cloud providers unless you tell it to, and can be completely controlled from within a local network.

Certifications, Liability, and More

We’re well acquainted with some of the pitfalls of imported electronics, but one of the lesser known problems is the lack of certification. In the United States, there are several nationally recognized testing laboratories: Underwriters Laboratories (UL) and Intertek (ETL) are the most prominent. Many  imported electronic devices, including Sonoff devices, do not have either of these certifications. The problem with this is liability, should the worst ever happen and an electrical fire break out. The Internet abounds with various opinions on the importance of the certification — a missing certification mark is somewhere between meaningless and a total hazard. The most common claim is that a house fire combined with non-certified equipment installed would result in an insurance company refusing to pay.

Rather than just repeat this surely sage advice from the Internet, I asked my insurance agent about uncertified equipment in the case of a fire. I discovered that insurance agencies avoid giving definite answers about claim payments. The response that came back was “it depends”: homeowner’s insurance covers events that are accidental and sudden. If a homeowner was aware that they were using uncertified equipment, then it could be categorized as “not an accident”. So far, the myth seems plausible. The final answer from the insurance agency: it’s possible that a non UL-certified device could result in denial of payment on a claim, but it depends on the policy and other details– why take the risk? Certification marks make insurance companies happier.

I also talked to my city’s electrical inspector about the issue. He commented that non-certified equipment is a violation of electrical code when it is hard-wired into a house. He echoed the warning that an insurance company could refuse to pay, but added that in the case of injury, there could be even further liability issues. I’ve opted to use certified equipment in my house. You’ll have to make your own decision about what equipment you’re willing to use.

There are some devices on Amazon that claim to have certification, but searching the certification database leads me to believe that not all of those claims are valid. If in doubt, there is a searchable UL database, as well as a searchable Intertek database.
Continue reading “Hack My House: UL Certification And Turning The Lights On With An ESP8266”

Blacksmithing For The Uninitiated: Let’s Talk About Anvils

When you grow up with something as the constant backdrop to your life, it’s easy to forget as an adult that not everyone else shares your instinctive knowledge of the subject. My dad is a blacksmith, he’s now retired, but as I was growing up his very active forge was in a workshop next to our house. This is the second part of a series based upon that experience, exploring blacksmithing for people who have maybe always fancied a go at the anvil but have little idea where to start.

The Most Obvious Blacksmithing Tool: The Anvil

Having considered the hearth in our previous outing, it’s time to turn our attention to what is the signature piece of blacksmithing equipment: the anvil. This has the function of providing a high-mass hardened working surface against which metal can be forged, and it has a distinctive shape with various parts for particular metalworking tasks. There are many minor and major variations of anvil design depending upon where in the world your anvil hails from, but since my experience comes from the English counties, the anvil I will be describing is the pattern you’ll find in the British Isles.

Continue reading “Blacksmithing For The Uninitiated: Let’s Talk About Anvils”

See What’s Inside Night Vision, And How To Build Your Own

[Nick Chen] shared some fascinating and useful details about building a AN/PVS-14 monocular night vision device from parts. It’s not cheap, but the build would be a simple one for most Hackaday readers, at least the ones who are residents of the USA. Since the PVS-14 is export controlled under the International Traffic in Arms Regulations (ITAR), parts are not sold outside of the US. Still, [Nick]’s illustrated build instructions provide a good look at what’s inside these rugged devices.

The build consists of purchasing a PVS-14 parts kit (or “housing kit”) which includes nearly everything except the image intensifier module, which must be purchased separately. Once all the parts are in hand, [Nick] explains how to assemble the pieces into a working unit.

The view through a blemished (or “blem”) image intensifier. Cheaper, and perfectly serviceable as long as the center is clear.

Since the image intensifier is by far the most expensive component, there is an opportunity to save money by shopping for what [Nick] calls “blem” units. These units are functional, but have blemishes or dead spots within the field of view. The good news it that this makes them cheaper, and [Nick] points out that as long as the center region of the tube is clear, they are perfectly serviceable.

How much can one save by building from parts? [Nick] says buying a complete PVS-14 with a Gen 3 tube (sensitive to 450-950 nm) can cost between $2500 to $4000. It’s expensive equipment, no doubt, but deals can be found on the parts. Housing kits can be had for well under $1000, and [Nick] has purchased serviceable image intensifiers for between $500 and $1000. He says searching for “blem tubes” can help zero in on deals.

Knowing the right terms for searching is half the battle, and along with his build instructions (and a chunk of cash) a curious hacker would have all they need to make their own. Heck, build two because the PVS-14 is designed such that two units can be combined to make a binocular unit! Not ready to drop that kind of cash? Check out OpenScope, the open source digital night vision tool.

Stuck Designing Two-Layer PCBs? Give Four Layers A Try!

Many readers are certainly familiar with the process for home-etching of PCBs: it’s considered very straightforward, if a little involved, today. This was not the case in my youth, when I first acquired an interest in electronics. At that time, etching even single-sided boards was for “advanced” hobbyists. By the time I started etching my own PCBs, the advanced hobbyists were on to double-sided home-etched boards — the only type not pictured above, because I couldn’t find the one successful example I ever created. I later saw the rise of “bare bones” fabricated PCBs: professionally made fixed size boards with plated-through holes, but no soldermask or silkscreen. Eventually, this gave way to the aggregating PCB services we have now with full two-layer boards, complete with soldermask and silkscreen.

Today, the “advanced” hobbyist may be using four-layer boards, although the four-layer adoption rate is still relatively low – OSH Park produces around 90% two-layer and 10% four-layer, for instance. I think this will inevitably increase, as has been the case with all the previous technologies: the advanced eventually becomes the mainstream. Each of the previous shifts has brought easier design and construction as well as improved performance, and the same will be true as four layers becomes more commonplace.

So, let’s take a look at designing four-layer PCBs. If you’ve never considered one for any of your designs, you may be pleasantly surprised at what little extra cost is involved for all the benefits you gain. Continue reading “Stuck Designing Two-Layer PCBs? Give Four Layers A Try!”