Hackaday

Syndicate content Hackaday
Fresh hacks every day
ถูกปรับปรุง 1 ชั่วโมง 14 min ก่อน

Art Deco Control Panel Looks Out of Metropolis

2 hours 44 minก่อน

Bakelite, hammertone gray finish, big chunky toggle switches, jeweled pilot lights – these are a few of [Wesley Treat]’s favorite retro electronics things. And he’ll get no argument from us, as old gear is one of our many weak spots. So when he was tasked by a friend to come up with some chaser lights for an Art Deco-themed bar, [Wesley] jumped at the chance to go overboard with this retro-style control panel.

Granted, the video below pays short shrift to the electronics side of this build in favor of concentrating on the woodworking and metalworking aspects of making the control panel. We’re OK with that, too, as we picked up a ton of design tips along the way. The control panel is all custom, with a chassis bent from sheet aluminum. The sides of the console are laminated walnut and brushed aluminum, which looks very chic. We really like the recessed labels for the switches and indicators on the front panel, although we’d have preferred them to be backlighted. And that bent aluminum badge really lends a Chrysler Building flair that ties the whole project together.

All in all, a really nice job, and another in a long string of retro cool projects from [Wesley]. We recently featured his cloning of vintage knobs for an old Philo tube tester, and we’ll be looking for more great projects from him in the future.

Thanks to [anacierdem] for the tip.

Colour-Code Your Way To Timber Satisfaction

5 hours 44 minก่อน

As Hackaday writers we see the insides of as many hackerspaces as we can, and some of us make it our business to be members of more than one within reach of our homes. Thus it was that a simple but extremely elegant hackerspace lifehack came our way, courtesy of our friends at Milton Keynes Makerspace.

MK Makerspace have found a home within another group, the local MK Men In Sheds is a charitable organisation providing workshop and social space for hackers of an older generation. Together the two combine to offer both a huge range of experience and a comprehensive array of tools and machinery.

Order imposed upon the chaos of the MK Men In Sheds woodstore.

Woodwork is a strong component in the life of any Shed, and at Milton Keynes the Shed has been particularly successful in attracting donations of surplus timber. The stock of freely available mixed pieces of wood has almost everything you could wish for when working on casual projects, but despite continual sorting efforts had become an unmanageable pile among which it was often difficult to find the piece required.

Step forward MK Men In Sheds member [Ricky] whose solution was nothing short of inspired in its combination of simplicity and effectiveness. A large rack has compartments, each one of which has a coloured label. Along the front of the rack is a simple ruler calibrated in coloured blocks, and it is the work of a moment to offer a new piece of timber up to the ruler and place it in the compartment with the appropriate colour. Now any member with a need for a piece of wood  can easily select an appropriate one, and return any usable offcut for easy selection by the next.

This may be a simple piece of work, but its value as a lifehack in a communal workshop is immense. It brings to mind a piece we published a couple of years ago, about how a vibrant hackerspace follows a good wood shop. Never a truer word was spoken for people of all ages.

Raspberry Pi Revives Stand-Alone DivX Player

8 hours 44 minก่อน

It might seem almost comical to our more fresh-faced readers, but there was a time when you could go into a big box retailer and purchase what was known as a “DivX Player”. Though they had the outward appearance of a normal DVD player, these gadgets could read various digital video file formats off of a CD-R or DVD-R, complete with rudimentary file browser. Depending on how much video compression you could stomach, a player like this would allow you to pack an entire season of a show or multiple movies onto a single disc. Before we started streaming everything online, that was kind of a big deal.

Room to grow.

[Roberto Piva] got his hands on one of these early digital media players, a KiSS DP-500 circa 2003, and decided that it was too unique to send off to the recycling center. Not only was he curious about what made it tick, but he thought it would be interesting to try converting it into a Raspberry Pi powered streaming media player. One might say there’s something almost perverse about taking the carcass of one of these devices and stuffing it full of the same technology that made it obsolete in the first place, but who are we to judge?

Upon opening the vintage set top box, [Roberto] was immediately struck by how empty the thing was. He got the impression the device was a rush job, pushed out to capitalize on a relatively short-lived trend. Looking at it, we have to agree. It’s almost as though they got a deal on some old VCR chassis laying around in a warehouse someplace and decided to stick some (at the time) modern electronics in it. It even uses what appears to be a standard IDE optical drive rather than something purpose built.

[Roberto] hoped that he could tap into the player’s original power supply, but upon testing found that it wasn’t quite up to the task to reliably running a modern Pi. So into the cavernous enclosure went a powered USB hub, which he wired up to the original power switch on the player’s front panel. The original PSU couldn’t handle the Pi, but it does work nicely to spin up an IDE hard drive that he mounted to the top of the optical drive with zip ties.

This was enough to get a nice Kodi set top box that’s capable of pulling media from the Internet or the internal HDD, but [Roberto] has more plans for the future. He wants to try and get the optical drive working through a USB-to-IDE adapter so the device can come full circle and once again play burned discs full of video files, and mentions he would like to reverse engineer the front panel and IR receiver to control Kodi.

