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

An Abstract Kind of Clock: The Chinese Remainder Clock

อังคาร, 08/28/2018 - 12:01

Hackaday likes clocks, a lot. Speaking personally, from my desk I can count at least eight clocks, of which seven are working. There’s normal quartz movement analog clocks, fun automatic wristwatches, run-of-the-mill digital clocks, a calculator watch, and a very special and very broken Darth Vader digital clock/radio combo that will get fixed one day — most likely. Every clock is great, and one of life’s great struggles is to see how many you can amass before you die. The more unique the clock is, the better, and nothing (so far) tops [Antonella Perucca]’s Chinese Remainder Clock.

It’s 1:20:27 AM, the perfect writing time

What separates [Antonella Perucca]’s clock from the rest lies in the Chinese Remainder Theorem, an eighteen hundred year old idea from Chinese mathematician Sunzi. Basically, when applied to the positive integers, the Chinese Remainder Theorem states that the set of integers modulo some positive integer N is equivalent (isomorphic as rings) to the product of the sets of integers modulo factors of N such that these factors are all relatively prime to each other and their product is N.

It sounds a mouthful, but it actually makes a lot of intuitive sense. Take for example N = 6. The set of integers modulo 6 is S = {0, 1, 2, 3, 4, 5}.  2 and 3 are relatively prime to each other and their product is 6. The set of integers modulo 2 and 3 are {0, 1} and {0, 1, 2} respectively. If you form the product of these two sets, you get the set T = {(0,0), (1,0), (0,1), (1,1), (0,2), (1,2)}. If you take any element x from S and send it to the element (x mod 2, x mod 3) in T, you quickly see how the two sets can be considered equivalent. Each element in S is sent to one and only one element in T, and both sets have the same number of elements. Taking N to be 6 may seem like an easy number to work with, but the beauty of the Chinese Remainder Theorem shows this same concept holds for any positive integer.

Now how does this apply to clocks? Well, two relatively prime factors of 12 are 3 and 4. Three relatively prime factors of 60 are 3, 4, and 5. We’re doing clock arithmetic modulo 12 and 60 anyway. Thus we can directly apply our theorem. Each hour can be represented uniquely by its remainder modulo 3 and 4. Each minute and second show up as their remainders modulo 3, 4, and 5. In the diagram above, imagine each circle starts at 0 and goes up clockwise by 1 for each bubble. The hours are the inside circles, the minutes are the outside circles, and the seconds are the tiny bubbles following the minutes. A clock starts to emerge then. Of course, you don’t have to stick with the somewhat familiar circular clock-face. You can use the same concept digitally, as in the image the very top of the article. Or you can go even further off the beaten track and rely completely on shaded polygons for that true abstract feel.

[Antonella Perucca] introduced the idea in “The College Mathematics Journal” less than a year ago, so it hasn’t seen too much use yet. However, anything that’s been done with regular clocks can be done with this one, and by sharing its existence, hopefully we get some really intriguing projects. It can even be in binary, for old time’s sake.

The Solution To Oversized Dev Boards: A Literal Hack

อังคาร, 08/28/2018 - 09:00

Oh, there was a time when you could prototype just about everything on a breadboard. The CPU in your computer came in a DIP package, and there were no BGA packages. to be found anywhere. In the forty years since then, chips have gotten smaller, packages have gotten more cramped, and you can barely hand-solder the coolest chips anymore. No worries — companies are still spitting out dev boards with 0.1″ headers, but there’s a problem: they don’t fit on a solderless breadboard. They’re too wide. Our world is falling apart.

[Luc] had a problem when he was playing with a few NodeMCU dev boards. These are too wide for a breadboard. [Luc] came up with not just one solution, but two. This is how you prototype with dev boards that are too large.

The solution came to [Luc] when he realized the center of every breadboard has no electrical connections, and was simply held together by a little piece of plastic. Yes, he took a hacksaw to the breadboard. This is technically a hack.

With two halves of a solderless breadboard torn asunder, [Luc] had an easy way to prototype with dev boards that are just too wide. But there is a simpler solution [Luc] realized after he destroyed a breadboard: those ubiquitous solderless breadboards have detachable power rails. If you simply take one of those power rails off, you have an easy way to use two breadboards across a module that’s too wide for one solderless breadboard.

Is this a hack? Oh, absolutely. [Luc] used a hacksaw. It’s also a nice reminder of a common trick that the noobies might not know. Thanks for that, [Luc].

Making A Vintage 1990s Sound Board Do Rapid Fire Silently

อังคาร, 08/28/2018 - 06:00

Sometimes a mix of old and new is better than either the old or new alone. That’s what [Brad Carter] learned when he was given an old 1990s sound board with a noisy SCSI drive in it. In case you don’t know what a sound board is, think of a bunch of buttons laid out in front of you, each of which plays a different sound effect. It’s one way that radio DJ’s and podcasters intersperse their patter with doorbells and car crash sounds.

Before getting the sound board, [Brad] used a modern touchscreen table but it wasn’t responsive enough to get a machine gun like repetition of the sound effect when pressing an icon in rapid succession. On the other hand, his 1990s sound board had very responsive physical buttons but the SCSI hard drive was too noisy. He needed the responsiveness of the 1990s physical buttons but the silence of modern solid state storage.

And so he replaced the sound board’s SCSI drive with an SD card using a SCSI2SD adaptor. Of course, there was configuration and formatting involved along with a little trial and error to get the virtual drive sizes right. To save anyone else the same difficulties, he details all his efforts on his webpage. And in the video below you can see and hear that the end result is an amazing difference. Pressing the physical buttons gives instant sound and in machine gun fashion when pressed in rapid succession, all with the silence of an SD card.

