Hackaday Dictionary: The ESP8266

In August of 2014, something new started showing up in the markets of Shenzhen, the hi-tech area of China where the majority of the world’s electronics components are made. This is the ESP8266, a WiFi SoC (System on a Chip) that can connect to 802.11b/g/n networks on the 2.4GHz band. It can be addressed with SPI or a serial connection, and has an AT command set that makes it behave rather like an old-style modem. Basically, it has everything you would need to connect a device to a WiFi network, with the ESP8266 chip itself handling the complicated business of finding, joining and transmitting/receiving over a WiFi network.

That’s nothing particularly new in itself: WiFi connection devices like the TI CC3000 have been around for longer, and do much the same thing. The difference was the price. While the TI solution costs about $10 if you buy several thousand of them, the ESP8266 costs less than $7 for an individual board that can plug straight into an Arduino or similar. Buy the chip in bulk, and you can get it for less than $2.

The ESP8266 is more than just a WiFi dongle, though: it is a fully fledged computer in itself, with a megabyte of flash memory and a 32-bit processor that uses a RISC architecture. This can run applications, turning the ESP8266 into a standalone module that can collect and send data over the Internet. And it can do this while drawing a reasonably low amount of power: while receiving data, it typically uses just 60mA, and sending data over an 802.11n connection uses just 145mA. That means you can drive it from a small battery or other small power source, and it will keep running for a long time.

It wasn’t an easy ship to write applications for in the early days, though: it was poorly documented and required a dedicated toolchain to work with. This made it more of a challenge than many hackers were comfortable with.  That changed earlier this year, though, when the Arduino IDE (Integrated Development Environment) was ported to the chip. This meant that you could use the much easier to write Arduino functions and libraries to write code for the chip, bringing it within reach of even the most casual hacker.

Continue reading “Hackaday Dictionary: The ESP8266”

Ethics In Engineering: Volkswagen’s Diesel Fiasco

Every so often – and usually not under the best of circumstance – the field of engineering as a whole is presented with a teaching moment. Volkswagen is currently embroiled in a huge scandal involving emissions testing of 11 Million diesel cars sold in recent years. It’s a problem that could cost VW dearly, to the tune of eighteen Billion dollars in the US alone, and will, without a doubt, end the careers of more than a few Volkswagen employees. In terms of automotive scandals, this is bigger than Unsafe at Any Speed. This is a bigger scandal than the Ford Pinto’s proclivity to explode. This is engineering history in the making, and an enormously teachable moment for ethics in engineering.

Continue reading “Ethics In Engineering: Volkswagen’s Diesel Fiasco”

Why Are You Still Making PCBs?

Few things have had the impact on electronics that printed circuit boards (PCBs) have had. Cheap consumer electronics would not be as cheap if someone still had to wire everything (although by now we’d be seeing wiring robots, I’m sure). Between removing the human from the wiring process and providing many excellent electrical properties (at least, on a well-designed board), it isn’t surprising that even the cheapest examples of electronics now use PCBs.

For many years, the hallmark of being a big-time electronic hacker was the ability to make your own PCBs. There have been many ways that people have tried to bring PCB manufacturing into the hacker’s garage: stick on decals, light-sensitive blank PCBs, and even using laser printer toner (that last one spurred me to write a book on PCB layout many years back). You also see a lot of people using 3D printers or CNC mills to create PCBs. Hardly a week goes by that someone doesn’t ask me how to make a PCB in a home or small business lab.

Continue reading “Why Are You Still Making PCBs?”

This Is What A Real Bomb Looks Like

In 1980, Lake Tahoe, Nevada was a popular tourist spot. The area offered skiing, sailing, hiking in the mountains, and of course, gambling on the Nevada side of the lake. It was in this somewhat unlikely place where the authorities found the largest improvised bomb seen to that date in the USA.

Harvey’s casino was opened by former butcher Harvey Gross in 1944. In less than 20 years it grew to a 192 room, 11 story hotel casino. Thousands of people played Harvey’s slot machines and table games. Some were winners, but most were losers. John Birges was one of the latter. Formerly a successful landscaping company owner worth millions, he lost all of it to his gambling addiction.

Born in Hungary in 1922 as János Birges, John grew up in Budapest. When WWII hit, he flew an Me-109 for the Luftwaffe. He was arrested by the Gestapo for disobeying orders during the war, but was released. After the war, he again found himself in hot water – this time with the Russians. He was arrested in 1948 and charged with espionage. His sentence was 25 years of hard labor in the Gulag. The stories vary, but most agree that Birges was able to escape his work camp by detonating a bomb as a diversion.

In 1957 Birges and his wife Elizabeth immigrated to California. He changed his name from János to John to fit in. The couple had two sons, Johnny and Jimmy. John built up a successful landscaping business and bought a restaurant, working his way into the millionaires’ club. From the outside, they were the perfect example of the American dream.