While this isn’t the first time we’ve seen a DVD player get an internal Raspberry Pi, the fact that this one is using an IDE drive is an interesting spin and should make for a very clean final product. We’ve also seen how integrating the original physical controls can really help sell the experience with these Pi-infused players. If you’ve got the space in your entertainment for one of these early 2000’s leviathans, they might make an ideal base for your own Pi set top box build.

Foundations For Machine Learning In English (Or Russian)

11 hours 44 minก่อน

We are big fans of posts and videos that try to give you a gut-level intuition on technical topics. While [vas3k’s] post “Machine Learning for Everyone” fits the bill, we knew we’d like it from the opening sentences:

Machine Learning is like sex in high school. Everyone is talking about it, a few know what to do, and only your teacher is doing it.”

That sets the tone. What follows is a very comprehensive exposition of machine learning fundamentals. There is no focus on a particular tool, instead this is all the underpinnings. The original post was in Russian, but the English version is easy to read and doesn’t come off as a poor machine translation.

The article starts off with some pretty basic ideas but goes into quite a bit of detail about different machine learning strategies before talking about real-world applications such as spam filtering and credit scoring. If you know what bagging vs boosting means and can explain the difference between a convolutional network and a recurrent network, this post might not be for you. But for everyone else, it is a great common-sense exposition of a lot of fundamental topics.

There are not custom videos as far as we could see, but the text does link to some excellent ones from [3Blue1Brown] and others that go into more details, like the one below.

If you want an introduction to the technology side of things, you can play around in your browser. Or start with our TensorFlow introduction.

 

A Coin Cell Powers This Tiny ESP32 Dev Board

14 hours 44 minก่อน

Just for the challenge, just for fun, just for bragging rights, and just to do a little showing off – all perfectly valid reasons to take on a project. It seems like one or more of those are behind this tiny ESP32 board that’s barely larger than the coin cell that powers it.

From the video below, [Mike Rankin] has been working down the scale in terms of powering and sizing his ESP32 builds. He recently completed a project with an ESP32 Pico D4 and an OLED display that fits exactly on an AA battery holder, which he populated with a rechargeable 14550. Not satisfied with that form factor, he designed another board, this time barely larger than the LIR2450 rechargeable coin cell in its battery holder. In addition to the Pico D4, the board sports a USB charging and programming socket, a low drop-out (LDO) voltage regulator, an accelerometer, a tiny RGB LED, and a 96×16 OLED display. Rather than claim real estate for switches, [Mike] chose to add a pair of pads to the back of the board and use them as capacitive touch sensors. We found that bit very clever.

Sadly, the board doesn’t do much – yet – but that doesn’t mean we’re not impressed. And [Mike]’s no stranger to miniaturization projects, of course; last year’s Open Hardware Summit badge was his brainchild.

[Ewald] tipped us off to this one. Thanks!

Building An Optically Pumped Laser Pointer

17 hours 44 minก่อน

As a society, we’ve largely come together to agree that laser pointers are mostly useless. They’re now the preserve of university lecturers and those destined to wind up in a jail cell for harassing helicopter pilots. Most pointers are of the diode-pumped solid state variety. However, [Zenodilodon] treads a different path.

The laser cavity glows in operation, though it’s probably inadvisable to look directly at it.

Instead of the usual DPSS build, this pointer packs an optically pumped semiconductor laser, or OPSL. These lasers have the benefit of a wider selection of output wavelengths, and can be built to offer less variance in beam parameters such as divergence.

The build is an attractive one, with the pointer chassis being manufactured out of brass, with several components plated in yellow and rose gold. There’s even a sliding window to observe the laser cavity, which glows brightly in operation. [Zenodilodon] goes into great detail during the machining process, showing all the steps required to produce a visually appealing device.

It’s certainly one of the prettiest laser builds we’ve seen, and it’s always nice to see makers exploring different technologies. Similarly to our recently featured 1.4 W laser pointer, it’s largely a packaging operation, but if you’re building your own laser diodes at home – you know where to send ’em. Video after the break.

 

Nerf Mods Via 3D Printing

19 hours 14 minก่อน

Nerf guns are a great way to annoy parents. Simply give them as a gift to any child, and watch precious family heirlooms tumble to the ground as little Holly commando rolls behind the couch to avoid enemy combatants invading the loungeroom. Adults may find them lacking in stopping power and firing rate, but not to worry – there’s plenty to be done about that. [3D Printing Nerd] took a trip to visit the [Out of Darts] workshop, to check out some seriously hardcore blasters.

[Out of Darts] runs as a store that sells all manner of tools and components for hopping up Nerf blasters, but they also sell complete original builds as well. The video showcases all manner of hardware, from powered backpack ammunition hoppers, to drain blaster shotguns and multirocket launchers. The workshop also contains 22 Prusa i3 printers that run 24/7 producing parts, barring breakdowns. Injection moulding, eat your heart out.