A SCSI2SD card is a nice off-the-shelf solution but if you want something a little more custom then there’s a Raspberry Pi SCSI emulator and one which uses a Teensy with a NCR5380 SCSI interface chip.

Our thanks to [radiodork] for sending in a tip about this.

GPL Violations Cost Creality a US Distributor

อังคาร, 08/28/2018 - 03:01

One of the core tenets of free and open source software licenses is that you’re being provided source code for a project with the hope that you’ll “pay it forward” if and when you utilize that code. In fact some licenses, such as the GNU Public License (GPL), require that you keep the source code for subsequent spin-offs or forks open. These are known as viral licenses, and the hope is that they will help spread the use of open source as derivative works can’t turn around and refuse to release their source code.

Unfortunately, not everyone plays by the rules. In a recent post on their blog, Printed Solid has announced they are ending their relationship with Chinese manufacturer Creality, best known for their popular CR-10 printer. Creality produces a number of printers which make use of Marlin, a GPLv3 licensed firmware that runs (in some form or another) a large majority of desktop 3D printers. But as explained in the blog post, Printed Solid has grown tired with the manufacturer’s back and forth promises to comply with the viral aspects of the GPL license.

Rather than helping to support a company they believe is violating the trust of the open source community, they have decided to mark down their existing stock of Creality printers to the point they will be selling them at a loss until they run out. In addition, for each Creality printer that is sold Printed Solid has promised to make a $50 USD donation to the development of Marlin saying: “if Creality won’t support Marlin development then we will.”

As is often the case when tempers are high and agreements break down, Printed Solid has also pulled back the curtain a bit as to the relationship they have had thus far with the manufacturer. According to the blog post, Printed Solid claims that some models of Creality printers have had a 100% fault rate, and that the company needed to repair and tweak the machines before sending them out to customers. The not so subtle implication being that Creality printers have been benefiting from the work Printed Solid has been doing on their hardware, and that purchasing a unit direct from the manufacturer could be a dicey proposition.

We’ve previously covered an issue with Creality’s CR-10S printer that required the end-user to replace an SMD capacitor just to get reliable results out of the machine, and of course we’ve talked of the extra work that’s often required when wrangling a low-end Chinese printer. It’s even more disheartening when you realize cheap machines sold by shady manufacturers are pushing open source manufacturers out of business.

Let the Musical Instrument Challenge Begin!

อังคาร, 08/28/2018 - 01:31

Today is the start of the Musical Instrument Challenge. This newest part of the 2018 Hackaday Prize asks you to go far beyond what we’re used to seeing from modern musical instrumentation. Twenty entries will be awarded $1,000 each and go on to compete in the final round of the Hackaday Prize.

Imagine music without the electric guitar amp, violin, two turntables and a microphone, the electric drum pad, or in the absence of autotune. Maybe that last one made you groan, but autotune is a clever use of audio manipulation and when used to augment the music (rather than just to correct off-key voices) it shows its value as a new tool for creativity.

Musicians have always been hackers. The story of Brian May’s handmade guitar — the Red Special — is one of not being able to buy it, so he built it. Unlocking emotion in the listener has always meant finding new and different ways to use sound. This is a natural motivator to re-imagine and invent new ways of doing that. That first hand-built guitar got him in the door, but iterative improvements to the tremolo bar, the pickups, and even just the mechanical engineering of the neck made it a new instrument that you’ve heard in every Queen performance since.

So what’s next? What does a brand new instrument, interface, tool, or trick look like? That’s what we want to see from this Hackaday Prize challenge. From instrument makers to the people who write software for sampling, synthesizing, sequencing, and manipulating sound, we’re looking for things that let others make music. These creations are the tools of the trade that help more people unlock their musical creativity. Show off your work by sharing all the details of your design, and demonstrate the music you can make with it.

You have until October 8th to put your entry up on Hackaday.io. The top twenty entries will each get $1,000 and go on to the finals where cash prizes of $50,000, $20,000, $15,000, $10,000, and $5,000 await.

The HackadayPrize2018 is Sponsored by:

FOSSCON 2018: Hacking the Indego Bike Sharing API

อังคาร, 08/28/2018 - 00:01

It’s often said that necessity of the mother of invention, but as a large portion of the projects we cover here at Hackaday can attest, curiosity has to at least be its step-mother. Not every project starts with a need, sometimes it’s just about understanding how something works. That desire we’ve all felt from time to time, when we’ve looked at some obscure piece of hardware or technology and decided that the world would be a slightly better place if we cracked it open and looked at what spilled out.

That’s precisely the feeling Eric O’Callaghan had when he looked out the window of his Philadelphia apartment a few years back and saw something unusual. Seemingly overnight, they had built an automated Indego bike sharing station right across the street. Seeing the row of light blue bicycles sitting in their electronic docks, he wondered how the system worked, and what kind of data they might be collecting. He didn’t need to rent a bike, he hadn’t even ridden one in years, but he suddenly had a strong urge to go across the street and learn as much as he could about this system.

He recently presented those findings during FOSSCON 2018 at the International House in Philadelphia, in the hopes that others might be interested in getting involved. Currently Eric is one of the only people who’s investigating the public data Indego offers, and as his personal MySQL database has now surpassed 15 million rows of data, he’s hoping to get some developers with big data experience into the fray. His approach to making this data useful is an interesting one which I’ll dive into after the break.

