Hackaday

Syndicate content Hackaday
Fresh hacks every day
ถูกปรับปรุง 2 hours 59 min ก่อน

The Linux Throwie: A Non-Spacefaring Satellite

พุธ, 11/21/2018 - 01:01

Throwies occupy a special place in hardware culture — a coin cell battery, LED, and a magnet that can be thrown into an inaccessible place and stick there as a little beacon of colored light. Many of us will fondly remember this as a first project. Alas, time marches inevitably on, and launching cheerful lights no longer teaches me new skills. With a nod to those simpler times, I’ve been working on the unusual idea of building a fully functional server that can be left in remote places and remain functional, like a throwie (please don’t actually throw it). It’s a little kooky, yet should still deliver a few years of occasional remote access if you leave it somewhere with sunlight.

A short while ago, I described the power stages for this solar-powered, cloud accessible Linux server. It only activates on demand, so a small solar cell and modest battery are sufficient to keep the whole show running.

Where we left off, I had a solar cell that could charge a battery, and provide regulated 12v and 5v output. For it to be a functional device, there are three high level problems to solve:

  1. It must be possible to set up the device without direct physical access
  2. You must be able to remotely turn it on and off as needed.
  3. It needs to be accessible from the Internet.

The funny thing is, this hardware reminds me of a satellite. Of course it’s not meant to go into space, but I do plan to put it somewhere not easy to get to again, it runs off of solar power, and there’s a special subsystem (ESP8266) to tend the power, check for remote activation, and turn the main computer (Raspberry Pi 3) on and off as necessary. This sounds a lot like space race tech, right?

As I have a bit more code than usual to share with you today, I’ll discuss the most interesting parts, and provide links to the full firmware files at the end of the article.

Device Setup

Device setup is a good place to start, and it has two components: the operating system on the Raspberry Pi 3 (in this case Raspbian Stretch Lite), and the low-power systems that control whether the Raspberry Pi 3 is turned on or off. In both cases, we handle this by scanning for a wireless network with known SSID (say from your mobile phone).

In Raspbian, this is pretty easy – we open up /etc/network/interfaces and set the priority of our configuration network to a high number:

network={ ssid = "setup network name" psk = "setup network password" priority = 999 }

For our power control hardware, there is a module available in NodeMCU called ‘end user setup’ that allows you to connect to the ESP8266 remotely, scan for networks, and connect to one of them, saving the credentials. All we need to do is selectively run a program containing it when a certain hotspot is in range:

function listap() dofile('setup.lua') end scan_cfg = {} scan_cfg.ssid = "setup network name" scan_cfg.show_hidden = 1 wifi.sta.getap(scan_cfg, 1, listap)

Then in setup.lua, we run end user setup. This causes the ESP8266 to act as a hotspot named ‘SetupGadget’ followed by a few hex digits:

enduser_setup.start( function() print("Connected to wifi as:" .. wifi.sta.getip()) end, function(err, str) print("enduser_setup: Err #" .. err .. ": " .. str) end ) tmr.alarm(1,1000, 1, function() if wifi.sta.getip()==nil then print(" Wait for IP address!") else print("New IP address is "..wifi.sta.getip()) tmr.stop(1) node.dsleep(2000000) end end)

With this set up, we can connect the server and controlling hardware to a new wireless network without direct physical access. Solar power requires light, this is likely going to be on my roof, and I don’t relish the idea of climbing up to get it any time I need to reset my home WiFi password. If you have a really tall roof, build yourself a directional waveguide antenna — I’ve been able to get a range of over 100 meters this way, through several concrete buildings. There’s also Brian Benchoff’s 3D-printable ESP8266 dish antenna.

Remote Power Control

Next, we need to be able to remotely turn the server on or off. We’ll do this with MQTT pointed at a domain name that resolves to a cloud VPS. The only thing you’ll need on that VPS is the mosquito MQTT broker, so no sense in paying for a high-end server. Note that there are ways to implement some basic security here, but for the sake of brevity, I’ll leave that as an exercise for you to explore on your own.

Note that our hardware is only active occasionally – I’ve set it to wake up every 15 minutes or so to check the MQTT broker. To make sure it receives messages, the sender needs to set the “retain” flag when sending the activation command. This guarantees that the message will be there when the ESP8266 wakes up and checks for new messages, as long as we don’t replace it with some other retained message. A short example in Python for an MQTT broker at domain.com, and topic solarserver:

import paho.mqtt.client as mqtt #import the client broker_address="domain.com" client = mqtt.Client("P1") #create new instance client.connect(broker_address, port=1883) #connect to broker client.publish("solarserver", payload="activate", qos=0, retain=True)

On our ESP8266, we check for the command ‘activate’ and then run a program that turns on the Raspberry Pi 3:

ClientID = 'Node001' m = mqtt.Client(ClientID, 120) m:connect("domain.com", 1883, 0, function(client) print("connected") client:subscribe("/solarserver", 0, function(client) print("subscribe success") end) end) m:on("message", function(client, topic, data) print(topic .. ":" ) if data ~= nil then print(data) if data == "activate" then dofile('active.lua') m:close() end end end)

The program ‘active.lua’ raises a GPIO high to enable the 5v line to the Raspberry Pi 3, and monitors the battery voltage. If the battery voltage drops too low, or a shutdown command is received, it will cut power (shutting down first is a good idea).

Digging Deeper Into SSH Tunnels

What good does it do us though, if we can turn the device on but not access it? As I plan to move this device around for software demos, it would be great if I didn’t have to worry too much about firewalls, routers, and other drudgery that it might be behind. This is where we explore reverse SSH tunnels.

Normally, you establish an SSH connection because you want secure shell access to a remote machine, and have a certificate or username+password pair along with the address of the machine. In this situation, the address of the client and state of its network (the routers it is behind and so on) is not usually important, but the address of the server is assumed to be known and all port forwarding and firewall settings configured to accept the traffic.