Things have come a long way since the old days of swapping in big springs to Hasbro blasters and crossing fingers that nothing breaks. 3D printing allows the home maker to produce just about any part imaginable without requiring advanced machine tools or special skills beyond the use of garden variety CAD software. It’s not the first time we’ve seen 3D printed Nerf blasters, and we’re sure it won’t be the last either. As always, tip ’em if you got ’em. Video after the break.

Supercon: Ruth Grace Wong and Firmware From the Firehose

20 hours 43 minก่อน

Firmware and software are both just code, right? How different could the code that runs Internet-scale distributed web stuff be from the code that runs a tiny microcontroller brain inside a personal hydroponics device? Night and day!

Ruth Grace Wong works in the former world, but moonlights as a manufacturing engineer with some friends. Their product had pre-existing firmware that contained (at least) one bug, and Ruth’s job was to find it. The code in question was written by the Chinese PCB engineer, who knew the electronics intimately but who had no software background, providing Ruth an opportunity to jump head-first into the rawest of raw embedded programming. Spoiler alert: she found the bug and learned a lot about firmware along the way. This talk follows her along the adventure.

“The code is very well documented, in Chinese” but the variable names are insanely non-descriptive. Similarly, while the PCB engineer knows full well what a 24C02 is, if you’re a software geek that might as well be Chinese. As you’d expect, web searches came to the rescue on both fronts.

The bug ended up hiding in a logical flaw in the PWM-setting code inside an interrupt service routine, and it kept the fan from ever coming full on. Once found, it was easily fixed. But getting to the point where you understand the codebase deeply enough to know where to look is four-fifths of the battle. Heck, setting up the toolchain alone can take a day or two.

If you’re a fellow software type, Ruth’s talk (embedded below) will give you a quick glimpse into the outer few layers of the onion that is embedded firmware development, from a familiar viewpoint. Give her quick and value-packed talk a watch! Grizzled hardware veterans will nod along, and maybe even gain a little insight into how our code looks to “them”.

Hackaday Podcast Ep 007 – Everything Microcontrollers, Deadly Clock Accuracy, CT X-Rays, Mountains Of E-Waste

21 hours 43 minก่อน

Elliot Williams and Mike Szczys look at all that’s happening in hackerdom. This week we dive deep into super-accurate clock chips, SPI and microcontroller trickery, a new (and cheap) part on the microcontroller block, touch-sensitive cloth, and taking a home X-ray to the third dimension. We’re saying our goodbyes to the magnificent A380, looking with skepticism on the V2V tech known as DSRC, and also trying to predict weather with automotive data. And finally, what’s the deal with that growing problem of electronic waste?

Links for all discussed on the show are found below. As always, join in the comments below as we’ll be watching those as we work on next week’s episode!

Direct download (88.7 MB)

Places to follow Hackaday podcasts:

Episode 007 Show Notes: New This Week: Interesting Hacks of the Week: Quicklinks: Can’t-Miss Articles:

What Happens When You Cross A Brick With a Pixel?

ศุกร์, 02/22/2019 - 23:30

There are a great many technologies we use to display information every day. We’re all familiar with plasma displays and LCDs, and then there’s more esoteric hardware like the split flap displays on municipal buses and around train stations.  However, Breakfast have been working on something that turns architectural features into a display at the same time. Enter Brixels.

The name is a portmanteau of brick and pixel, indicating that each individual brick can be independently addressed as a visual element. A Brixel installation consists of a series of columns, stacked with Brixel elements. Each individual brick on the column contains a stepper motor which can set the rotational position of the brick. The outer appearance of the individual bricks is highly customizable, as the motor hardware is integrated into the column itself. A Linux machine is used as a primary controller, which passes commands to each column’s controller over RS485, and the column controllers then pass instructions to each individual Brixel.

The Brixels are capable of continuous 360 degree rotation and also contain LEDs for various illumination based effects. The largest current installation is the Brixel Mirror, standing at 18 feet wide, 6 feet high, and containing 540 individually addressable Brixels. These are built with one half covered in a mirror finish, and combined with a depth-sensing camera for all kinds of fun interactive effects.

Brixels show that architectural features don’t have to be static – they can become kinetic, living things that can be aesthetically beautiful and also useful. Breakfast are known for their installations which use modern electronics to push the limits in their artistic installations. Their work on high-speed flip dot displays is particularly impressive. Video after the break.

[Thanks to Sheldon for the tip!]

Drops of Jupyter Notebooks: How to Keep Notes in the Information Age

ศุกร์, 02/22/2019 - 22:01

Our digital world is so much more interactive than the paper one it has been replacing. That becomes very obvious in the features of Jupyter Notebooks. The point is to make your data beautiful, organized, interactive, and shareable. And you can do all of this with just a bit of simple coding.

We already leveraged computer power by moving from paper spreadsheets to digital spreadsheets, but they are limited. One thing I’ve seen over and over again — and occasionally been guilty of myself — is spreadsheet abuse. That is, using a spreadsheet program to do something I probably ought to write a program to do. For those times that you want something quick but want something more than a spreadsheet, you should check out Jupyter Notebooks. The system is most commonly associated with Python, but it isn’t Python-specific. There are over 100 languages supported — many community-developed. You can even install a C++ interpreter backend for it. Because of the client/server architecture, it is very simple to share notebooks with other users.