The Indego API

Eric started the presentation by explaining that the official “API” offered by Indego isn’t really much of an API at all, at least not in the way you’d expect. You can’t request data for a certain time, or even a particular location. When you send a request you simply receive a JSON file that includes a snapshot of all available data in the system, which currently comprises over 120 stations scattered throughout the city.

So the first step was to create a tool that takes this data and breaks it down into a more useful format. He created a PHP library for manipulating this data, and then followed up with a Python version later on. With these libraries, the user is able to filter out extraneous information and see the number of bikes available at a single location. Eric then went on to create a website which allows visitors to see, in real-time, the number of bikes available at every Indego station in the city.

In another case of curiosity driving the mind of the hacker, Eric decided he might as well start storing snapshots of this JSON data if they’re just going to be handing it out. Who knows what kind of interesting trends might show up? So he created a script which would send a request to the Indego API every 10 minutes on his personal server, and add the resulting data to a database. He can now see how many bikes were available at a certain station at any time going all the way back to 2015; a capability that he believes Indego themselves might not even have.

Historical Hacking

Whether or not Indego has historical data on bike usage is perhaps debatable, but surely there’s no other public source for much of the information Eric has collected. This revelation got a few people in attendance to start brainstorming possible exploits that this trove of information makes possible.

One person wondered if it wouldn’t be possible to compare daily data and attempt to find individual travelers. In other words, if station A always has a bike checkout at 8:45 AM, and station B always checks one in at 9:00 AM, could you assume that you’ve found the commute to work for a particular individual? This wouldn’t tell you their identity of course, but knowing someone’s schedule could be used as part of a larger social engineering attack.

Another individual in attendance pointed out that Indego has a policy where if you attempt to return a bike to a station that currently has no open spots, your ride is extended for free. Using Eric’s library, one could conceivably plot a route through the city that would bounce between full stations, continually extending your ride time. You probably couldn’t get away with it for long, but it would be an interesting experiment.

Future Work

Looking ahead, work needs to be done in documenting all the fields in the JSON response, as Eric limited his own code to the parts of the data that interest him the most (location of station and how many bikes were available). There are also issues when new stations are added, or worse, when a station has its ID number changed. Finally, new and better visualizations could be developed that help put this data to work for those who use the system.

Eric admits he’s no programmer, nor an expert on data analysis. He’s just a guy who saw something interesting outside of his apartment one day. His hope is that this sampling of what’s possible with the Indego data will inspire others with more experience to take the reins and realize the project’s full potential.

Self Folding Origami from a 3D Printer

จันทร์, 08/27/2018 - 22:31

If you’ve done much 3D printing, you probably curse how plastic warps as it cools down and heats. There’s nothing more upsetting than watching a six hour print start curling off the bed and starting its inexorable march to the trash can. However, researchers at Carnegie Mellon have found a way to harness that tendency to warp with heat to make self-folding structures like those seen in the video below. There’s a paper about how it works available, too.

The Thermorph process uses commercially-available 3D printers, but requires special software. You might wonder why you would want to fold, say, a rose, when you could just print it as a fully-formed 3D model. The paper suggests that printing self-folding structures is faster and can save up to 87% on print times for the right models.

The paper is a combination of material science, topography, and design. They use a browser-based modeling tool to determine the shapes to print, but it wasn’t clear if that software is available to others. Judging from the paper, they import a standard 3D model, simplify its mesh, unfold the mesh, and then make particular fold lines. The results are pretty impressive.

Printing is really becoming mainstream these days with the Marines printing parts and guest appearances on Lost in Space. Being relatively new — at least in common use — there are bound to be many new techniques in the days ahead. It remains to be seen which will stand the test of time and which will be essentially dead ends.

Selling Everything, Moving to Asia, and Setting Up a Company

จันทร์, 08/27/2018 - 21:01

Today I don’t have a hack for you. I have a story, one that I hope will prove useful to a few of you who are considering a move to Asia to chase opportunities here.

Seven years ago, I was a pretty stereotypical starving hacker. I had five jobs: A full-time dead-end job in biotech, and four part-time or contract gigs that were either electronic hardware design or programming. I worked perhaps 50 hours a week, and was barely past the poverty line – I was starting to wonder why I spent so much time in school. I saw the economic growth in Asia as an attractive but risky opportunity.

Check out that image above…France? No, this is Shenzhen and let’s face it: many exciting things are made there (even the copies). After a short visit to the region, I decided to take that risk but not in Shenzhen. I sold everything I owned and moved from Canada to Vietnam and started a company. Over the last seven years things have worked out well, although I certainly wish I had known more about the process before I got on a plane. This article is about the general path I took to get where I am. Obviously I don’t know the legal framework of every country in Asia, but speaking in generalities I hope that I can cover some interesting points for the curious and adventurous.

The first thing to say is that establishing yourself in another country is hard. My grandparents moved to Canada from Poland in the 1960’s with essentially the clothes on their backs, and without a working knowledge of English or French. I always listened to their stories and admired them for their perseverance. Perhaps there is someone like that in your family, and maybe you’ve admired (or rolled your eyes at) their stories. The fact is though, their tales of hardship are not only probably true, but they’ve spared you the worst of it.

Before You Leave: Sorting out Finances

To avoid a little of that hardship, the first step towards moving to Asia is preparation. We can divide that into two categories: financial and personal. On the financial end, you’ll need a little money. I would say a reasonable minimum is living expenses for a year in your destination, plus any amount needed to set up a company (do some preliminary research). If you plan to keep your foreign bank account, give someone you trust power of attorney over it. Banks are fickle creatures, require that you show up in person to do a number of things, and having a legal representative in your home country costs nothing and can save you a world of pain.