In a reverse SSH connection, the server initiates a connection to the client that is used to allow the client to connect back to the server. On initiating the connection from server to client, you specify a port. When logged into the client, you use SSH to log in to localhost on that port, and the traffic will be sent to the server, allowing you to log in.

We’ll need to automate this process for it to be useful. The first step is to create a user (your_username in this example) with restricted access on your VPS. Our server will be automatically logging in to it, doing this with the root account is probably a terrible idea if you have anything there you remotely value. Note the password for this new user.

Next we power on the Raspberry Pi 3 (we’ll assume you use Raspbian Lite here), set a new root password, install autossh to manage the connection, create a new user (same name as the VPS user) with a certificate, and finally copy that certificate using SSH-copy-id to our VPS:

$apt-get install autossh $useradd -m -s /bin/bash your_username $su – your_username $ssh-keygen -t ed25519 $ssh-copy-id your_username@(VPS IP address) -p 22

Then we run raspi-config to enable the SSH server and have that user automatically logged in at boot. Now we’re set up to log in to our VPS over SSH with certificates instead of a username+password pair, which is easier to automate. Let’s establish a reverse SSH tunnel from our Raspberry Pi 3 to test it:

$autossh -M 0 your_username@(VPS IP address) -p 22 -N -R 8081:localhost:22 -vvv

If that succeeds, you ought to be able to establish an SSH connection to your Raspberry Pi from your VPS via the command:

$ssh your_username@localhost -p 8081

Assuming that works as intended, we move on to creating a service that establishes that connection a few seconds after the network interfaces go up. We’ll do this with systemctl, but first we need to create a short shell script for systemctl to call. Create a file autossh.sh, make it executable (e.g. with chmod), and populate it with:

sleep 15 autossh -M 0 your_username@(VPS IP address) -p 22 -N -R 8081:localhost:22 -vvv

The ‘sleep 15’ waits for 15 seconds after network interfaces go up during boot. Without this, I found that the script runs slightly too early, and I cannot resolve the VPS host. There are more elegant ways to fix this, but this was the easiest. Now we create the service that runs this script with:

$systemctl edit --force --full autoautossh.service

We then enter the following, then save the file:

[Unit] Description=My Script Service Wants=network-online.target After=network-online.target [Service] Type=simple User=pi WorkingDirectory=/home/your_username ExecStart=/bin/bash /home/your_username/autossh.sh [Install] WantedBy=multi-user.target

Then we enable it and test it. After the second command, the reverse SSH tunnel should be operational and you can try it – if it doesn’t work now, it won’t work on boot either:

$systemctl enable autoautossh.service $systemctl start autoautossh.service

If you have access now, then it ought to automatically establish the reverse SSH tunnel after boot, and also automatically re-establish it if it gets broken. If you’re having trouble with poor network connections, you might investigate Mosh as an alternative to SSH.

The case should probably be white, given that it’s going to be sitting in the sun a lot. Two solar panels fit nicely, so now it uses 0.6W of solar panels. Hot glue is to fill the small gap between the panels and the case, and for cosmetic effect, of course.

At this point, you’re more or less done: just plug the 5V output of your power stages into your Raspberry Pi and put it in a weatherproof box. When you send a retained message ‘activate’ to your MQTT topic, the server will turn on within 15 minutes or so. I recommend testing it and listening to the MQTT topic a while to make sure it all works as expected and so that you have an idea how long the battery lasts.

As promised, here is the full firmware source code. Dig through it an leave any questions you have in the comments section below. I’d also love to hear what you’d use a Linux throwie for?

Rapid-Fire Hail Of Chopstick Arrows Makes Short Work Of Diminutive Foes

อังคาร, 11/20/2018 - 23:30

Many Hackaday readers may also be familiar with the Discworld series of fantasy novels from [Terry Pratchett], and thus might recognise a weapon referred to as the Piecemaker. A siege crossbow modified to launch a hail of supersonic arrows, it was the favoured sidearm of a troll police officer, and would frequently appear disintegrating large parts of the miscreants’ Evil Lairs to comedic effect.

Just as a non-police-officer walking the streets of Ank-Morpork with a Piecemaker might find swiftly themselves in the Patrician’s scorpion pit, we’re guessing ownership of such a fearsome weapon might earn you a free ride in a police car here on Roundworld. But those of you wishing for just a taste of the arrow-hail action needn’t give up hope, because [Turnah81] has made something close to it on a smaller scale. His array of twelve mousetrap-triggered catapults fires a volley of darts made from wooden kebab skewers in an entertaining fashion, and has enough force to penetrate a sheet of cardboard.

He refers to a previous project with a single dart, and this one is in many respects twelve of that project in an array. But in building it he solves some surprisingly tricky engineering problems, such as matching the power of multiple rubber bands, or creating a linkage capable of triggering twelve mousetraps (almost) in unison. His solution, a system of bent coat-hanger wires actuated by the falling bar of each trap, triggers each successive trap in a near-simultaneous crescendo of arrow firepower.

On one hand this is a project with more than a touch of frivolity about it. But the seriousness with which he approaches it and sorts out its teething troubles makes it an interesting watch, and his testing it as a labour-saving device for common household tasks made us laugh. Take a look, we’ve put the video below the break.

Flagging Down Aliens with World’s Biggest Laser Pointer

อังคาร, 11/20/2018 - 22:00

As you’re no doubt aware, humans are a rather noisy species. Not just audibly, like in the case of somebody talking loudly when you’re in a movie theater, but also electromagnetically. All of our wireless transmissions since Marconi made his first spark gap broadcast in 1895 have radiated out into space, and anyone who’s got a sensitive enough ear pointed into our little corner of the Milky Way should have no trouble hearing us. Even if these extraterrestrial eavesdroppers wouldn’t be able to understand the content of our transmissions, the sheer volume of them would be enough to indicate that whatever is making all that noise on the third rock orbiting Sol can’t be a natural phenomena. In other words, one of the best ways to find intelligent life in the galaxy may just be to sit around and wait for them to hear us.