You can — in theory — use Jupyter for anything you could use Python for. In practice, it seems to get a lot of workout with people analyzing large data sets, doing machine learning, and similar tasks.

The Good: Simple, Powerful, Extensible

The idea is simple. Think of a Markdown-enabled web page that can connect to a backend (a kernel, in Jupyter-speak). The backend can run on your machine or remotely and will support some kind of language — often Python. The document has cells that line up vertically (like a single wide spreadsheet column). For example, here’s a simple notebook I created to explain how a bunch of sine waves add up to a square wave:

You can try it live in your browser or download it from GitHub. You can see that you can get “live” graphical output, along with text and other media. In fact, I’m not taking good advantage of the formatting, but you can do anything you can do with Markdown in the text cells.

The code is pretty standard Python. For example, here’s one of the cells:

a0=amplitude*np.sin(time); plot.plot(time,a0); plot.title("Fundamental"); plot.xlabel("Time"); plot.grid(True,which="both");

Further down in the document you’ll see that you can also deploy widgets. For example, using a slider to set parameters. We’ll come back to that topic in a bit. In addition to widgets, you can get extensions that let you layout cells in a grid. These are often used to create dashboards like the one below, for example. In fact, there are lots of extensions, for lots of different purposes.

The Bad: Support for Non-Python Languages

Non-Python languages are tricky to use with Jupyter. I tried using the C++ interpreter and found it a bit hard to get going. Some of that is because C++ isn’t happy with being run incrementally — Redefining things, for example, makes it unhappy. If you want C++ or Fortran or any of the other myriad options, they may or may not work well. They may or may not be able to use libraries that a lot of Python notebooks will employ. Don’t get me wrong. I haven’t found any that don’t work at all, but sometimes it is inconvenient or difficult compared to using the Python kernel.

The other thing that strikes me as odd is that the tasks notebooks seem best for is not always what they are most used for. If you think about it, the notebooks are really an exercise in literate programming. However, it seems to me that most of the notebooks are just sent around as quick web applications. You can share a static image of a page, of course. You can also share read-only versions. GitHub, for example, will render a notebook on display. There’s also Binder which will let you share an interactive version.

Joel Bennet does what he calls literate devops — which is similar to literate programming using Jupyter and — of all things — Powershell in the video below.

Jupyter is not magic. It facilitates rapidly building little Python applications that have a very particular web interface. There are probably projects it isn’t suitable for. Not every job requires a hammer. You can save yourself some grief, though, by doing a little research on best practices before you start anything substantial. But you should constantly be asking yourself if any tool is the right tool for a given job and not just using the same thing for everything.

The Ugly: Python Package Management

I find it taxing that the system relies on Python. I don’t have much against the language itself (although my personal preference is for whitespace to not be meaningful). However, ensuring Python has everything it needs for a given notebook tends to be super painful. If you plan on distributing, this becomes another layer of issues in ensuring everyone has the right packages. On Binder, you can provide a requirements.txt file that tells it what things you need to import, so that’s workable but an extra step.

The bulletproof way to install the program locally is with Anaconda which — of course — creates a totally different Python environment than your normal Python environment. Yes, I know about virtualenv. And pip. Of course, my Linux system has a package manager, too, and it has versions of Jupyter and all the Python libraries. But everyone wants their own package manager to rule my system and I have no idea what to do about your system.

Once you get it installed, it is fine. And if you get it working on Binder, you should be good since it builds each user a new Docker container. However, if you really plan on distributing complex notebooks, the installation across multiple platforms and Python versions could pose a risk.

Widgets Make It Interactive

If you look at the last two code cells of my example document (from above), you’ll see that I use a slider widget to let you interactively adjust the equations and the graph. That’s just one of the various widgets available.

If you aren’t picky, the system will build widgets for a function for you. You don’t always get the control of things like ranges and steps, but for many functions, you can get a reasonable UI by just making a simple call to interact, or including it with the function:

@interact(x=True, y=1.0) def g(x, y): return (x, y)

That will produce a checkbox for x and a slider for y. You’ll get default values, but in many cases, that’ll be acceptable.

The Latest

I’ve been talking about traditional notebooks, but the next generation interface rolled out last year. Known as JupyterLab, it allows you to use other tools like editors in a tabbed-interface. Binder supports the new interface if you want to give it a quick spin.

You can continue working with traditional notebooks using the new interface, so we expect to see increased adoption of JupyterLab over time.

So…

Should you use Jupyter? That’s like asking if you should use a saw. If you are cutting wood, yes! If you are trying to join two pieces of plastic, no. Jupyter definitely fits a niche — and a niche that many of us writing math- and data-intensive software work within. The fact that you can distribute it easily and even interface with hardware makes it attractive for projects where you want something quick but powerful.

Although some of the languages other than Python are second-class citizens, there are many choices and you can work around any limitations. So even if you aren’t a Python guru, you’ll still want to add this power notebook system to your toolbox.

12 Year Old Builds Successful Fusor At Home

ศุกร์, 02/22/2019 - 19:00