Next, take some steps to prevent identity theft. At the very least make sure that any official documents are being mailed somewhere safe. I was quite careful about this, my identity was still stolen, and it was quite a pain to sort out. Hopefully you will have better luck.

Then it’s time to think about taxes. Chances are you’re not going to make much (or any) money in the first year, so if you’re eligible for an income tax refund from tax paid at your last job, you can work out the optimal time of year to move.

Before You Leave: Sorting Yourself Out

On a personal level, first and foremost you’ll need to have a skill set that is realistically in demand, preferably something that is possible to do remotely. This lets you potentially operate as a freelancer or part-time employee (depending on labor laws) in a sector related to what you want to do while you get the hang of things. Web development or digital marketing are common choices, and while viable, be advised it’s a crowded market for those things here, and scale your salary expectations accordingly. Teaching English without full qualifications as a teacher in your home country is unlikely to build a professional network in the tech sector; my strategy was to avoid it completely, and I think that was the right choice.

Next up is avoiding errors in mindset. Probably the single wisest thing I did was to see myself as an immigrant: that means working harder for less money, and being cautious of being taken advantage of. This is very different from the attitude I occasionally encounter at different ‘expat’ communities in Asia. I want to keep this article positive, so I’ll leave it at that.

It also wouldn’t hurt to read our some of Hackaday’s Life on Contract articles. Many of us are (or have been) working as contractors in the hardware or software world and have contributed to this series of articles. The advice there has helped me more than a few times.

That brings us to the next point: Make sure you love your job, then structure your life to accept longer working hours. Nine-to-five isn’t really a thing in Asia, for reference I work 60-80 hours a week and take about one day off a month. I realized that if I treat my business as a hobby it would remain one, and I committed to putting in the hours to get it off the ground. To my surprise, I have at no point felt healthier or less stressed – working every day means that there are always exciting opportunities to seize, and enough hours to do so with both hands.

We’ve all heard of the long office hours of Japanese ‘salarymen’. If that’s your competition, then chances are you’ll have to work harder and longer. That’s why it’s essential that you work on things you love.

Finally, you’ll want to learn enough of the relevant language and culture before you arrive to not be a jerk. It’s easy to learn more once you arrive, but sort out the basics before you get on a plane. While I speak very basic Vietnamese, in hindsight I regret not spending more time learning the language before everything became too busy.

Finally, You’ve Arrived Do take some time to enjoy the sights before getting to work. There are many truly wonderful things here (the food is one). Things will get busy and it will be hard to find time later.

You’ve arrived, and taken a few weeks off to tour around and get the hang of things. Now you’re ready to get to work, and wondering where to start. This is where I suggest something that is occasionally considered controversial by locals and foreigners: open a company, become a legal resident, register with the tax authority, and obtain a driving license. What type and structure of company you open depends on many factors and is beyond the scope of this article, although I opened a limited liability company with myself as the sole owner.

While many people have told me it was unnecessary, and I could just illegally work and avoid tax, there’s a reason that’s unrealistic. Simply put: a legitimate company gives you access to instruments that let you scale.

No one will be willing to sign a significant contract with you unless you can legally enter that contract, issue an invoice, and have some liability for the work being completed once payment is issued. Not to mention if you ever become even moderately successful, you’ll be big enough to be noticed, caught, and deported.

The exact method to do this varies by jurisdiction. A good way to start (if you are in a communist country) is to read the five-year plan or a summary of it. Do any of the sectors outlined in the plan touch on aspects of your business idea or skillset? If so, you may be able to get some benefit upon opening a company licensed in that area. Examples might include significantly reduced taxes or required starting capital. I was able to do this, and it helped considerably.

It might not look like much, but never lose this.

Next, network at co-working spaces, explain what you want to do, and ask for a reference to a lawyer. I’ve seen legal fees vary by a factor of five for opening a foreign-owned company, depending on the size and specialization of the law firm, so a referral to the right lawyer will save you a lot of money when you need to do something so straightforward. Explain to your lawyer what you want your company to be able to do, and ask if there are any government programs (e.g. tax breaks) you can take advantage of. Before you pay any significant money, ask them to quickly explain how you can get legal residency as a company owner and make sure you can go through the process.

In several Asian countries, companies are only allowed to operate within the sectors of the economy they are licensed for. In this case, always add consulting to your business license – unexpected opportunities will come up and this will allow you to take them on within reason. As part of the company registration process, you’ll receive a company seal or stamp. Do not ever lose or damage this as it is your company’s legally binding signature.

Your lawyer will also be able to tell you if you’re legally required to rent a specific type of office, and connect you to an accountant. You will need them for tax compliance at least, but only for 2-3 hours a month so the price must reflect that.

Your new accountant will be able to register you at the tax authority, and help you learn how to issue legal invoices and contracts. Make sure to get at least a bilingual service contract and employment contract.

Finally, call a travel agency and ask them to get you residency. You may have to jump through some strange hoops, just do it patiently and insist on getting a legal invoice from the travel agent and paying taxes on it. Some are shady with regards to visas and residency so you want that paper trail! Your travel agent will also very likely be able to instruct you on how to get a driver’s license given your new residency. In my opinion, enjoying motorcycles (responsibly) is one of the great joys of Southeast Asia, and a license is also a useful piece of ID. The ones from your home country will one day expire and become difficult to replace.