Of course, there’s some pesky physics involved that makes it a bit more complicated. Signals radiate from the Earth at the speed of light, which is like a brisk walk in interstellar terms. Depending on where these hypothetical listeners are located, the delay between when we broadcast something and when they receive it can be immense. For example, any intelligent beings that might be listening in on us from the closest known star, Proxima Centauri, are only just now being utterly disappointed by the finale for “How I Met Your Mother“. Comparatively, “Dallas” fans from Zeta Reticuli are still on the edge of their seats waiting to find out who shot J.R.

But rather than relying on our normal broadcasts to do the talking for us, a recent paper in The Astrophysical Journal makes the case that we should go one better. Written by James R. Clark and Kerri Cahoy,  “Optical Detection of Lasers with Near-term Technology at Interstellar Distances” makes the case that we could use current or near-term laser technology to broadcast a highly directional beacon to potentially life-harboring star systems. What’s more, it even theorizes it would be possible to establish direct communications with an alien intelligence simply by modulating the beam.

A Laser to Rival the Sun

At interstellar distances, it’s very difficult to discern a planet from the star it’s orbiting. This is why we’ve only been able to directly image a small number of exoplanets; the only reason we know they are there is by watching for dips in the light output of their host star. The same is of course true in reverse. An alien intelligence that has a telescope pointed towards our solar system is really just going to be looking at our sun. That means any laser we fire out into space with the intention of getting somebody’s attention would need to appear brighter than the sun, otherwise it would be like somebody on the Moon trying to get our attention with a flashlight.

This would require a laser in the megawatt range that could be fired continuously or at least in bursts of several seconds. Admittedly it’s a pretty tall order, but not beyond our current level of technology. The US Air Force explored using an aircraft mounted megawatt laser as an anti-missile weapon in the mid-1990’s, which culminated with the development of the Boeing YAL-1. In 2010 the YAL-1 demonstrated it was possible to track and destroy ballistic missiles during their boost phase using its chemical oxygen iodine laser (COIL), though ultimately the project was canceled due to the tremendous costs involved in building and maintaining an operational fleet of the aircraft.

Regardless of its failings as a practical weapon, Clark and Cahoy cite the YAL-1 as proof that a similar laser could be constructed for interstellar communication. If the military can develop a megawatt laser that can fire for long enough to destroy a missile while still being small and light enough to mount in a modified 747, there’s no technical reason it couldn’t be done in an observatory on the ground.

As an added bonus, the COIL technology pioneered by the Air Force produces an infrared beam with a frequency of 1315 nm. This is particularly advantages for signaling purposes as our sun doesn’t produce much light at this wavelength, so the laser’s beam intermixed with light from the sun would be seen from a distant observer’s perspective as a star with a wildly fluctuating spectral output; an anomaly no alien astronomer could ignore.

Bringing it into Focus

As Clark and Cahoy explain, the megawatt class laser is only half the puzzle; it would still need similarly supersized optics to deliver the beam with the optimal divergence. But even here the hardware they have in mind, namely a 30 m to 45 m telescope, isn’t beyond our reach. The paper specifically mentions that the Thirty Meter Telescope Observatory (TMT) currently in the planning phases and scheduled to be operational by 2030 could provide adequate beam characteristics if it were paired with a 2 MW laser.

Artist’s impression of TMT primary mirror

Somewhat counterintuitively, the paper argues that a tightly focused beam is not the ideal choice for flagging down our celestial neighbors. For one, such a beam would need to be aimed and tracked with exceptionally high accuracy to hit a target tens or even hundreds of light-years away. More importantly, our ability to detect distant planets is still too rough to produce models of their orbits with sufficient accuracy; we simply don’t know where to aim the laser.

The solution is a beam that has a large enough divergence to compensate for our poor aim. In fact, Clark and Cahoy suggest a beam wide enough to illuminate large swath’s of a star system could be ideal in some scenarios. Multiple planets within a star’s habitable zone would be able to see our laser at the same time, greatly reducing the amount of repositioning we’d have to do on our end.

Against the Odds

Of course, there’s still plenty of variables in play that make such an attempt a very literal shot in the dark. For instance we can fire our laser towards Gliese 667, where Kepler previously detected a planet within its habitable zone, but its possible that the organisms who reside on that planet are insectoids with no appreciable technology. So whether it’s a rerun of “I Love Lucy” or a blast of infrared light from across the cosmos, they aren’t likely to pay it much mind and we come away with no more knowledge of our place in the universe than we had before.

But paling in comparison to technological or logistical hurdles is the most obvious problem: the economics of such a system. If even the United States Air Force didn’t think it was cost effective to continue operating a megawatt laser that proved it could destroy incoming ballistic missiles, who would possibly pick up the tab for an even more powerful and elaborate long-shot that arguably has no practical function other than to placate our yearning for exploration? Missions to the Moon or Mars can be argued to have practical benefits to mankind that offset their multi-billion dollar price tags, but shining a monstrous laser into the eyes of alien creatures that may or may not even exist for nearly the same price is a much tougher sell.

In the end, James R. Clark and Kerri Cahoy make a compelling and well-reasoned argument for interstellar laser communications. That the idea could work, and that it’s within humanity’s capabilities to bring such a system online within the next few decades is difficult to refute. But like so many great ideas, it seems unlikely it will ever see the light of day without the sort of concerted global effort that to date we’ve been largely unable to muster.

[Ben Krasnow] Gasses MEMS Chips, for Science

อังคาร, 11/20/2018 - 19:00

Why in the world does helium kill iPhones and other members of the Apple ecosystem? Enquiring minds want to know, and [Ben Krasnow] has obliged with an investigation of the culprit: the MEMS oscillator. (YouTube, embedded below.)

