The Clickiest Keyboard Ever

No matter how clicky your keyboard is, nothing compares to the sensory experience of using a typewriter. The sounds that a typewriter makes, from the deep clunk of hitting the spacebar to the staccato of keys striking paper to the ratchety kerchunk of returning the carriage, are a delight compared to the sterile, soulless clicks of even the noisiest computer keyboard. Oh, and the bell — who doesn’t love the bell?

Unwilling to miss out on the feel of real typing, [Jatin Patel] whipped up this solenoid-powered typewriter simulator. The first version had the core functionality, with a line of six solenoids mounted to a strip of wood. The coils are connected to an Arduino through a relay board; a Python program running on his PC reads every keypress and tells the Arduino which solenoid to fire. Each one sounds different somehow, perhaps due to its position on the board, or maybe due to differences in mounting methods. Whatever the cause, the effect is a realistic variability in the sounds, just like a real typewriter.

Version two, shown in the video below, ups the simulation with a motor that moves the solenoid rack one step with each keypress, to simulate the moving carriage of a typewriter. The last solenoid rings a bell when it’s time to return the carriage, which is done with a combination wrench as a handle. Weird hex, but OK.

Can’t get enough typewriter action? We understand; check out this typewriter-cum-USB keyboard, the tweeting typewriter, or this manual typewriter that pulls some strings.

Continue reading “The Clickiest Keyboard Ever”

This Animatronic Mouth Mimics Speech With Servos

Of the 43 muscles that comprise the human face, only a few are actually important to speaking. And yet replicating the movements of the mouth by mechanical means always seems to end up only partly convincing. Servos and linkages can only approximate the complex motions the lips, cheeks, jaw, and tongue are capable of. Still, there are animatronics out there that make a good go at the job, of which this somewhat creepy mechanical mouth is a fine example.

Why exactly [Will Cogley] felt the need to build a mechanical maw with terrifying and fairly realistic fangs is anyone’s guess. Recalling his lifelike disembodied animatronic heart build, it just seems like he pursues these builds for the challenge of it all. But if you thought the linkages of the heart were complex, wait till you see what’s needed to make this mouth move realistically. [Will] has stuffed this pie hole with nine servos, all working together to move the jaw up and down, push and pull the corners of the mouth, raise and lower the lips, and bounce the tongue around.

It all seems very complex, but [Will] explains that he actually simplified the mechanical design to concentrate more on the software side, which is a text-to-speech movement translator. Text input is translated to phonemes, each of which corresponds to a mouth shape that the servos can create. It’s pretty realistic although somewhat disturbing, especially when the mouth is placed in an otherwise cuddly stuffed bear that serenades you from the nightstand; check out the second video below for that.

[Will] has been doing a bang-up job on animatronics lately, from 3D-printed eyeballs to dexterous mechatronic hands. We’re looking forward to whatever he comes up with next — we think.

Continue reading “This Animatronic Mouth Mimics Speech With Servos”

Snakes And Ladders: Game Boy Emulator In Python

If a Game Boy was a part of your childhood, you were probably more than once dreaming of spending your entire school day with it. Well, they had to wait a few more years for that, but eventually in 2015, [Asger], [baekalfen], and [troelsy] made that dream reality when they created a Game Boy emulator in Python for a university project. However, it didn’t stop there, and the emulator has since grown into a full-blown open source project, PyBoy, which just reached the version 1.0 release.

Since it started out as an academic project, the three of them had to do their research accordingly, so the background and theory about the Game Boy’s internal functionality and the emulator they wrote is summarized in a report published along with the source code. There is still some work to be done, and sadly there is no sound support implemented yet, but for the most part it’s fully functional and let’s you successfully play your own extracted cartridges, or any ROM file you happen to have in your possession.

Being an emulator, you can also inspect its inner life when run in debug mode, and watch the sprites, tiles, and data as you play, plus do cool things like play the emulation in reverse as shown in the clip below. Even more so, you can just load the instance in your own Python scripts, and start writing your own bots for your games — something’s we’ve seen in action for the NES before. And if you want to dive really deep into the world of the Game Boy, you should definitely watch the 33c3 talk about it.

Continue reading “Snakes And Ladders: Game Boy Emulator In Python”

KiCad Panelization Made Easy

There’s a new Python-based script that will panelize your KiCad circuit boards from the command line. The project by [Jan Mrázek] is called KiKit and works on .kicad_pcb files to arrange them in a grid with your choice of mousebites or v-cuts for separating the boards after production.

When working with smaller boards it’s common practice to group them together into panels. This is done to speed up PCB assembly as multiple boards can have solder paste applied, go through a pick and place machine, and be sent into the reflow oven as a single unit. Often this is done manually, but in many cases this script will save you the time while delivering the results you need.