Congratulations, You’re a CEO and a Resident

With what you have now, it should be relatively easy to open a company bank account. If you live in a country where there is no company owner’s draw, be aware you’ll likely need to open a personal account too, and issue a work contract between you and yourself to pay yourself between your accounts (not as confusing as it sounds).

With that done, your life is now immensely easier: you can use your company to enter into contracts. Not only does this let you operate confidently as a freelancer, it means a lot of services that are not typically available to foreign residents just became available to you, because you can operate as a local legal entity via your company.

At this point it may be a good idea to print business cards. Co-working spaces can normally help you with this, although you can also hire a designer if you need a logo and so on. Exchanging business cards is still somewhat of a ritual in Asia, so get yours designed and printed properly, on reasonably thick uncoated paper.

Networking: Learn It, Love It

Next is the part that I completely failed to do, and struggled for a year as a result: networking. I used to consider networking events useless, and just worked hard for my existing clients and developed technology I thought I would need later. What I missed out on were more interesting projects, and companies willing to pay me significantly more to do them. I literally went out to one networking event and not only doubled my company’s gross income, but found far more exciting work. The obvious lesson here was that I didn’t have to go to these events regularly, just once in a while to make sure I’m being paid market rates and working on the right projects.

Presentations. Gala dinners. Networking events. I always feel out of place at these, but they’re a profitable inconvenience.

With that you should be able to operate. Looking back, I’d say that the two most important things are to avoid participating in corruption and bad habits, and to cultivate a measure of stoicism. Asia offers a lot of distractions and legally-gray shortcuts, ignore them all. Focus on what you need to do to succeed, do it legally and well. If you’re in a developing country, a few truly terrible things will probably happen too. Deal with them stoically and get back to work – then if it makes a good story, save it for your grandchildren.

Time-Stretching Zoetrope Animation Runs Longer Than It Should

จันทร์, 08/27/2018 - 18:01

3D printers have long since made it easy for anyone to make 3-dimensional zoetropes but did you know you can take advantage of a 4th dimension by stretching time? Previously the duration of a zoetrope animation would be however long it took for the platform to rotate once. To make it more interesting to watch for longer, you filled out the scene by creating concentric rings of animations. [Kevin Holmes], [Charlie Round-Turner], and [Johnathan Scoon] have instead come up with a way to make their animations last for multiple rotations, longer than three in one example. If you’re not at all familiar with these 3D zoetropes, you might want to check out this simpler version first.

Their project name is 4-Mation but they call the time-stretching technique, animation multiplexing. One way to implement it is to use one long spiral beginning in the center and ending on the platform’s periphery. It’s the spiral path which make the animation last longer.

In their Fish eating Fish animation, the spiral is of a small fish which exits a clam at the center and gets progressively larger as it spirals outward until it swallows another fish located in a ring at the periphery. Of course when you look at it with a properly timed strobe light, there is no spiral. Instead, it appears as though a bunch of fish move more-or-less radially out from the center. The second video embedded below walks through the animation step-by-step, making it easier to follow the intricacies of what’s going on.

Other features include built-in strobe lighting and both manual and phone app control. This project is a product for a kickstarter campaign and so normally, details of the electronics would be absent. But clearly [Kevin] is familiar with Hackaday and sent in some additional info which you can find below, along with the videos.

The control board uses an ESP8266 running an Arduino core with a WebSockets API to communicate between the ESP8266 and the app. Specifically they’re using Markus Sattler’s arduinoWebSockets API on the ESP8266 and Takahiko Kawasaki’s nv-websocket-client on Android. They’re not sure if these are the best APIs to use so if you have an opinion, please leave a comment below.

For the strobe lights they’re using nine watt RGB LEDs with proper five mil chips (measured) for each channel. They’re slightly overvolting them with 24 V through 6 LEDs on each channel. With a full duty cycle they’d burn them out but they’re using a duty cycle of only around 1.5%. That’s because they found that for the animation to be sharp, the LEDs need to be on for about 0.5 milliseconds. The worm gear’s maximum speed is 100 RPM and they use a 2860-count/revolution encoder.

For power they have DC power switching supply circuits which divide the 24 V down to 12 V for the motor and 3.3 V for the ESP8266. Four “giant” 680 μF, 35 V Panasonic capacitors buffer the current between each strobe.

But the animation is the novel thing here and they’ve made their 3D models available on Thingiverse. They haven’t included the platform but that wouldn’t be too hard to replicate. For the fish animation, they suggest using a resin printer but we think that with support material and maybe a few tweaks, it should be printable with a filament printer. Or better yet, come up with your own animations!

Zoetropes can be used for more than just fun and education. They’re works of art. Check out this one which squashes four dimensions into three and this one of a man walking on the outer rim of a rotating wheel.

The Best New Quad Is A Bicopter

จันทร์, 08/27/2018 - 15:01

RCExplorer, or [David], or just ‘The Swede’, has come up with a bicopter kit. Yes, there are a lot of people making frames and kits for quadcopter, multicopters, drones, and so forth, but [David] is really the leader in weird multicopters. Now, we have the weirdest multicopter imaginable as a kit, complete with firmware that works.

[David] is one of the great unsung heroes of the drone and multicopter world. He’s famous for rocket knives, even though that really doesn’t have anything to do with drones, he bought an airplane for his front yard (again, little to do with drones), he was one of the first to take a glider up to 100,000 feet with a balloon, and he’s been one of the main forces behind tricopters as a superior — or at least cooler — platform for aerial acrobatics and camera work. There’s a lot of work being done to the various firmwares to support tricopters, and we have [David] to thank for that.