When we first heard about this, courtesy in part via a Hackaday post on MRI-killed iPhones, we couldn’t imagine how poisoning a micro-electromechanical system (MEMS) part could kill a phone. We’d always associated MEMS with accelerometers and gyros, important sensors in the smartphone suite, but hardly essential. It turns out there’s another MEMS component in many Apple products: an SiT 1532 oscillator, a tiny replacement for quartz crystal oscillators.

[Ben] got a few from DigiKey and put them through some tests in a DIY gas chamber. He found that a partial pressure of helium as low as 2 kPa, or just 2% of atmospheric pressure, can kill the oscillator. To understand why, and because [Ben] has a scanning electron microscope, he lapped down some spare MEMS oscillators to expose their intricate innards. His SEM images are stunning but perplexing, raising questions about how such things could be made which he also addresses.

The bottom line: helium poisons MEMS oscillators in low enough concentrations that the original MRI story is plausible. As a bonus, we now understand MEMS devices a bit better, and have one more reason never to own an iPhone.

The Electric Imp Sniffs out California Wildfires

อังคาร, 11/20/2018 - 16:00

The wildfires in California are now officially the largest the state has ever seen. Over 50,000 people have been displaced from their homes, hundreds are missing, and the cost in property damage will surely be measured in the billions of dollars when all is said and done. With a disaster of this scale just the immediate effects are difficult to conceptualize, to say nothing of the collateral damage.

While not suggesting their situation is comparable to those who’ve lost their homes or families, Electric Imp CEO [Hugo Fiennes] has recently made a post on their blog calling attention to the air quality issues they’re seeing at their offices in Los Altos. To quantify the problem so that employees with respiratory issues would know the conditions before they came into work, they quickly hacked together a method for displaying particulate counts in their Slack server.

The key to the system is one of the laser particle sensors that we’re starting to see more of thanks to a fairly recent price drop on the technology. A small fan pulls air to be tested into the device, where a very sensitive optical sensor detects the light reflected by particles as they pass through the laser beam. The device reports not only how many particles are passing through it, but how large they are. The version of the sensor [Hugo] links to in his blog post includes an adapter board to make it easier to connect to your favorite microcontroller, but we’ve previously seen DIY builds which accomplish the same goal.

[Hugo] then goes on to provide firmware for the Electric Imp board that reads the current particulate counts from the sensor and creates a simple web page that can be viewed from anywhere in the world to see real-time conditions at the office. From there, this data can be plugged into a Slack webhook which will provide an instantaneous air quality reading anytime a user types “air” into the channel.

We’ve covered a number of air quality sensors over the years, and it doesn’t look like they’re going to become any less prevalent as time goes on. If anything, we’re seeing a trend towards networks of distributed pollution sensors so that citizens can collect their own data on their air they’re breathing.

[Thanks to DillonMCU for the tip.]

DIY Mini Helical Antennas From Salvaged Co-ax Cable

อังคาร, 11/20/2018 - 13:00

[Mare] has a visual guide and simple instructions for making DIY mini helical 868 MHz antennas for LoRa applications. 868 MHz is a license-free band in Europe, and this method yields a perfectly serviceable antenna that’s useful where space is constrained.

A metric 5 mm drill bit makes a convenient core.

The process is simple and well-documented, but as usual with antenna design it requires attention to detail. Wire for the antenna is silver-plated copper, salvaged from the core of RG214U coaxial cable. After straightening, the wire is wound tightly around a 5 mm core. 7 turns are each carefully spaced 2 mm apart. After that, it’s just a matter of measuring and bending the end for soldering to the wireless device in question. [Mare] has used this method for wireless LoRa sensors in space-constrained designs, and it also has the benefit of lowering part costs since it can be made and tested in-house.

Antennas have of course been made from far stranger things than salvaged wire; one of our favorites is this Yagi antenna made from segments of measuring tape.

A Candle Powered Guitar Pedal

อังคาร, 11/20/2018 - 10:00

When it comes to guitar effects pedals, the industry looks both back and forward in time. Back to the 50’s and 60’s when vacuum tubes and germanium transistors started to define the sound of the modern guitar, and forward as the expense and rarity of parts from decades ago becomes too expensive, to digital reproductions and effects. Rarely does an effects company look back to the turn of the 19th century for its technological innovations, but Zvex Effects’ “Mad Scientist,” [Zachary Vex], did just that when he created the Candela Vibrophase.

At the heart of the Candela is the lowly tea light. Available for next to nothing in bags of a hundred at your local Scandinavian furniture store, the tea light powers the Zvex pedal in three ways: First, the light from the candle powers the circuit by way of solar cells, second, the heat from the candle powers a Stirling engine, a heat engine which powers a rotating disk. This disc has a pattern on it which, when rotated, modifies the amount of light that reaches the third part of the engine – photoelectric cells. These modulate the input signal to create the effects that give the pedal its name, vibrato and phase.

Controls on the engine adjust the amount of the each effect. At one end, the effect is full phasor, at the other, full vibrato. In between a blend of the two. A ball magnet on a pivot is used to control the speed of the rotating disk by slowing the Stirling engine’s flywheel as it is moved closer.

While more of a work of art than a practical guitar effect, if you happen to be part of a steam punk inspired band, this might be right up your alley. For more information on Stirling engines, take a look at this post. Also take a look at this horizontal Stirling engine.

A Hacked Solution For Non-Standard Audio Modules

อังคาร, 11/20/2018 - 07:00

When life hands you lemons, lemonade ends up being your drink of choice. When life hands you non-standard components, however, you’ve got little choice but to create your own standard to use them. Drinking lemonade in such a situation is left to your discretion.