Appearances can be deceiving. Behind closed doors, Birges was a right bastard to his family. He beat his wife and his children, even forcing them to kneel on gravel when they disobeyed him. Eventually, Johnny left home to escape his father’s fists. Elizabeth filed for divorce, and was later found dead under mysterious circumstances. Birges began gambling heavily, especially at Harvey’s Wagon Wheel casino in Lake Tahoe. He eventually burned through his personal savings, as well as the income from his businesses. The once millionaire was now penniless, but he had a plan. Just as a bomb had helped him escape the Gulag, he’d use a bomb to extort his money back from Harvey’s.

Continue reading “This Is What A Real Bomb Looks Like”

Hacking A Pi Camera With A Nikon Lens

Cell phones have killed many industries. It is getting harder and harder to justify buying an ordinary watch, a calculator, or a day planner because your phone does all those things at least as well as the originals. Cell phones have cameras too, so the days of missing a shot because you don’t have a camera with you are over (although we always wonder where the flood of Bigfoot and UFO pictures are). However, you probably still have a dedicated camera tucked away somewhere because, let’s face it, most cell phone cameras are just not that good.

The Raspberry Pi camera is about on par with a cheap cell phone camera. [Martijn Braam] has a Nikon camera, and he noticed that he could get a Raspberry Pi camera with a C-mount for lenses. He picked up a C to F adapter and proceeded to experiment with Nikon DSLR lenses on the Raspberry Pi camera.

Continue reading “Hacking A Pi Camera With A Nikon Lens”

Transparent ESP8266 WiFi-to-Serial Bridge

These days, connecting your microcontroller project to a WiFi network is pretty easy — you connect up an ESP8266 to your microcontroller project and pretend it’s a WiFi modem, using these old-school-style AT commands. But what do you do if you need to flash new code into the microcontroller? You can’t reprogram the micro remotely through the ESP8266 because those stupid AT commands get in the way.

The solution? By flashing the esp-link firmware into your ESP8266, you talk directly to the microcontroller over WiFi as if it were connected by a serial cable: the ESP8266 becomes a totally transparent WiFi-serial bridge. Now, with a serial bootloader and an ESP8266 in Wifi-to-serial bridge mode, you can reflash your microcontroller wirelessly, and then telnet in to interact with and debug the system remotely. Once you’ve fixed the bugs, you can re-flash the microcontroller: all over WiFi, without having to climb up a ladder to reach your IoT attic-temperature sensor.

To flash a connected Arduino, for instance, all you need to do is convince AVRDUDE to use the network instead of a locally-connected USB-serial cable: avrdude -p m328p -c arduino -b 115200 -P net:192.168.1.123:23 -U:yourHexFile.hex. The ESP8266 passes the data straight through its TX and RX lines to your microcontroller and everything works as if it were wired.

Configuration to allow the ESP8266 to join your WiFi network takes place on a self-hosted webpage that uses [Sprite_tm]’s esp-httpd standalone server, which makes setup pretty painless. And then after that you can simply telnet to the ESP8266 at port 23 and type away, or do anything else you would with a wired serial connection.

Although the simple bridge mode came first, esp-link looks like it’s growing to be a one-stop shop for all your IoT or microcontroller + WiFi needs. In addition to the serial bridge code, there is also a REST-based microcontroller-to-internet mode and there is bi-directional MQTT support in the wings. We haven’t had a chance to dig into these yet, so if you have, let us know in the comments.

If you want to dig in deeper, head over to [Jeelabs]’ blog for a slightly outdated tour of the project written by the code’s author, [Thorsten von Eicken]. For the most up-to-date development news, follow the very active development of esp-link in this thread on the esp8266 forums.

Dear TSA: This Is Why You Shouldn’t Post Pictures Of Your Keys Online

We have to hand it to the Transportation Security Administration (TSA). They seem to have a perfect track record of screwing up – and that’s not an easy thing to accomplish if you think about it. If it’s not reports of TSA agents stealing valuables or inappropriately groping passengers, there is the fun fact that in all the years since it was created in 2001, the agency hasn’t caught a single person seeking to do harm in the friendly skies. We’re actually okay with that if it means nobody is trying to do anything shady.

The most recent TSA folly seemed to practically fall into the Internet’s lap when a reporter for the The Washington Post published a hi-res picture of the entire set of TSA master keys while writing an article about how the TSA handles your bags after checking them at the counter. Well, the lock picking community when nuts and in a short time had 3D printed versions available and working. You can see it in action in the (twitter) video after the break.

For those that are not familiar with travel in the US, you are not allowed to use just any old lock on your bags. It has to be approved by the TSA – and that means that they have to be able to open it. So the TSA agents have a set of master keys that can open any bag if they need to look inside for some reason. If you put a non-TSA approved lock on the bag, that can make them a little angry, and you risk having your bag delayed or even cut open.

Of course, you can get into just about any suitcase with a ball point pen, so maybe this isn’t a real “security” issue, but it sure isn’t what you want to see from the agency that is supposed to protect you. Who knew that you could make keys from a photograph? We did way back in 2009 and way more in depth this May… maybe the TSA should start reading Hackaday?

Continue reading “Dear TSA: This Is Why You Shouldn’t Post Pictures Of Your Keys Online”