Like [David]’s earlier tricopter kits, this frame is made entirely out of carbon fiber plate, square tube, and threaded standoffs. It also looks like batman’s drone. The firmware — the real trick for a bicopter — is stock betaflight, and there are a few problems with the stock firmware. The bicopter doesn’t like flying backwards, tuning is fiddly, and it’s harder to fly than a quad on rails. That’s to be expected with a platform as weird as a bicopter, but this kit does open the door to firmware developers hacking and making the bicopter features better.

This is what delivery drones will look like, once the people who think delivery drones are a good idea learn physics.

While pure bicopters are great, the release of what will surely be a popular bicopter with a good community of firmware developers means the door is open to a simple VTOL fixed wing, not unlike a V-22 Osprey.

Remember, San Francisco tech bros, if you need a delivery drone, you need three things: long range, VTOL capability, and payload capacity. A quad or hexacopter will not get you there, and fixed wings will give you lift for free. There is no Moore’s Law for batteries, and right now if you want to ship a bottle of shampoo 20 miles in 30 minutes, the way to do that is with a drone that looks like a V-22 Osprey. Please, delivery drone bros, learn physics, use a tilt-rotor, and learn to put the battery in the wing. This is how you found a company that will get an easy $100M valuation.

2018 Electromagnetic Field Badge: It’s an Entire Phone!

จันทร์, 08/27/2018 - 12:00

As is always the case with a significant hacker camp, we’ve been awaiting the official badge announcement for the upcoming Electromagnetic Field 2018 hacker camp with huge interest. These badges, for readers who may have been on Mars for the past few years, are part of a lively scene of wearable electronics at hacker conferences and camps, and can usually be expected to sport a fully-fledged computer in their own right along with other special functionality.

The announcement of the 2018 badge, dubbed the TiLDA Mk4, does not disappoint. We’d been told that there would be an on-site GSM network for which the welcome packs would contain a SIM, and the well-prepared among us had accordingly dusted off our old Nokia handsets alongside our DECT phones. What we hadn’t expected was that the SIM would be for the badge, because the Mk4 is a fully-fledged hackable mobile phone in its own right. The network will be fully functional for  calls and texts within the camp, though since it does not explicitly say so we expect that external calls may be an impossibility. Afterwards though it will remain a usable device on any GSM network, giving it a lease of post-camp life that may see more of them staying in use rather than joining the hacker’s dusty collection in a drawer.

Beyond the party-piece phone it appears to follow the lead of its 2016 predecessor, with the same Python environment atop a TI chipset including an MSP432E4 ARM Cortex M4F microcontroller running at 120MHz with 256kB of internal and 8MB of external RAM, a CC3210 WiFi processor, and the usual battery of sensors, LEDs and GPIOs. Importantly, it also has a Shitty Add-on connector. The 2016 badge was remarkably easy to develop for, and we expect that there will soon be an impressive array of apps for this badge too. If any reader would like to put together a Hackaday feed reader app, we can’t offer you fortune but fame such as we can bestow awaits.

We’ll bring you more information as we have it about the TiLDA Mk4, as well as a hands-on report when one lands in front of us. Meanwhile you’d like to see a retrospective of past EMF badges as a demonstration of where this one has come from, have a read of our coverage of the 2016 and 2014 badges.

3D Printing a Printing Press

จันทร์, 08/27/2018 - 09:00

If you move among artists, you may have encountered a few printmakers. They create a drawing by cutting through a wax layer that has been deposited on a sheet of copper, then etching the plate and removing the wax. Ink is then rolled onto the plate and cleaned from the flat surface, remaining in the cracks created by the etching. A print is made by putting inked plate and a sheet of paper through a roller press at significant pressure, squeezing the ink from the cracks onto the paper. The result is a beautiful print, but the press required to do the job is by no means cheap.

[Martin Schneider] has addressed this expense with his Open Press project, by producing a printmaking press that can be 3D-printed for a fraction of the outlay of a traditional press. It’s by no means a large model, but appears no less functional for it.

The form of the press is straightforward enough, with a print bed that is drawn between a pair of rollers by a rack-and-pinion gear, and as you would imagine the construction is quite substantial. It’s all CC licensed, and you can make one for yourself if you would like, by downloading the files from Thingiverse.

It’s fair to say that printmaking hasn’t appeared much here, but we can see this press could have significant use beyond artistic applications. Meanwhile it’s a great example of 3D printing providing the means to reduce the barrier to entry for something that was previously quite an expensive pursuit.

Rasberry Pi PoE Hat Released

จันทร์, 08/27/2018 - 06:01

It was announced at the beginning of March, but now the Raspberry Pi Power over Ethernet (PoE) hat is out. Thanks to the addition of a new 4-pin header on the Raspberry Pi 3 Model B+, the Pis can get power from an Ethernet cable, provided you’ve got the setup to deliver PoE.

This is a remarkable bit of engineering, even though it’s just adding Power over Ethernet to a small single board computer. Mechanically, the PoE hat doesn’t increase the 3D bounding box volume of the Raspberry Pi at all. It adds cooling with a fan controlled over I2C. Even more bizarrely, the transformer is mounted in a PCB cutout, and we’re desperate to know how that was specced, designed, and assembled. Yeah, it might just be an add-on for the Raspberry Pi, but there’s some clever work that went into designing it.