The little audio record and playback modules [Fran Blanche] scored from eBay for a buck a piece are a good example. These widgets are chip-on-board devices that probably came from some toy manufacturer and can record and playback 20 seconds of audio with just a little external circuitry. [Fran] wants to record different clips on a bunch of these, and pictured using the card-edge connector provided to plug them the recording circuit. But the pad spacing didn’t fit any connector she could find, so she came up with her own. The module and a standard 0.1″ (2.54 mm) pitch header are both glued into a 3D-printed case, and the board is connected to the header by bonding wires. It makes a nice module that’s easily plugged in for recording, and as [Fran] points out, it’s pretty adorable to boot. Check it out in the video below.

Sure, the same thing could have been accomplished with a custom PCB breaking out the module’s pins to a standard card-edge connector. But [Fran] knows a thing or two about ordering PCBs, and our guess is she wanted to get this done with what was on hand rather than wait for weeks. There’s something to be said for semi-instant gratification, after all. And lemonade.

A 3D Printed Kinematic Camera Mount

อังคาร, 11/20/2018 - 04:00

[Enginoor] is on a quest. He wants to get into the world of 3D printing, but isn’t content to run off little toys and trinkets. If he’s going to print something, he wants it to be something practical and ideally be something he couldn’t have made quickly and easily with more traditional methods. Accordingly, he’s come out the gate with a fairly strong showing: a magnetic Maxwell kinematic coupling camera mount.

If you only recognized some of those terms, don’t feel bad. Named for its creator James Clerk Maxwell who came up with the design in 1871, the Maxwell kinematic coupling is self-orienting connection that lends itself to applications that need a positive connection while still being quick and easy to remove. Certainly that sounds like a good way to stick a camera on a tripod to us.

But the Maxwell design, which consists of three groves and matching hemispheres, is only half of the equation. It allows [enginoor] to accurately and repeatably line the camera up, but it doesn’t have any holding power of its own. That’s where the magnets come in. By designing pockets into both parts, he was able to install strong magnets in the mating faces. This gives the mount a satisfying “snap” when attaching that he trusts it enough to hold his Canon EOS 70D and lens.

[enginoor] says he could have made the holes a bit tighter for the magnets (thereby skipping the glue he’s using currently), but otherwise his first 3D printed design was a complete success. He sent this one off to Shapeways to be printed, but in the future he’s considering taking the reins himself if he can keep coming up with ideas worth committing to plastic.

Of course we’ve seen plenty of magnetic camera mounts in the past, but we really like the self-aligning aspect of this design. It definitely seems to fit the criterion for something that would otherwise have been difficult to fabricate if not for 3D printing.

Many Ways to Drive a Small Motor

อังคาร, 11/20/2018 - 02:30

Tiny motors used for haptic feedback and vibration come in a variety of shapes and sizes. The most familiar is the “eccentric rotating mass” (ERM) variety which just spins an imbalanced weight on a small motor and comes packaged in two form factors. The classic is the pager “pager motor” which just looks like a tiny, adorable motor and the squat cylindrical “pancake style”. ERMs are simple to use but provide imprecise response when compared to their new-age cousin the “linear resonant actuator”. Unlike the motor in an ERM, LRAs are typically an enclosed mass on a spring placed near a coil which pushes the mass back and forth. The name LRA might not be familiar but Apple’s branded implementation, the Taptic Engine, might be a little more recognisable.

[Precision Microdrives] is a vendor of these sorts of devices who happens to have a pleasantly approachable set of application notes covering any conceivable related topic. A great place to start is this primer on ways to drive motors with constant voltage in a battery powered environment. It starts with the most simple option (a voltage divider, duh) and works through a few other options through using an LDO or controller.

If you’re thinking about adding haptics to a project and are wondering what kind of actuator to use (see: the top of this post) AB-028 is a great resource. It has a thorough discussion on the different options available and considerations for mounting location, PCB attachment, drive modes, and more. Digging around their site yields some other interesting documents too like this one on mounting to fabric and other flexible surfaces. Or this one on choosing PWM frequencies.

Of Roach Killer and Rust Remover: Sam Zeloof’s Garage-Made Chips

อังคาร, 11/20/2018 - 01:00

A normal life in hacking, if there is such a thing, seems to follow a predictable trajectory, at least in terms of the physical space it occupies. We generally start small, working on a few simple projects on the kitchen table, or if we start young enough, perhaps on a desk in our childhood bedroom. Time passes, our skills increase, and with them the need for space. Soon we’re claiming an unused room or a corner of the basement. Skills build on skills, gear accumulates, and before you know it, the garage is no longer a place for cars but a place for pushing back the darkness of our own ignorance and expanding our horizons into parts unknown.

It appears that Sam Zeloof’s annexation of the family garage occurred fairly early in life, and to a level that’s hard to comprehend. Sam seems to have caught the hacking bug early, and by the time high school rolled around, he was building out a remarkably well-equipped semiconductor fabrication lab at home. Sam has been posting his progress regularly on his own blog and on Twitter, and he dropped by the 2018 Superconference to give everyone a lesson on semiconductor physics and how he became the first hobbyist to produce an integrated circuit using lithographic processes.

Sam didn’t go into the genesis of his interest in DIY ICs, but it’s clear from a brief shop tour on his YouTube channel that it only came about in the last few years. In 2016, the shop seemed to contain none of the equipment that Sam would need to make his dream come true – the high-vacuum chamber, the turbomolecular pump, the tube furnace, the chemistry lab, and the optical and electron microscopes. Sam rattles off this gear in his talk like it was no big deal to obtain, and indeed tells us he scored most of it off eBay for a song. It doesn’t hurt that the family home is near Princeton; college dumpsters make for the best diving.

Relatively easy though the equipment may have been to come by, knowing what to do with it was another matter. The first part of Sam’s talk, a review of the physics of semiconductors, assures us that he has given himself the education needed to put the tools to work. Sam’s first semiconductors, simple PN junction diodes and photovoltaics, came along pretty early in the process. His first MOSFETs were born in early 2017, about the time that his homebrew fab lab caught our attention.