Let’s say you really wanted to make a whole bunch of those Xling open source Tamagotchi-like key fobs we saw a couple of weeks back. Using KiKit you can gang up six of the boards at a time, using “mousebites” to keep them together during production but make it easy to separate them after all the components are soldered:

/usr/local/bin/kikit panelize grid --space 3 --gridsize 2 3 --tabwidth 3 --tabheight 3 --htabs 2 --vtabs 1 --mousebites 0.5 1 0.25 --radius 1 Xling/hardware/xling.kicad_pcb xling_panel.kicad_pcb

You can see that the parameters let you set space between the boards, number of boards in the grid, width of the tabs, tab dimensions, number of tabs between boards, and even the radius of the curve where the tabs meet the board. These settings were pulled from the examples page, which demonstrates outcomes for many different settings options.

If you want to give this a try, we suggest installing directly from the repository, as improvements are ongoing and the pip3 version didn’t have all of the options shown in the examples. For us this was as easy as sudo python3 setup.py install and then calling the script with the full path /usr/local/bin/kikit.

Results from this board are both impressive and cautionary. You can see the top edge of the design is recessed yet the most up-to-date version of KiKit was still able to make the connection. However, how this affects the USB connector on the bottom of the board design may be something to consider before pulling the trigger on your panel order.

Core Devs Say A Fond But Firm Farewell To Python 2

Saying that it was finally time for the community to bid a “fond but firm farewell to Python 2”, core developer Benjamin Peterson marked the release of Python 2.7.18 on April 20th; officially ending support for the 2.x branch of the popular programming language. It was hardly a snap decision. Python 3.0 was released all the way back in December 2008, and it was never a secret that the newer branch was not only incompatible with the earlier version, but that it would eventually superseded it to become the standard.

But migrating the incredible amount of Python code in the wild over to the latest and greatest was easier said than done. Millions upon millions of lines of code used in everything from Linux distributions to virtually every major web service needed to be reviewed and migrated over to Python 3. In many cases the changes were relatively minor, but when code is being used in mission critical applications, even the smallest of changes are often avoided unless it’s absolutely necessary. The voluntary migration took far longer than expected, and the end-of-life (EOL) for Python 2 was pushed back by years to accommodate developers who hadn’t made the necessary changes yet.

Given the somewhat fluid nature of the Python 2 EOL date, it seems fitting that this last final release would come several months after the “official” January 2020 deadline. The intention was for it to coincide with PyCon 2020, but just like so many of the events planned for the first half of the year, the in-person conference had to be canceled in favor of a virtual one due to the COVID-19 epidemic. That might have stymied the celebration somewhat, but the release of Python 2.7.18 will still be looked on as a special moment for everyone involved.

Continue reading “Core Devs Say A Fond But Firm Farewell To Python 2”

Industrial Robot Given New Life And Controller

We all think we could use a third arm from time to time, but when we actually play this thought experiment out in our heads we’ll eventually come to the same hurdle [caltadaniel] found, which is a lack of a controller. His third arm isn’t just an idea, though. It’s a Yaskawa industrial robot that he was able to source for pretty cheap, but it was missing a few parts that he’s been slowly replacing.

The robot arm came without a controller or software, but also without any schematics of any kind, so the first step was reverse engineering the wiring diagram to get an idea of what was going on inside the arm. From there some drivers were built for the servos, but the key to all of it is the homemade controller. The inverse kinematics math was done in Python and runs on an industrial PC. Once it was finally all put together [caltadaniel] had a functioning robotic arm for any task he could think of.

Interestingly enough, while he shows the robot brushing his teeth for him, he also set it up to flip the switch of a useless machine that exists only to turn itself off. There’s something surreal about a massive industrial-sized robotic arm being used to turn on a $20 device which will switch itself back off instantly, but the absurdity is worth a watch.

Continue reading “Industrial Robot Given New Life And Controller”

Stay Informed: How To Pull Your Own COVID-19 Data

For all the technology we have, it can still be frustratingly difficult to get any concrete information from the media. Sometimes all you want to do is to cut through the noise and see some real numbers. Watching talking heads argue for a half hour probably isn’t going to tell you much about how the COVID-19 virus is spreading through your local community, but seeing real-time data pulled from multiple vetted sources might.

Having access to the raw data about COVID-19 cases, fatalities, and recoveries is, to put it mildly, eye-opening. Even if day to day life seems pretty much unchanged in your corner of the world, seeing the rate at which these numbers are climbing really puts the fight into perspective. You might be less inclined to go out for a leisurely stroll if you knew how many new cases had popped up in your neck of the woods during the last 24 hours.

But this article isn’t about telling you how to feel about the data, it’s about how you can get your hands on it. What you do with it after that is entirely up to you. Depending on where you live, the numbers you see might even make you feel a bit better. It’s information on your own terms, and in these uncertain times, that might be the best we can hope for.

Continue reading “Stay Informed: How To Pull Your Own COVID-19 Data”