The Raspberry Pi gained PoE capability with the introduction of the Raspberry Pi 3 Model B+ last March, a release that did require a slight change to the hardware and pinout of the Raspberry Pi. Compared to the Pi 3 Model B, the Pi 3 Model B+ sports a four-pin header right next to the Ethernet jack and one of the mounting holes. This is the same location of the ‘Run’ header found in the Pi 3 Model B, and probably caused much consternation to anyone who built a hat to take advantage of having a real power button on their Pi.

Nevertheless, what’s done is done, and now we have a real PoE solution for the Raspberry Pi. This is bound to be a boon for anyone who wants to build a Raspberry Pi cluster computer, or anyone who is dropping a few Pis into a server rack that already has PoE hardware.

You can pick up a PoE Pi hat through the usual suspects (Farnell, RS, and other resellers) for $20.

Soft Hydraulic Muscles Lift Weights As A Team

จันทร์, 08/27/2018 - 03:00

Working with hydraulics usually means having a fluid tank and valves. [consciousflesh] does away with both those for his DIY hydraulic artificial muscles. Instead, he uses a pair of muscles, both preloaded with fluid. To contract one, he pumps the fluid into the other, expanding that one, and vice versa. A bidirectional gear pump moves the fluid while also acting as a valve. And flexible materials replace heavy metal cylinders.

As we said, this is a DIY project. He made the muscles by surrounding silicone tubes with aramid fiber sleeves, giving added strength. The blocks at either end are also custom-made. The gear pump is one he purchased and made substantial modifications to, including removing the tank and fixing a brushless DC motor to one end. The final custom piece was a controller board for the motor. A Gerber file, schematic, and technical drawings, along with further details are all on his Hackaday.io page. Meanwhile, check out the load test in the video below as the muscles lift and lower 5 kg (11 lbs) each.

A search of Hackaday shows hydraulic artificial muscles may be rare, so perhaps this will be the first of many. For example, how about replicating how human arm muscles work together, one contracting while the other expands? We’ve seen that done already using pneumatics with [James Hobson’s] exoskeleton arms. Perhaps someone should do it with these pairs of flexible hydraulic muscles?

Our thanks to [starhawk] for tipping us off about this one.

The HackadayPrize2018 is Sponsored by:

Demystifying The ESP8266 With A Series Of Tutorials

จันทร์, 08/27/2018 - 00:01

If your interest has been piqued by the inexpensive wireless-enabled goodness of the ESP8266 microcontroller, but you have been intimidated by the slightly Wild-West nature of the ecosystem that surrounds it, help is at hand. [Alexander] is creating a series of ESP8266 tutorials designed to demystify the component and lead even the most timid would-be developer to a successful first piece of code.

If you cast your mind back to 2014 when the ESP8266 first emerged, it caused great excitement but had almost no information surrounding it. You could buy it on a selection of modules, but there were no English instructions and no tools to speak of. A community of software and hardware hackers set to work, resulting in a variety of routes into development including the required add-ons to use the ever-popular Arduino framework. Four years later we have a mature and reliable platform, with a selection of higher-quality and well supported boards to choose from alongside that original selection.

The tutorials cover the Arduino and the ESP, as well as Lua and the official SDK. They are written for a complete newcomer, but the style is accessible enough that anyone requiring a quick intro to each platform should be able to gain something.

Our community never ceases to amaze us with the quality of the work that emerges from it. We’ve seen plenty of very high quality projects over the years, and it’s especially pleasing to see someone such as [Alexander] giving something back in this way. We look forward to future installments in this series, and you should keep an eye out for them.

Perf Board Pyrotechnics Courtesy of a High-Voltage Supply

อาทิตย์, 08/26/2018 - 21:01

You may have asked yourself at one time or another, “Self, what happens when you pass 100 thousand volts through a printed circuit board?” It’s a good question, and [styropyro] put together this fascinating bit of destructive testing to find out.

Luckily, [styropyro] is well-positioned to explore the high-voltage realm. His YouTube stock-in-trade is lasers, ranging from a ridiculously overpowered diode-laser bazooka to a bottle-busting ruby laser. The latter requires high voltage, of course, and his Frankenstein’s lab yielded the necessary components for this destructive diversion. A chopper drives dual automotive ignition coils to step the voltage up to a respectable 100 kV. The arcs across an air gap are impressive enough, but when applied to a big piece of copper-clad protoboard, the light show is amazing. The arcs take a seemingly different path across the board for each discharge, lighting up the path with an eerie blue glow accompanied by a menacing buzz. Each discharge path may be random, but they all are composed of long stretches across the rows and columns of copper pads that never take the more direct diagonal path. [styropyro]’s explanation of the math governing this behavior is feasible, but really we just liked looking at the pretty and dangerous display. Now if only the board had been populated with components…

No, there’s not much of a hack here, but it’s cool nonetheless. And it’s probably a well-earned distraction from his more serious stuff, like his recent thorough debunking of the “Chinese laser rifle” that was all over the news a while back.

[via r/electronics]

You Can Add Wireless Charging to iPhone… Kinda

อาทิตย์, 08/26/2018 - 18:01

We could watch cellphone teardown videos all day long. There’s something pleasing about seeing how everything is packed into such a small enclosure. From the connectors, to that insidious glue, to the minuscule screws, [Scotty Allen] has a real knack for giving us a great look at the teardown process. Take a look at his latest video which attempts to add wireless charging to an iPhone. I think there’s a lot to be said for superb lighting and a formidable camera, but part of this is framing the shots just right.