Nuclear fusion, as a method of power generation, continues to elude humanity. It promises cheap, virtually limitless energy, if only we could find a way to achieve it. On the other hand, achieving nuclear fusion of a few atoms just for the fun of it is actually quite doable, even in the home lab. [Jackson Oswalt] is one of the youngest to pull it off, having built a working fusor at home at the age of 12.

The fusor consists of a cross-shaped chamber, which is pumped down to a high vacuum to enable the fusion reaction to occur. Deuterium is then pumped into the chamber, and confined by an applied electric field from a power supply in the vicinity of 50 kV. With the right combination of geometry, vacuum and other factors, it’s possible to fuse atoms and observe the characteristic glow of the reaction taking place.

In order to be recognised as having achieved fusion by the Open Source Fusor Research Consortium, one must typically have proof of the release of neutrons from the fusion reaction. [Jackson] showed this with a neutron detector setup, by inserting and removing it during a run to demonstrate the fusor was the source of the signal. Photos of the glowing fusor don’t go astray, either, and [Jackson] was more than happy to deliver.

We’ve seen fusor builds before – [Erik]’s build got him into the Plasma Club back in 2016.

[via Fox News]

Radiation Detector Eschews Tubes, Uses Photodiode

ศุกร์, 02/22/2019 - 16:00

When the topic is radiation detection, thoughts turn naturally to the venerable Geiger-Müller tube. It’s been around for ages, Russian surplus tubes are available for next to nothing, and it’s easy to use. But as a vacuum tube it can be somewhat delicate, and the high voltages needed to run it can be a little on the risky side.

Luckily, there are other ways to see what’s going on in the radioactive world, like this semiconductor radiation detector. [Robert Gawron] built it as a proof-of-concept after having built a few G-M tube detectors before. His solid-state design relies on a reverse-biased photodiode conducting when ionizing radiation hits the P-N junction. The tiny signal is amplified by a pair of low-noise op-amps and output to a BNC connector. The sensor’s analog output is sent to an oscilloscope whose trigger out is connected to a Nucleo board for data acquisition. The Nucleo is in turn connected to a Raspberry Pi for totalizing and logging. It’s a complicated chain, but the sensor appears to work, even detecting alpha emissions from thoriated TIG electrodes, a feat we haven’t been able to replicate with our G-M tube counter.

[Robert]’s solid-state detector might not be optimal, but it has promise. And we have seen PIN diodes used as radiation detectors before, too.

[via Dangerous Prototypes]

Noise: It Turns Out You Need It

ศุกร์, 02/22/2019 - 13:00

We don’t know whether quantum physics proves the universe is truly a strange place or that we are living in a virtual reality simulation, but we know it turns a lot of common sense into garbage. Take noise, for example. Noise — as in random electrical noise — is bad, right? We spend a lot of time designing to minimize noise. Researchers in Austria, Germany, and Australia recently published a paper that shows that noise can actually improve the flow of energy. While the paper is behind a paywall, the Focus article is available and, of course, you can probably find a copy of the paper if you want to read the entire thing.

The paper, titled “Environment-Assisted Quantum Transport in a 10-qubit Network” uses trapped calcium atoms to study an effect suspected of being a key factor in high-efficiency energy transfer such as the transfer observed in optical fibers and photosynthesis.

In a perfect material, you can imagine energy transfer — such as current flow through a conductor — as a wave of energy moving through the material. In the case of electric current, that wave is built from electrons, but it could also, for example, be photons. In either case, in general, the waves stay coherent through the material. But imperfections and defects can destroy coherency and cause wave interference where the trough of one wave cancels the peak of another one nearby. This effect is called Anderson (or strong) localization. However, this loss is at a maximum when the waves are totally out of phase with each other. Noise in the system makes it more likely that the waves will change phase relationship and reduce Anderson localization which boosts transfer efficiency.

The ten atoms formed a chain where researchers could use a laser to inject energy into the system and then watch it flow to the end of the chain. Other lasers can introduce disorder into the array, causing the Anderson localization effect. With a stable setup, Anderson localization caused inefficiency in energy transport. However, introducing noise into the disordered system reduced the effect of the Anderson localization — to a point. At some higher level, the noise caused an increased loss due to the Zeno effect.

It turns out that impurities and noise aren’t always bad things. We are always amazed that we live in a time where we are learning about the universe at such a fine level of detail.

Hexagonal Lamp Is A Stylish Application Of Plywood

ศุกร์, 02/22/2019 - 10:00

Lamps are useful things, and can be a great way to add style and lighting options to a room. Where overhead lights have to provide enough illumination for all manner of tasks, a subtle table lamp can add a nice moody glow to a room when it’s time to kick back and relax. Oftentimes, a stylish lamp can be let down by having a run of the mill plastic switch hanging off the power lead, but it doesn’t always have to be the case. [Emiel] designed this hexagonal lamp with a hidden switch, which works remarkably well.