Compared to what he had in mind, though, these early successes were just a warm-up act. Sam wanted to make an IC using the same photolithographic techniques used by commercial chip fabs. He had to learn how to handle the silicon wafers, heat treat them to create an oxide layer, pattern them using a DLP projector of his own devising, learn to apply dopants sourced from roach killer and weighed with a homebrew microgram balance made from a panel meter movement, and pull a vacuum nearly equal to that of outer space in order to harness thousands of amps to deposit thin metal films. The end result: the “Z1” chip, a PMOS dual differential amplifier. Sam said the fabrication process took about 12 hours total, and while he didn’t have a wire bonder to mount it to a lead frame at the time, the chip was tested and it worked.

After we ran the original piece on Sam, his mother Beth Deene contacted me to say thanks. She related that at the time, Sam was struggling with his high school’s administration, who refused to approve an independent study that would have given him more time to pursue his project. She lamented that they “couldn’t see the value in what he’s attempting to do.” It’s hard to believe in this day of STEM programs that any educator could be that ignorant; indeed, even a minimally gifted administrator would have been shouting Sam’s accomplishments from the rooftops as an example of what great things the district’s students were capable of. The mind boggles.

Regardless of the hurdles, or perhaps because of them, Sam pressed on. He started at Carnegie-Mellon this fall, and while he now has access to their $100 million fab lab, he’ll probably miss the garage where it all started.

NES Hack Lets the Mario Bros. Play Together

จันทร์, 11/19/2018 - 23:30

Being relegated to player two used to be a mark of disgrace in the 8-bit era of videogames. Between never being to select a level and having to wait your turn to play, the second player experience was decidedly third rate. Super Mario Bros. on the Nintendo Entertainment System was no different in this regard as it offered no character selection option and also required players to alternate taking control upon failing stages. It made the two player mode more like playing in parallel than actually together. However, there is a new ROM Hack for the original Super Mario Bros. from [Corpse Grinder] that allows players to play as the Brothers Mario simultaneously. Finally, a true co-op experience.

It’s important to note that the level power-ups have not been doubled-up in the patch, so this will no doubt be some friendly competition. Also it would be in both players interest to play with someone around their same skill level as any player dying in a level will cause both to start back at the last checkpoint. Not to worry, [Corpse Grinder] appears to have yet another Super Mario Bros. co-op patch in the works with this video from their YouTube channel below.

Whether you dump your own NES cartridge or extract the ROM image of Super Mario from a Virtual Console download, the patch itself comes in the form of a XDelta file. In order to apply the patch to a ROM image of Super Mario Bros. you’ll need a program like xdelta UI. Make sure to backup a copy of the ROM image before applying the patch, because this process is a one-way street.

via Retro Gaming Mag

And if you’re still in a NES kind-of-mood, then there’s also this Mike Tyson’s Punchout Lag Patch.

How the Xbox Was Hacked

จันทร์, 11/19/2018 - 22:00

The millennium: a term that few had any use for before 1999, yet seemingly overnight it was everywhere. The turning of the millenium permeated every facet of pop culture. Unconventional popstars like Moby supplied electronica to the mainstream airwaves while audiences contemplated whether computers were the true enemy after seeing The Matrix. We were torn between anxiety — the impending Y2K bug bringing the end of civilization that Prince prophesied — and anticipation: the forthcoming release of the PlayStation 2.

Sony was poised to take control of the videogame console market once again. They had already sold more units of the original PlayStation than all of their competition combined. Their heavy cloud of influence over gamers meant that the next generation of games wasn’t going to start in until the PS2 was on store shelves. On the tail of Sony announcing the technical specs on their machine, rumors of a new competitor entering the “console wars” began to spread. That new competitor was Microsoft, an American company playing in a Japanese company’s game.

“[Microsoft] launches war against Sony for control of the living room.”

– Chris Morris, CNN Staff Writer

I Know Bunnie-Fu

Nearly two years after the world failed to end, Microsoft launched the Xbox on November 15, 2001 in North America. The console was more PC-like than any console that had come before it, featuring an eight gig hard drive, Intel Pentium III CPU, and cutting-edge DVD-ROM drive. Microsoft incorporated DirectX, their collection of Windows APIs, into their machine which is where the console derived its namesake. It was intended to introduce home theater PCs to the masses. The Xbox played games, played music, and with purchase of a proprietary IR remote dongle, it also played DVD movies.

The week after the launch, Xbox owners got an early Christmas present from MIT student Andrew “bunnie” Huang who published his exploits into tinkering with the console. He detailed how to extract the TSOP flash chip from the motherboard along with insights into the contents within. Huang had extracted the Xbox’s BIOS image and posted it for anyone on the Internet to download. He was flirting with fire, because a mere twelve hours after the post he received a cold call from a Microsoft representative. He posted that too.

https://hackadaycom.files.wordpress.com/2018/11/bunnie-huang-gets-a-call-from-microsoft.mp3 Voicemail from Microsoft representative regarding Huang’s student webpage

With that kind of information now public knowledge, the first Xbox modchip came up for sale in May of 2002. The Xtender modchip promised to circumvent the copy-protection, break the region lock, and open up the ability to play DVDs without the need for that silly IR dongle. The copy-protection promise was just that, a promise. At the time there was no way to backup Xbox games, the discs were unreadable when inserted into a PC. As a result, modchips became the de facto way to play legal imports from other regions.

If you’d like to get deeper into Xbox hacking, or hardware hacking at all, the man who wrote the hack also wrote the book; check out [bunnie]’s seminal work “Hacking the Xbox“.

Killing Them Softly With This Mod

The Xbox’s roots in PC architecture ran deep. Beyond the Intel x86 CPU and IDE hard drive there were flash memory cards players could use to transfer save game files from their console. What made these memory cards interesting was not their storage capacity but their pinout. The layout of the data lines was curiously similar to USB. So much so that it didn’t take a genius to figure out how to modify an Xbox controller to support using a USB thumb drive instead of a memory card.