Now of course we’ve taken apart our fair share of phones and there’s always that queasy “I think I’m going to break something” feeling while doing it. It’s reassuring that [Scotty] isn’t able to do things perfectly either (although he has the benefit of walking the markets for quick replacement parts). This video is a pretty honest recounting of many things going wrong.

The iPhone 6 and 7 are not meant to have wireless charging, but [Scotty’s] working with a friend named [Yeke] who created an aftermarket kit for this. The flexible PCB needs to be folded just right, and adhesive foam added (along with a magical incantation) to make it work. That’s because the add-on is a no-solder job. Above you can see it cleverly encircles one of the mating connectors and relies on mechanical pressure to make contact with the legs of that connector. Neat!

In the second half of the video [Scotty] meets up with [Yeke] to discuss the design itself. We find it interesting that [Yeke] considers his work a DIY item. Perhaps it’s merely lost in translation, but perhaps [Yeke’s] proximity to multiple flexible PCB manufacturers makes him feel that this is more like playing around for fun than product design. Any way you look at it, the ability to design something that will fit inside that crazy-tight iPhone case is both impressive and mesmerizing. Having seen some of the inductive charging hacks over the years, this is by far the cleanest way to go about it.

We caught up with [Scotty] during last year’s Supercon. We may not be able to drop everything and move to Shenzhen, but hearing about the experience is just enough to keep us wanting to!

Arduino Gets Command Line Interface Tools That Let You Skip the IDE

อาทิตย์, 08/26/2018 - 15:01

Arduino now has an officially supported command-line interface. The project, called arduino-cli, is the first time that the official toolchain has departed from the Java-based editor known as the Arduino IDE. You can see the official announcement video below.

Obviously this isn’t a new idea. Platform IO and other command-line driven tools exist. But official support means even if you don’t want to use the command line yourself, this should open up a path to integrate the Arduino build process to other IDEs more easily.

The code is open source, but they do mention in their official announcement that you can license it for commercial use. We assume that would mean if you wanted to build it into a product, not just provide an interface to it. This seems like something Arduino expects, because a lot of the command line tools can produce json which is a fair way to send information to another application for parsing.

The command line interface doesn’t just build a sketch. You can do things like install and manage libraries. For example, to create a new sketch:

arduino-cli sketch new HackadayPgm

You can update the installed platforms, list the connected boards, and search for board support:

arduino-cli core update-index arduino-cli board list arduino-cli core search mkr1000

If you don’t already have the board support, you can install it and verify that it is there:

arduino-cli core install arduino:samd arduino-cli core list

That last step will give you the FQBN or unique name for the core. So to compile and upload you have this mouthful:

arduino-cli compile --fqbn arduino:samd:mkr1000 Arduino/HackadayPgm arduino-cli upload -p /dev/ttyACM0 -fqbn arduino:samd:mkr1000 Arduino/HackadayPgm

Unlike, say, PlatformIO, this is clearly better for building into a tool, even if it is a makefile. We’d like to see a .build.json file or something that allows you to just issue short commands that do the right thing in a working directory. Of course, you could build that with a little shell scripting. Hmm….

It is nice to see the release of an official method and we hope this will lead to more editors being able to handle Arduino seamlessly.

Quadcopter Ditches Batteries; Flies on Solar Power Alone

อาทิตย์, 08/26/2018 - 12:01

It seems kind of obvious when you think about it: why not just stick a solar panel on a quadcopter so it can fly on solar power? Unfortunately, physics is a cruel mistress, and it gets a bit more complex when you look at problems like weight to power ratios, panel efficiency, and similar tedious technical details. This group of National University of Singapore students has gone some way to overcome these technical issues, though: they just built a drone that is powered from solar power alone, with no batteries or other power source.

Their creation is a custom-built quadcopter made with carbon fiber that weighs just 2.6kg (about 5.7lbs), but which has about 4 square meters (about 43 square feet) of solar panels. By testing and hand-selecting the panels with the best efficiency, they were able to generate enough power to drive the four rotors, and have managed to achieve altitudes of up to 10 meters. The students have been working on prototypes of this since 2012, when their first version could only generate 45% of the power needed for flight. So, reaching 100% of flight power in the demo shown below is a significant step.

This prototype does look a bit rickety, though: all of that solar panel surface acts as a sail and will catch the wind, so we doubt it will be stable in anything more than a slight breeze. But we’re sure the future holds improvements.

Air Conditioner Remote Reverse Engineered Despite Esoteric Protocol

อาทิตย์, 08/26/2018 - 09:01

Infra-red remote control is something of a Done Deal when it comes to hardware hacking, it has been comprehensively reverse engineered, and there exist libraries and software packages to seamlessly take care of all its quirks. Just occasionally though, along comes an IR remote whose protocol doesn’t follow that well-worn path

[William Dudley] found himself in this position with an air-conditioning unit remote control. He found it sent a stream of data with all settings of the machine rather than the single command codes you might expect from a familiar TV remote. The solution was to reverse engineer and reimplement the IR codes.

His reverse engineering relied on an Arduino and IR receiver which he used to sniff the packets coming out of the remote. Eventually he was able to recognise some of the functions from the remote, and create his own protocol that can recreate most of the remote’s functions. This was pushed over to a Raspberry Pi Zero which uses an IR LED to command the air conditioner, joining the ranks of his growing home automation setup.

The write-up makes for a fascinating primer on analysis of obscure IR protocols, and is well worth a read for anybody with an interest in the topic. Meanwhile if you want more IR reverse engineering stories, try this tale of a bathroom scale.