[Emiel] starts by laying out hexagonal paper templates on plywood and perspex sheet. The plywood is cut on the bandsaw, while the interior cuts on the perspex are made on a scroll saw to avoid unsightly cut entry lines. The outer half of the lamp slides up and down on a pair of steel rods. Springs hold the outer half up, and it can be pressed down to activate a switch inside to turn the lamp on and off.

The build has a clean and attractive aesthetic, with the LEDs hidden inside, glowing through the perspex slices built into the body. It looks like something you’d find in the rooms at the Tranquility Base Hotel & Casino. If regular lamps aren’t enough for you, however, you could always consider building something interactive. Video after the break.

 

Hack A ThinkPad Display

ศุกร์, 02/22/2019 - 07:00

Hackers really like their tools. This leads to holy wars over languages, editors, keyboards, and even laptops. The problem with laptops is that they age, and not always gracefully. [Syonyk] likes his ThinkPad T430S, except for one thing, its TN display wasn’t really very good. These flat screens use an older technology and show color changes with different viewing angles among other problems. So he managed to upgrade the device’s screen to IPS with the help of a replacement screen and an adapter (see right). Apparently, many similar ThinkPads can take the same sort of upgrade.

The problem is that the laptop uses LVDS to talk to the TN screen, while newer screens are likely to use Embedded DisplayPort (eDP) which is a different protocol entirely. However, there’s now a converter that [Syonyk] found on eBay (from China, of course). For about $70, the motherboard’s LVDS output can transform to eDP. Of course, you also need an IPS display panel.

With the news full of cybersecurity stories, [Syonyk] thought about the risk of putting a board of questionable origin in his laptop. However, the board doesn’t interface at all with the CPU, so it seems unlikely that it could do anything more than scrape the screen and it would not have an easy way to send the data away.

Being a veteran of many laptop teardowns, he had no trouble opening this one — the ThinkPad is known to be relatively easy to work on. He does pass along some good tips about making sure you don’t accidentally blow fuses.

It looked like a lot of work, but none of it was difficult. In addition to having a better display, the laptop also now has a higher resolution. A pretty good upgrade if you plan on keeping the machine going.

A lot of people like to hack ThinkPads. You can upgrade practically all of one, if you have a mind to do so.

Relive The Dot Matrix Glory Days With Your 3D Printer

ศุกร์, 02/22/2019 - 04:00

With the cost of 3D printers dropping rapidly, we’ve started to see a trend of hackers re-purposing them for various tasks. It makes perfect sense; with the hotend and extruder turned off (or removed entirely), you’ve got a machine that can move a tool around in two or three dimensions with exceptional accuracy. Printers modified to carry lasers, markers, and even the occasional rotary tool, are becoming a common sight in our tip line.

Last year [Matthew Rayfield] attached a marker to his 3D printer and had it sketch out some pictures, but recently he decided to revisit the idea and try to put a unique spin on it. The end result is a throwback to the classic dot matrix printers of yore utilizing decidedly modern hardware and software. There’s something undeniably appealing about the low-fi nature of dot matrix printing, and when fed the appropriate images this setup is capable of producing something which we’ve got to admit is dangerously close to being art.

To create these images, [Matthew] has created “Pixels-to-Gcode”, an online service that anyone can use to turn an arbitrary image into GCode they can feed their 3D printer. There’s a number of options available for you to play with so you can dial in the specific effect you’re looking for. Pointillist images can be created using a tight spacing of dots, but widen them up, and your final image becomes increasingly abstract.

The hardware side of this project is left largely as an exercise for the reader. [Matthew] has attached a fine-point pen to his printer’s head using a rubber band, but admits that it’s far from ideal. A more robust approach would be some kind of 3D printed device that allows you to quickly attach your pen or marker so the printer can be easily switched between 2D and 3D modes. We’d also be interested in seeing what this would look like if you used a laser mounted on the printer to burn the dots.

Back in the ancient days of 2012, we saw somebody put together a very similar project using parts from floppy and optical drives. The differences between these two projects, not only in relative difficulty level but end result, is an excellent example of how the hacker community is benefiting from the widespread availability of cheap 3D motion platforms.

FPGA Brings Arduboy to the Game Boy Advance

ศุกร์, 02/22/2019 - 02:30

Hackaday readers are perhaps familiar with the Arduboy, an open source handheld gaming system that aims to combine the ease of Arduino development with the seething nostalgia the Internet has towards the original Nintendo Game Boy. While not quite the same as getting one of your games published for a “real” system, the open source nature of the Arduboy platform allows an individual to develop a game playable on a commercially manufactured device.

While the Arduboy hardware itself is actually quite slick, that hasn’t stopped people from trying to bring its games to other pieces of hardware. Now thanks to the efforts of [uXe], the Game Boy Advance is well on its way to becoming Arduboy compatible, in a way bringing the whole project full circle. Assuming this gadget becomes a commercial device (it sounds like that’s still up in the air), Arduboy developers will be able to proudly play their creations on the final and objectively best entry into the Game Boy line.

Getting to this point has been something of an adventure, as documented in a thread from the Arduboy forums. Members of the community wondered what it would take to get Arduboy games running on a real Game Boy, but pretty quickly it was decided that the original beige brick model wasn’t quite up to the task. Eventually its far more capable predecessor the Game Boy Advance became the development target, and different approaches were considered for getting existing games running on the platform.