Modified Xbox controller with female USB adapter.

This simple mod paved the way for files to fly between Xbox and PC. Saves could be reshaped to unlock in-game items far before game developers intended them to be available, and they could also serve as the entry point for something much more devious.

It’s true that no game is perfect, but that especially applied to the Xbox exclusive MechAssault. Ironically, the Microsoft game’s save file provided the exploit into the Xbox’s encrypted HDD that allowed an entire Linux distro to be installed on top of the Xbox OS. Microsoft sought to plug the exploit by issuing their first round of online game patches, but the majority of Xbox owners were playing offline. Similar save exploits were found in several other games and were collectively referred to as Xbox soft mods.

Your average consumer was never going to seek out a modchip solution because soldering irons are, in technical terms, “hot and pokey”. However, the more trivial nature of a Xbox soft mod lowered the bar for entry into hackerdom. Modchip resellers like Lik-Sang sold ready-made Xbox-to-USB adapters as “Developer Tools”, and the whole save-exploit-to-Linux-install process was made even more accessible when it appeared on cable as Tech TV segment.

Linux software optimization came at a fast clip because all of these machines had the exact same spec. Homebrew apps aplenty found a home on the Xbox, everything from arcade emulators to web browsers. One of the most popular homebrew creations was the Xbox Media Center (XBMC) which was dedicated to playing every media codec you could throw at a piece of silicon. XBMC made full use of the Xbox’s broadband Internet capabilities by allowing users to subscribe to audio/video RSS feeds, and it would receive updates for years after Microsoft ended production of the console. The grand irony was that Microsoft’s original plan for the Xbox to be a PC in the living room was fully realized…it just ran Linux.

 

It Might Be Possible To Build A Stingray With A Raspberry Pi

จันทร์, 11/19/2018 - 19:00

If there’s one thing that’s making you insecure, it’s your smartphone. Your smartphone is constantly pinging the cell towers, giving out your location and potentially leaking your private information to anyone with a radio. This is the idea behind an IMSI catcher, or Stingray in common parlance, and now you too can build one with parts you can buy off of Amazon.

The key to this hack is a software defined radio dongle, or RTL-SDR, that has been repurposed to listen in on a GSM network. Literally the only hardware required is an RTL-SDR that can be bought online for less than fifteen dollars, and you can identify the IMSI, or unique ID linked to every SIM card, in smartphones around you. The only bit of software required is a small Python script from [Oros42], freely available on GitHub.

Of course, building an IMSI catcher with a desktop is of limited utility, and using a laptop is still a bit too bulky to surreptitiously conceal in a public location. No, to really get the bang for your buck out of this, you need to do this with a small single-board computer running off a battery pack. Luckily, [Joseph Cox] over at Motherboard reports, “It is likely possible” to run this on a Raspberry-Pi. We’re guessing it’s even more than “likely” possible.

Flywire Circuits at the Next Level

จันทร์, 11/19/2018 - 16:00

The technique of assembling circuits without substrate goes by many names; you may know it as flywiring, deadbugging, point to point wiring, or freeform circuits. Sometimes this technique is used for practical purposes like fixing design errors post-production or escaping tiny BGA components (ok, that one might be more cool than practical). Perhaps our favorite use is to create art, and [Mohit Bhoite] is an absolute genius of the form. He’s so prolific that it’s difficult to point to a particular one of his projects as an exemplar, though he has a dusty blog we might recommend digging through [Mohit]’s Twitter feed and marveling at the intricate works of LEDs and precision-bent brass he produces with impressive regularity.

So where to begin? Very recently [Mohit] put together a small wheeled vehicle for persistence of vision drawing (see photo above). We’re pretty excited to see some more photos and videos he takes as this adorable little guy gets some use! Going a little farther back in time there’s this microcontroller-free LED scroller cube which does a great job showing off his usual level of fit and finish (detail here). If you prefer more LEDs there’s also this hexagonal display he whipped up. Or another little creature with seven segment displays for eyes. Got those? That covers (most) of his last month of work. You may be starting to get a sense of the quality and quantity on offer here.

We’ve covered other examples of similar flywired circuits before. Here’s one of [Mohit]’s from a few years ago. And another on an exquisite headphone amp encased in a block of resin. What about a high voltage Nixie clock that’s all exposed? And check out a video of the little persistence of vision ‘bot after the break.

Thanks [Robot] for reminding us that we hadn’t paid enough attention to [Mohit]’s wonderful work!

It was about time that the sculptures started to get around. pic.twitter.com/JXVFQvZ8h2

— Mohit Bhoite | मोहित भोईटे (@MohitBhoite) November 16, 2018

Fail Of The Week: When the Epoxy-Coated Chip Is Conductive

จันทร์, 11/19/2018 - 13:00

Every once in a while, you’ll find some weirdness that will send your head spinning. Most of the time you’ll chalk it up to a bad solder joint, some bad code, or just your own failings. This time it’s different. This is a story of weirdness that’s due entirely to a pin that shouldn’t be there. This is a package for an integrated circuit that has a pin zero.

The story begins with [Erich] building a few development boards for the Freescale Kinetis K20 FPGA. This is a USB-enabled microcontroller, and by all accounts, a worthwhile effort. So far, so good. The problem with the prototype boards was soon apparent. On some of the boards, the external 32 kHz oscillator was not starting. Resoldering the oscillator or microcontroller sometimes solved the problem, but not always. This is troubling, because that means the issue isn’t code, and it’s not the PCB. This is going to take a deep dive and a good inspection microscope.

One of [Erich]’s friends, [Christian B] somehow found the problem. When the Freescale K40 is manufactured, the die is carefully laid in a chip carrier and coated with epoxy, putting it in a small QFN package. The problem is, there’s an extra connection sticking out of one corner of this chip. This is just an artifact of the chip carrier, but if you leave exposed metal connected to ground, something is eventually going to go wrong.