While there were some interesting ideas, such as using the GBA’s link port to “feed” the system games over SPI, in the end [uXe] decided to look into creating an FPGA cartridge that would actually run the Arduboy games. In this scenario, the GBA itself is basically just being used as an interface between the FPGA and the human player. In addition to these low-level hardware considerations, there was considerable discussion about the more practical aspects of bringing the games to the new hardware, such as how to best scale the Arduboy’s 128 x 64 output to the GBA’s 240 × 160 screen.

As demonstrated in the videos after the break, [uXe] now as all the elements for playing Arduboy games on the GBA in place, including the ability to disable full screen scaling by using the shoulder buttons. Now he just needs to shrink the hardware down to the point it will fit inside of a standard GBA cartridge. Beyond that, who knows? Perhaps the appeal of being able to run Arduboy games on a real Game Boy is enough to warrant turning this hack into a new commercial product.

Thanks to a hardware swap we’ve seen Arduboy games played on the Dreamcast VMU, and [uXe] himself previously grafted Arduboy-compatible hardware into an original Game Boy, but being able to play these games on an unmodified Game Boy Advance obviously has its own appeal. At the very least, it will be a bit more ergonomic than using a hacked classroom gadget.

Building A Simple Python API for Internet of Things Gadgets

ศุกร์, 02/22/2019 - 01:01

It’s no secret that I rather enjoy connecting things to the Internet for fun and profit. One of the tricks I’ve learned along the way is to spin up simple APIs that can be used when prototyping a project. It’s easy to do, and simple to understand so I’m happy to share what has worked for me, using Web2Py as the example (with guest appearances from ESP8266 and NodeMCU).

Barring the times I’m just being silly, there are two reasons I might do this. Most commonly I’ll need to collect data from a device, typically to be stored for later analysis but occasionally to trigger some action on a server in the cloud. Less commonly, I’ll need a device to change its behavior based on instructions received via the Internet.

Etherscan is an example of an API that saves me a lot of work, letting me pull data from Ethereum using a variety of devices.

In the former case, my first option has always been to use IoT frameworks like Thingsboard or Ubidots to receive and display data. They have the advantage of being easy to use, and have rich features. They can even react to data and send instruction back to devices. In the latter case, I usually find myself using an application programming interface (API) – some service open on the Internet that my device can easily request data from, for example the weather, blockchain transactions, or new email notifications.

Occasionally, I end up with a type of data that requires processing or is not well structured for storage on these services, or else I need a device to request data that is private or that no one is presently offering. Most commonly, I need to change some parameter in a few connected devices without the trouble of finding them, opening all the cases, and reprogramming them all.

At these times it’s useful to be able to build simple, short-lived services that fill in these gaps during prototyping. Far from being a secure or consumer-ready product, we just need something we can try out to see if an idea is worth developing further. There are many valid ways to do this, but my first choice is Web2Py, a relatively easy to use open-source framework for developing web applications in Python. It supports both Python 2.7 and 3.0, although we’ll be using Python 3 today.

Initial Setup: Spin Up a Linux Server

Before we begin, we’ll need 2 things: a Google Cloud Compute VM or equivalent server running Ubuntu or Debian, and a domain name. Presently Google offers a free tier as well as a fair amount of free credit, and either will provide enough resources for what we’re doing today. A domain name will cost you around USD 10 and can be obtained from any domain registrar. In this article, we’ll call that ‘yourdomain.com’.

Once you have that, point the A record of your domain name to your server through whatever interface your registrar provides. Then log in to your server over SSH or equivalent, and create a self-signed certificate to enable HTTPS later on:

$openssl genrsa -out server.key 2048 $openssl req -new -key server.key -out server.csr $openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

We’ll need HTTPS enabled as Web2Py will not allow remote administrator login without it. Next, we’ll install the packages we’ll need to run Web2Py with Python 3. A virtual environment for Python 3 is possibly a better way to do this, but in my case I didn’t really require it.

$sudo apt-get update $sudo apt-get install python3-setuptools $sudo easy_install3 pip $sudo apt-get install python3-dev

Then we set up Web2Py itself by downloading the source code here, unzipping the file, and running it with:

$python3 web2py.py -a 'youradminpassword’ -c /path/to/server.crt -k /path/to/server.key -i 0.0.0.0 -p 8000

 

Well hello to you too, world!

We’ll be using port 8000 for Web2Py in this example, so as a final step in our setup, we’ll need to make sure that port is open to TCP traffic. In Google Cloud you can do this under network–>VPC Network–>Firewall rules.

If visiting https://www.yourdomain.com:8000 results in a welcome page, everything is working.

You may want to keep Web2Py running after you close your SSH session, in this case I recommend using tmux.

Storing Data From Your Devices

Now that we have a working environment, we’ll begin setting up our first system – one that lets us store data from devices. Web2Py uses a Model-View-Controller architecture. When we create a new application called ‘rxdata’, it will already have a default model called db.py, a default controller called default.py, and a default view called default/index.html.

We’ll begin by defining a simple SQLite database model to store our data. We open up db.py and add the following to the end of the file:

service = Service() db.define_table('mydata', Field('device', type='string', length=30, default=None,required=False, unique=False), Field('rxtime', type='string', length=30, default=None,required=True, unique=False), Field('datastore','text',label=T('Device Data'),requires = [IS_NOT_EMPTY(error_message='Data Field is Required')]))

This gives us three fields – one to identify where the data is from, another for when it was received, and finally a field to contain the data itself.

Now, we save that file and open the controller default.py to define how our data will be accessed and handled by users. Web2Py has a neat feature called a smartgrid that gives us a simple GUI that handles creating, reading, updating, and deleting data (CRUD). Note that I’ve purposely disabled user authentication here by adding ‘user_signature=False’ – you’ll probably want to enable that when you’re done testing.

import time import datetime def index(): response.view = 'generic.html' # use a generic view grid = SQLFORM.smartgrid(db.mydata, deletable=True, editable=True, user_signature=False) return dict(grid=grid)

Next, we need to define a service that allows our Internet of Things devices to insert data into the database. Note that I haven’t included any authentication or encryption here for brevity, but it would not be too difficult to apply some of the techniques I’ve outlined in a previous article to HTTPS rather than MQTT.

@service.run def receive(chipid,newdata): time = str(datetime.datetime.now()).split('.')[0] ins = db.mydata.validate_and_insert(device=chipid,rxtime=time,datastore=newdata) return newdata def call(): session.forget() return service()

With this service, you can take data passed through an HTTPS request into the database. The function ‘rxdata’ takes two parameters, chipid and newdata. There are two formats to provide these parameters, either by accessing https://www.yourdomain.com:8000/rxdata/default/call/run/receive/chipid/newdata
or with:
https://www.yourdomain.com:8000/rxdata/default/call/run/receive?chipid=chipid&newdata=newdata

Lets look at how we might do that on an ESP8266 running NodeMCU using the latter format. Note that you’ll need to compile with TLS support to allow HTTPS for this to work:

function senddata() chipid = node.chipid() data = “This is the data you are sending” print(data) url = "https://yourdomain.com:8000/rxdata/default/call/run/receive?chipid=" .. chipid .. "&newdata=" .. data print(url) http.get(url, nil, function(code, data) if (code < 0) then print("HTTP request failed") function_if_failed() else print(code, data) function_if_successful() end end) end

Since the service returns the parameter ‘newdata’, when we’re looking at the ESP8266 console we ought to see a confirmation that looks something like ‘200 <same data we sent>’, along with some new entries in our database when accessed at https://www.yourdomain.com:8000/rxdata:

The search functions in the GUI are really quite useful, and you can export data in various formats. Controlling Devices Is A Simple Tweak

A moment ago, we sent data from a device by requesting a URL containing the data we wanted to send, and received a response from the website echoing back the data. What if we were requesting commands rather than sending data? It turns out a simple implementation only requires a slightly different service defined in our default.py controller:

@service.run def command(): command = 1 return command def call(): session.forget() return service()

When a device accesses https://www.yourdomain.com:8000/rxdata/default/call/run/command, it will receive the command ‘1’. We might implement this as follows:

function startup() url = "https://www.yourdomain.com:8000/rxdata/default/call/run/chan" http.get(url, nil, function(code, data) if (code &amp;amp;amp;amp;amp;amp;amp;lt; 0) then print("HTTP request failed. Retrying.") else print(code, data) command = data carry_on() end end) end

Also on the device end, I typically configure a few modes of operation depending on what command is received, or allow the command to set the value of some parameter such as the sampling rates, authorized users, deep sleep times, or anything else I’m likely to have to frequently change in a prototype that will one day have a more complete backend.

I should mention that this lets me connect my toaster to even more things, because that’s regrettably the way my sense of humor works. That might be a story for another day, so… brace yourselves.

Death Generator Makes Game Over More Personal

พฤ, 02/21/2019 - 23:30

“Game over”. In this day and age of complex games with storylines and career modes that last for tens of hours, it’s not really a concept that has a lot of relevance. However, in the golden age of the arcade, those two words made it very clear that your time was up and it was time to find another quarter. Home games of this era were similarly blunt, and if you couldn’t rise to the challenge, you’d be seeing the death screen more often than not.

[foone] was a fan of Sierra’s classic adventure games, and decided to create a tool to generate custom versions of these Game Over/YOU DIED screens. Aptly named Death Generator, the tool is programmed in JavaScript and quickly expanded to cover a wide realm of classic titles. There are King’s Quest IV and V, Gold Rush!, and even modern titles like Cave Story+ and Undertale. There’s plenty of fun to be had typing in completely ridiculous quotes for various screens; our personal favourite is Skate or Die, though Police Quest comes a close second.

[foone] continues to maintain the site, and adds new games from time to time. Animated GIF support has been a recent addition for screens like Metroid and Bad Dudes, and there are even character choices for Super Mario Bros. The code is available on Github if you feel the need to tinker yourself.