The best guess [Erich] has is that this additional connection is from the manufacturing and packaging process, with the exposed metal pad in this application being bridged to an adjacent pad. Now, if there’s one failure to [Erich]’s design, it’s that the trace comes out of the pin on the adjacent pad at 90 degrees; this isn’t a best practice, but most of the time you can get away with it. This time, though, somebody got burned.

We don’t know how [Christian] ever found this issue. When you look at a tiny QFN package, you don’t expect there to be an extra pin attached to ground that can be easily bridged with a bit of solder paste. It’s either a lot of luck or skill to find this problem, but it’s a great example of the weird things you have to look out for.

The Lost Art Of Steam Heating

จันทร์, 11/19/2018 - 10:00

We got pointed by [packrat] to a 2015 presentation by [Dan Holohan] on the history and art of steam heating systems. At the advent of central heating systems for entire buildings, steam was used instead of water or air for the transport medium. These systems were installed in landmark buildings including the Empire State Building, which still use them to this day.

A major advantage of steam-based heating system is that no pump is required: the steam will naturally rise up through the piping, condenses and returns to the origin. This can be implemented as a single pipe where condensation returns through the same pipe as the steam, or a two-pipe system where the condensate returns through its own pipe.

In the presentation, Dan walks us through his experiences working on many of these steam heating systems in major US buildings, the types of systems, fixes implemented by engineers long since dead and the particularities of maintaining these systems.

 

Hackaday Links: November 18, 2018

จันทร์, 11/19/2018 - 07:00

The greatest bit of consumer electronics is shipping and the reviews are out: Amazon’s Alexa-enabled microwave is a capable microwave, but befuddling to the voice-controlled-everything neophyte. Voice controlled everything is the last hope we have for technological innovation; it’s the last gasp of the consumer electronics industry. This is Amazon’s first thing with a built-in voice assistant, and while this is a marginally capable microwave at only 700 Watts — fine for a college dorm, but it’s generally worth shelling out a bit more cash for a 1000 Watt unit — the controls are befuddling. The first iteration is always hard, and we’re looking forward to the Amazon Alexa-enabled toaster, toothbrush, vacuum cleaner, and Bezos shrine.

Need a laser cutter, like crowdfunding campaigns, and know literally nothing about laser cutters? Have we got something for you. The Etcher Laser crowdfunding campaign has been pinging my email non-stop, and they’ve got something remarkable: a diode laser cutter engraver for $500. It comes in a neat-looking enclosure, so it’s sure to raise a lot of money.

A while back [Paulusjacobus] released an Arduino-based CNC controller for K40 laser cutters. There were a few suggestions to upgrade this to the STM32, so now this CNC controller is running on a Blue Pill. Yes, it’s great and there’s more floating points and such and such, so now this project is a Kickstarter project. Need a CNC controller based on the STM32? Boom, you’re done. It’s also named the ‘Super Gerbil’, which is an awesome name for something that is effectively a GRBL controller. Naming things is the hardest problem in computer science, after all.

The Gigatron computer is a ‘home computer’ without a microprocessor or microcontroller. How does it do this? A metric butt-load of ROM and look-up tables. This is cool and all, but now the Gigatron logo is huge. we’re talking 18 μm by 24 μm. This was done by etching a silicon test wafer with electron beam lithography.

Fail of the Week: Laser-based Persistence of Vision Gadget

จันทร์, 11/19/2018 - 04:00

[XTronical]’s idea for a laser-based persistence of vision gadget failed, but the basic idea seemed sound. A row of inexpensive red lasers shine into a spinning mirror and are reflected onto a distant surface, making 8 scan lines. A reflective object sensor detects mirror position, and by rapidly turning individual lasers on and off, a pattern can be drawn out.

That was the idea, anyway. A quick prototype consisting of some small and economical red laser diodes and a double-sided mirror hot glued to the shaft of a small DC motor formed the guts of the unit. [XTronical] worried that the spinning mirror might be unstable or unreliable, but that part performed just fine. The problems, he found, were mainly with the lasers.

[XTronical] had hoped to turn the lasers on and off directly via the digital I/O pins of an Arduino, but here’s where a lot of little issues sank the project. First of all, hot glue was handy for mounting but the lasers were cumbersome to align by hand, and the hot glue made it troublesome to effect repairs when units failed. In addition, the beams had inconsistent brightness and spot sizes, which made for poor visuals. [XTronical]’s approach of controlling the lasers by applying and cutting power may also have been a source of trouble. It’s possible that these lasers cannot turn on and off fast enough, but it’s hard to say without measuring.

Sensible ideas can be rendered unworkable by an accumulation of small problems, and that seems to have been the case here. A video overview is embedded below; is this approach doomed, or can it be made workable?

Persistence of vision gadgets come in all shapes and sizes, even jump rope has been pressed into service as a PoV display, and it’s a pity this attempt at a display didn’t work out.

The (UV) Writing’s On The Wall

จันทร์, 11/19/2018 - 01:00

[Michael Karliner]’s Belshazzar, named for the Biblical character upon whose wall the writing appeared, is a unique light painting machine, that tracks an array of UV LEDs across a glow-in-the-dark background to paint transient dot-matrix letters in light. It was one of many cyberpunk-themed art pieces in Null Sector at the 2018 Electromagnetic Field hacker camp this summer.

The row of LEDs hangs down from a carriage that traverses a tubular rail, and is edged forward by means of a stepper motor driving a roller. This arrangement delivers the benefit that it can be scaled for displays of any length. The LEDs are driven from an Arduino via a Texas Instruments TLC5940 PWM driver ship.The result can be seen in the video below the break, and those who saw it at EMF may remember it tracing suitably dystopian phrases.