Work on HaDge – the Hackaday con badge, continues in bits and spurts, and we’ve had some good progress in recent weeks. HaDge will be one conference badge to use at all conferences, capable of communicating between badges.
Picking up from where we left off last time, we had agreed to base it around the Atmel D21, a 32-bit ARM Cortex M0+ processor. To get some prototype boards built to help with software development, we decided to finish designing the HACK before tackling HaDge. HACK is a project that [Michele Perla] started that we have sort of assimilated to act as the prototyping platform for HaDge. We wanted a compact micro-controller board and hence opted for the SAM D21E – a 32 pin package with 26 IO’s.
[Michele Perla] had earlier designed HACK based on the larger 32 pin SAM D21G and used Eagle to draw the schematic and layout. Using the Eagle to KiCad script, he quickly converted the project and got on to making the board layout. I took up the rear guard, and worked on making his schematic (pdf) “pretty” and building up a schematic library of symbols. While [Michele] finished off the board layout, I worked on collecting STEP models for the various footprints we would be using, most of which I could get via 3dcontentcentral.com. The few I couldn’t were built from scratch using FreeCAD. The STEP models were converted to VRML using FreeCAD. Using [Maurice]’s KiCad Stepup script, we were able to obtain a complete STEP model of the HACK board.
HACK is now ready to go for board fabrication and assembly. We plan to get about 20 boards made and hand them out to developers for working on the software. The GitHub repository has all the current files for those who’d like to take a look – it includes the KiCad source files, PDFs, gerbers, data sheets and images. The board will be breadboard compatible and also have castellated pads to allow it to be soldered directly as a module. Let us know via group messaging on the HACK project page if you’d like to get involved with either the software or hardware development of HaDge.
In a forthcoming post, we’ll put out ideas on how we plan to take forward HaDge now that HACK is complete. Stay tuned.
Filed under: Hackaday Columns, hardware
The early days of electricity appear to have been a cutthroat time. While academics were busy uncovering the mysteries of electromagnetism, bands of entrepreneurs were waiting to pounce on the pure science and engineer solutions to problems that didn’t even exist yet, but could no doubt turn into profitable ventures. We’ve all heard of the epic battles between Edison and Tesla and Westinghouse, and even with the benefit of more than a century of hindsight it’s hard to tell who did what to whom. But another conflict was brewing at the turn of 19th century, this time between an Indian polymath and an Italian nobleman, and it would determine who got credit for laying the foundations for the key technology of the 20th century – radio.Appointment and Disappointment Jagadish Chandra Bose
In 1885, a 27-year old Jagadish Chandra Bose returned to his native India from England, where he had been studying natural science at Cambridge. Originally sent there to study medicine, Bose had withdrawn due to ill-health exacerbated by the disagreeable aroma of the dissection rooms. Instead, Bose returned with a collection of degrees in multiple disciplines and a letter of introduction that prompted the Viceroy of India to request an appointment for him at Presidency College in Kolkata (Calcutta). One did not refuse a viceroy’s request, and despite protests by the college administration, Bose was appointed professor of physics.
Sadly, the administration found ways to even the score, chiefly by not providing Bose with any laboratory space, but also by offering him only 100 rupees a month salary, half of what an Indian professor would normally make, and only a third of an Englishman’s salary. Bose protested the latter by refusing salary checks – after three years his protest worked and he got his full salary retroactively – and worked around the former by converting a tiny cubicle next to a restroom into a lab. But in those 24 square feet, equipped with instruments of his own design and paid for at his expense, Bose would work wonders and begin to engineer the embryonic field of radio.
At around the time Bose joined Presidency College, Heinrich Hertz was confirming the existence of electromagnetic waves, postulated by James Clerk Maxwell in the 1860s. Maxwell died before he could demonstrate that electricity, magnetism, and light are all one in the same phenomenon, but Hertz and his spark gap transmitters and receivers proved it. Inspired by this work and intrigued by the idea that “Hertzian Waves” and visible light were the same thing, Bose set about exploring this new field.Bose’s microwave apparatus. Transmitter on right, galena detector in the horn on the left of the experiment stage. By Biswarup Ganguly
By 1895, barely a year after starting his research, Bose made the first public demonstration of radio waves in the Kolkata town hall. Details of the apparatus used are vague, but at a distance of 75 feet, he remotely rang an electric bell and ignited a small charge of gunpowder. The invited guests were amazed by the demonstration that Adrisya Alok, or “Invisible Light” as Bose would summarize it in a later essay, could pass through walls, doors, and in a particularly daring feat of showmanship, through the body of the Lieutenant Governor of Bengal.
Bose’s wireless demonstration was remarkable for a couple of reasons. First, it took place two years before Marconi’s first public demonstrations of wireless telegraphy in England. Where Marconi was keenly interested in commercializing radio, Bose’s interest was purely academic; in fact, Bose flatly refused to patent nearly all of the inventions that would spring from his tiny workshop, on the principle that ideas should be shared freely.
The 1895 demonstration also used microwave signals instead of the low and medium frequency waves that Marconi and others were working with. Bose recognized early on that shorter wavelengths would make it easier to explore the properties of radio waves that were similar to light, like reflection, refraction, and polarization. To do so, he invented almost all the basic components of microwave systems – waveguides, polarizers, horn antennas, dielectric lenses, parabolic reflectors, and attenuators. His spark-gap transmitters were capable of 60GHz operation.Coherent Thoughts Marconi Admiralty Pattern Coherer. Source: The Science Museum (UK)
Some of Bose’s most important work in radio concerned detection of electromagnetic waves. Early wireless pioneers had discovered that electromagnetic waves could be rectified by fine metal particles contained in a tube between metal conductors; the electrical energy would cause the particles to clump together and become conductive. The device was called a coherer because of the clumping action and was used as rectifiers in all the early practical wireless receivers, despite its operation being not well-understood. Experiments with coherers continue to this day.
Early coherers had a problem, though – the filings stayed stuck together after the signal had passed. The device needed to be reset by a tiny electromagnetic tapping mechanism that jiggled the filings back into a non-conductive state before the next signal could be detected. This had obvious effects on bandwidth, so the search for better detectors was on. One improvement invented by Bose in 1899 was the iron-mercury-iron coherer, with a pool of mercury in a small metal cup. A film of insulating oil covered the mercury, and an iron disc penetrated the oil but did not make contact with the liquid mercury. RF energy would break down the insulating oil and conduct, with the advantage of not needing a decoherer to reset the system.
Bose’s improved coherer design would miraculously appear in Marconi’s transatlantic wireless receiver two years later. The circumstances are somewhat shady – Marconi’s story about how he came up with the design varied over time, and there were reports that Bose’s circuit designs were stolen from a London hotel room while he was presenting his work. In any case, Bose was not interested in commercializing his invention, which Marconi would go on to patent himself.The Father of Semiconductors? Early Bose galena point-contact detectors. Source: National Radio Astronomy Observatory
Bose also did early work in semiconductor detectors. Bose was exploring the optical properties of radio waves when he discovered that galena, an ore of lead rich in lead sulfide, was able to selectively conduct in the presence of radio waves. He was able to demonstrate that point contacts on galena crystals worked as a better coherer, and in an uncharacteristic move actually patented the invention. Interestingly, the patent includes descriptions of substances that show either decreased or increased resistance to current flow with increasing voltage; Bose chose to describe these a “positive” and “negative” substances, an early example of the “P-N” nomenclature that would become common in semiconductor research. Decades later, William Brattain, co-inventor of the transistor, would acknowledge that Bose had beat everyone to the punch on semiconductors and would credit him with inventing the first semiconductor rectifier.
Inventions and innovations would flow from Bose’s fertile mind for many decades. He eventually turned his attention to plant physiology, studying the stress responses of plants with a sensitive device he invented, the crescograph, which could amplify the movements of the tips of plants by a factor of 10,000. Not surprisingly, he also did important work on the effects of microwaves on plant tissues. Bose also did work comparing metal fatigue and fatigue in physically stressed plant tissues. Bose is also considered the father of Bengali science fiction.
Bose is rarely remembered as a pioneer in radio, despite all he accomplished in engineering the wireless system that would eventually stitch together the world. Given his position on patents, that’s not surprising – his inventions were his gift to the world, and he seemed content with letting others capitalize on his genius.
Filed under: Featured, wireless hacks
Every once in a great while, a piece of radio gear catches the attention of a prolific hardware guru and is reverse engineered. A few years ago, it was the RTL-SDR, and since then, software defined radios became the next big thing. Last weekend at Shmoocon, [Travis Goodspeed] presented his reverse engineering of the Tytera MD380 digital handheld radio. The hack has since been published in PoC||GTFO 0x10 (56MB PDF, mirrored) with all the gory details that turn a $140 radio into the first hardware scanner for digital mobile radio.The Tytera MD-380 digital radio
The Tytera MD380 is a fairly basic radio with two main chips: an STM32F405 with a megabyte of Flash and 192k of RAM, and an HR C5000 baseband. The STM32 has both JTAG and a ROM bootloader, but both of these are protected by the Readout Device Protection (RDP). Getting around the RDP is the very definition of a jailbreak, and thanks to a few forgetful or lazy Chinese engineers, it is most certainly possible.
The STM32 in the radio implements a USB Device Firmware Upgrade (DFU), probably because of some example code from ST. Dumping the memory from the standard DFU protocol just repeated the same binary string, but with a little bit of coaxing and investigating the terrible Windows-only official client application, [Travis] was able to find non-standard DFU commands, write a custom DFU client, and read and write the ‘codeplug’, an SPI Flash chip that stores radio settings, frequencies, and talk groups.
Further efforts to dump all the firmware on the radio were a success, and with that began the actual reverse engineering of the radio. It runs an ARM port of MicroC/OS-II, a real-time embedded operating system. This OS is very well documented, with slightly more effort new functions and patches can be written.
In Digital Mobile Radio, audio is sent through either a public talk group or a private contact. The radio is usually set to only one talk group, and so it’s not really possible to listen in on other talk groups without changing settings. A patch for promiscuous mode – a mode that puts all talk groups through the speaker – is just setting one JNE in the firmware to a NOP.The Tytera MD-380 ships with a terrible Windows app used for programming the radio
With the help of [DD4CR] and [W7PCH], the entire radio has been reverse engineered with rewritten firmware that works with the official tools, the first attempts of scratch-built firmware built around FreeRTOS, and the beginnings of a very active development community for a $140 radio. [Travis] is looking for people who can add support for P25, D-Star, System Fusion, a proper scanner, or the ability to send and receive DMR frames over USB. All these things are possible, making this one of the most exciting radio hacks in recent memory.
Before [Travis] presented this hack at the Shmoocon fire talks, intuition guided me to look up this radio on Amazon. It was $140 with Prime, and the top vendor had 18 in stock. Immediately after the talk – 20 minutes later – the same vendor had 14 in stock. [Travis] sold four radios to members of the audience, and there weren’t that many people in attendance. Two hours later, the same vendor had four in stock. If you’re looking for the best hardware hack of the con, this is the one.
Filed under: cons, radio hacks, slider
This week I was approached with a question. Why don’t passenger aircraft have emergency parachutes? Whole plane emergency parachutes are available for light aircraft, and have been used to great effect in many light aircraft engine failures and accidents.
But the truth is that while parachutes may be effective for light aircraft, they don’t scale. There are a series of great answers on Quora which run the numbers of the size a parachute would need to be for a full size passenger jet. I recommend reading the full thread, but suffice it to say a ballpark estimate would require a million square feet (92903 square meters) of material. This clearly isn’t very feasible, and the added weight and complexity would no doubt bring its own risks.Accidents/No. of flights by year. Data compiled from 1 and 2.
There’s a deeper issue hiding in the questions though. A question of flight safety, and perhaps our inherent fear of flight. It’s easy to worry about the safety of passenger aircraft, particularly in light of the spate of high profile accidents in the last couple of years. However, the truth is that air travel is not only very safe, it’s getting safer every year.
The figure to the right is compiled from a couple of publicly available sources. It shows the number of airplane accidents per year divided by the number of flights. Since the 1970s accident rates have consistently dropped. There’s an excellent write-up covering this by an ex-Boeing employee which I also urge you to read.
One aspect of air flight that breeds fear is the lack of information that often accompanies accidents. The unknown fate of missing aircraft allows the media to feed on speculation, and with it our natural fear of the unknown. Our inability to locate aircraft often seems confusing, in a world we feel like significant effort is required to avoid having our locations tracked by the NSA every second of every day, why can we not locate something as large as a passenger jet?
The fact is that aircraft are constantly monitored when possible, and that the information is widely available! Aircraft transmit their GPS coordinates over ADSB. The popular flight traffic monitoring site FlightAware 24 uses this as one of its data sources. It’s also pretty easy to acquire and decode ADSB signals yourself using an RTL SDR dongle.
However ADSB is used by aircraft to communicate with ground stations. It therefore doesn’t work over oceans. A solution to this would be to use satellite uplinks but that’s expensive, and some say of limited utility. Other suggestions are to create a kind of mesh network between aircraft as they travel over oceans. No doubt such tracking solutions will become more common as user-demand for in-flight WiFi continues to grow, and Twitter becomes cluttered with users tweeting pictures of their in-flight meals.
Whatever the root cause of our fears. Air travel is very very safe. But another recent “What-if”, prompted me to consider what air travel might be like if safety was not our paramount concern. The recent and controversial amazon TV series “The Man in the High Castle” shows a world where the allied power lost World War Two and the Americas are ruled by a coalition of the Japanese and Nazis. There’s one point when a supersonic flight (the featured image above) lands in San Francisco, having taken only two hours to arrive from Europe. In a world, perhaps more willing to take risks with human life, and more willing to compromise on the wishes of its citizens. Would supersonic flight still be commonplace?Commonplace Supersonic Travel
We of course, used to have supersonic passenger aircraft. Until the year 2000, Concorde was considered one of the safest aircraft in the world. It’s one, and only crash in that year, the slump in air traffic following 9/11 and the fact that supersonic commercial aircraft were banned over land all conspired to make Concorde un-economical. Commercial flights ceased in 2003.A hobbyist rocket, capable of supersonic speeds.
While supersonic flight may currently be impractical for commercial flight, hobbyists have been trying to get in on the supersonic action. The fastest RC aircraft have not yet quite reach supersonic speeds, but supersonic rockets have been built. This instructable describes the process of modifying a $70 rocket (with $360 of components) to achieve supersonic speeds. On a test flight [gizmologist] achieved a speed of 801mph (Mach 1.07).
There was no audible sonic boom from [gizmologists] rocket, by the time the rocket reaches supersonic speeds it’s already 450 meters up, and the sound waves generated radiate out sideways.
Supersonic aircraft however, do produce a sonic boom. And it was this invasive sound, that caused commercial supersonic flight to be banned over land, helping to seal Concorde’s fate.
Sonic booms are caused by the same mechanism as the Doppler effect. In the Doppler effect an object moving toward you appears to produce a higher frequency sound. Because the source of the sound waves is moving toward you it “catches up” with the wave front effectively compressing the waves and generating a higher frequency in the direction of motion.
In a sonic boom the wave fronts are being pushed so close together that they catch up with each other. Multiple wave fronts therefore lie on top of each other. All that sound is compressed together, and reaches your ear in one big bang.
NASA however have been working on plans to “fix” the sonic boom issue in super-sonic aircraft. They’ve invested $2.3 million in research projects to predict, and reduce the sonic boom effect.Who Killed the Electric Plane?
Supersonic aircraft were an impressive technological leap, but existing designs are still powered by fossil fuels. In a world where consumer vehicles are beginning to transition to all electrical systems this feels a little old fashioned. Building small electric planes is possible, but has been held back in the US by FAA rulings, though a few are available.
Existing electric aircraft are all pretty conventional using electric motors (generally of the brushless DC variety) to generate motion. But spend much time on YouTube though and you’re likely to come across a very different type of “craft” with many videos claiming to have created anti-gravity UFO. These stem from Thomas Townsend Brown. In the 1960s he created devices which he believed were using electric fields to modify gravity. Unfortunately this was not the case.
What he had actually built was an Ionocraft.
The basic propulsion mechanism is quite simple. Put a pointed electrode near a smooth one then throw a few thousand volts across them, this simple setup will then generate thrust. It accomplishes this by creating an electric field focused on the tip and spreading out to the smooth surface. Where the field is strong electrons are pulled off atoms in the air, ionizing it. These positively charged atoms fly toward the negative electrode. This in itself does not generation thrust, but as the ions move they hit other uncharged atoms in the air, creating what is known as “ionic wind”.
A related technique has successfully used by NASA and JAXA in their space probes. Because there’s no air in space to ionize however, they need to take their own gases to ionize with them. While the ion thrusters produce very little force, they are extremely efficient, which is of paramount importance in space travel.
However aside from the odd YouTube video they’ve found limited utility here on earth. It’s possible that this could change. While Ion thrusters generally produces very little force, recent studies have shown that they may be an order of magnitude more efficient than jet engines. There are some pretty significant challenges to solve, like the huge voltages (10s of kilovolts are used even in a small lifter) required to generate the required lift, or the large physical size of the thrusters. But it wouldn’t be entertaining if, the future of both space and terrestrial flight rested in what was once considered the work of an anti-gravity crank?
Whatever happens in the future, lets hope that as planes become faster and more efficient as their unremitting march of every increasing safety continues.
Filed under: classic hacks, Featured, transportation hacks
This is an Education hack, and it’s pretty awesome. [Abhijit Sinha] received an Engineering degree and took up a run-of-the mill IT job in Bangalore, considered India’s IT hub. 7 months down the line on Dec 31st, he gave notice to the company and quit his “boring” job. He ended up in Banjarpalya, a village just 30 kms out of Bangalore. But it could well have been 30 years back in time. The people there had never come across computers, and there wasn’t much sign of other modern technology. So he set up Project DEFY – Design Education for You.
He bought a few refurbished laptops, took a room, and put kids and computers together. Except, these kids just knew a smattering of English. They went to the village school, run by the government and staffed by teachers whose training was basic, at best. He told the kids there are games in those boxes for them to play, but they’d have to figure it out on their own, without help from him. Pretty soon, all of them were playing games like they were pros. That’s when [Abhijit] stepped in and told them that they’d created a base line for having fun. Everything else they did from now on had to be more fun than what they had just done. If they were interested, he would show them how.
He had a gaggle of kids waiting to hear him with rapt attention. He showed them how to look online for information. He showed them how they could learn how to build fun projects by looking up websites like Instructables, and then use locally available materials and their own ingenuity to build and modify. Once a project was done, he showed them how to post details about what they had done and learnt so others around the world could learn from them. The kids took to all this like fish to water. They couldn’t wait to get through 5 hours of school each day, and then head over to their makerspace to spend hours tinkering. Check out their Instructable channel – and see if you can give them some guidance and advice.
A year onwards, on Dec 31st again, [Abhijit] gathered the kids, and several adults who had joined in during the year, telling them he had news. He had figured they were independent enough to run the space on their own now, without any help from him. He would still get them the 500 odd Dollars they needed each month to keep it operational. Other than that, they were on their own. He’s been monitoring their progress, and from the looks of it, the hack seems to have worked. More power to [Abhijit] and others like him around the world who are trying to bring the spirit of making to those who probably stand to benefit from it the most. Check out the videos below where they show off their work.
PS : Here’s the latest update from [Abhijit] : “Got back to the Banjarapalya Makerspace after quite a while, and this is what they show me – they built a little plane. Of course it crash lands, and needs a better programming, but I am super impressed that they are ready to fly.
Anyone who wants to help them technically? Financially? With parts and components ?”
Filed under: Hackerspaces
This is weird science. Researchers at Lawrence Berkeley National Laboratory have taken some normal bacteria and made them photosynthetic by adding cadmium sulfide nanoparticles. Cadmium sulfide is what makes the garden-variety photoresistor work. That’s strange enough. But the bacteria did the heavy lifting — they coated themselves in the inorganic cadmium — which means that they can continue to grow and reproduce without much further intervention.
Bacteria are used as workhorses in a lot of chemical reactions these days, and everybody’s trying to teach them new tricks. But fooling them into taking on inorganic light absorbing materials and becoming photosynthetic is pretty cool. As far as we understand, the researchers found a chemical pathway into which the electrons produced by the CdS would fit, and the bacteria took care of the rest. They still make acetic acid, which is their normal behavior, but now they produce much more when exposed to light.
If you want to dig a little deeper, the paper just came out in Science magazine, but it’s behind a paywall. But with a little searching, one can often come up with the full version for free. (PDF).
Or if you’d rather make electricity, instead of acetic acid, from your bacteria be our guest. In place of CdS, however, you’ll need a fish. Biology is weird.
Headline images credit: Peidong Yang
Filed under: chemistry hacks, news
Rutgers University just put out a video on a “drone” that can fly and then drop into a body of water, using its propellers to move around. This isn’t the first time we’ve covered a university making sure Skynet can find us even in the bathtub, but this one is a little more manageable for the home experimenter. The robot uses a Y8 motor combination. Each motor pair on its four arms spin in opposite directions, but provide thrust in the same direction. Usually this provides a bit more stability and a lot more redundancy in a drone. In this case we think it helps the robot leave the water and offers a bit more thrust underwater when the props become dramatically less efficient.
We’re excited to see where this direction goes. We can already picture the new and interesting ways one can lose a drone and GoPro forever using this, even with the integral in your toolbox. We’d also like to see if the drone-building community can figure out the new dynamics for this drone and release a library for the less mathematically inclined to play with. Video after the break.
Thanks [Keith O] for the tip!
Filed under: drone hacks
To one side of the “Chill Room” at this year’s Shmoocon were a few tables for Hackers for Charity. This is an initiative to make skills-training available for people in Uganda. The organization is completely supported by the hacker community.
Hackers for Charity was founded by Johnny Long about seven years ago. He had been working as a penetration tester but you perhaps know him better from his many books on hacking. Having seen the lack of opportunity in some parts of the world, Johnny started Hackers for Charity as a way to get used electronics and office equipment into the hands of people who needed it most. This led to the foundation of a school in Uganda that teaches technology skills. This can be life-changing for the students who go on to further schooling, or often find clerical or law enforcement positions. Through the charity’s donations the training center is able to make tuition free for about 75% of the student body.
The education is more than just learning to use a word processor. The group has adopted a wide range of equipment and digital resources to make this an education you’d want for your own children. Think Chromebooks, Raspberry Pi, robotics, and fabrication. One really interesting aspect is the use of RACHEL, which is an effort to distribute free off-line educational content. This is a searchable repository of information that doesn’t require an Internet connection. Johnny told me that it doesn’t stop at the schoolroom door; they have the system on WiFi so that anyone in the village can connect and use the resources whether they’re students or not.
Shmoocon does something interesting with their T-shirt sales. They’re not actually selling shirts at all. They’re soliciting $15 donations. You donate, and you get a shirt and a chit — drop you chit in a box to decide where your $15 should go. This year, Hackers for Charity, the EFF, and World Bicycle Relief were the charities to choose from. If you want to help out this 501c3 organization, consider clicking the donate button you’ll find on the sidebar and footer of their webpage.
Filed under: cons
No offense to [Douglas Engelbart] but the computer mouse has always seemed a bit of a hack to us (and not in the good sense of the word). Sure we’ve all gotten used to them, but unlike a computer keyboard, there is no pre-computer analog to a mouse. There are plenty of alternatives, of course, like touchpads and trackballs, but they never seem to catch on to the extent that the plain old mouse has.
One interesting variation is the pen mouse. These do rely on a pre-computer analog: a pen or pencil. You can buy them already made (and they are surprisingly inexpensive), but what fun is that? [MikB] wanted one and decided to build it instead of buying it.
The main parts of the pen mouse include a cheap mouse with a failing scroll wheel, a bingo pen, and the base from an old web camera. There’s also a normal-sized pen to act as the handpiece. The project is mostly mechanical rather than electrical. [MikB] took the mouse apart and cut the PCB to fit inside the base. The rest of the build is a construction project.
The result appears to work well. [MikB] includes instructions for installing the mouse correctly in Linux. The net effect is like a tablet but doesn’t’ require much space on your desk. We’ve seen plenty of mouse projects in the past, of course. We’ve even seen hacks for a head mouse if that’s your thing.
Filed under: misc hacks, peripherals hacks
Bare feet, bare hands, and bare chest – if it weren’t for the cargo shorts and the brief sound of a plane overhead, we’d swear the video below was footage that slipped through a time warp. No Arduinos, no CNC or 3D anything, but if you doubt that our Stone Age ancestors were hackers, watch what [PrimitiveTechnology] goes through while building a tile-roofed hut with no modern tools.
The first thing we’ll point out is that [PrimitiveTechnology] is not attempting to be (pre-)historically accurate. He borrows technology from different epochs in human history for his build – tiled roofs didn’t show up until about 5,000 years ago, by which time his stone celt axe would have been obsolete. But the point of the primitive technology hobby is to build something without using any modern technology. If you need a fire, you use a fire bow; if you need an axe, shape a rock. And his 102 day build log details every step of the way. It’s fascinating to watch logs, mud, saplings, rocks and clay come together into a surprisingly cozy structure. Especially awesome if a bit anachronistic is the underfloor central heating system, which could turn the hut into a lovely sauna.
Primitive technology looks like a fascinating hobby with a lot to teach us about how we got to now. But if you’re not into grubbing in the mud, you could always 3D print a clay hut. We’re not sure building an enormous delta-bot is any easier, though.
Thanks to [Rockyd] for the tip.
Filed under: classic hacks, misc hacks
It was Stardate 2267. A mysterious life form known as Redjac possessed the computer system of the USS Enterprise. Being well versed in both computer operations and mathematics, [Spock] instructed the computer to compute pi to the last digit. “…the value of pi is a transcendental figure without resolution” he would say. The task of computing pi presents to the computer an infinite process. The computer would have to work on the task forever, eventually forcing the Redjac out.
Calculus relies on infinite processes. And the Arduino is a (single thread) computer. So the idea of running a calculus function on an Arduino presents a seemingly impossible scenario. In this article, we’re going to explore the idea of using derivative like techniques with a microcontroller. Let us be reminded that the derivative provides an instantaneous rate of change. Getting an instantaneous rate of change when the function is known is easy. However, when you’re working with a microcontroller and varying analog data without a known function, it’s not so easy. Our goal will be to get an average rate of change of the data. And since a microcontroller is many orders of magnitude faster than the rate of change of the incoming data, we can calculate the average rate of change over very small time intervals. Our work will be based on the fact that the average rate of change and instantaneous rate of change are the same over short time intervals.Houston, We Have a Problem
In the second article of this series, there was a section at the end called “Extra Credit” that presented a problem and challenged the reader to solve it. Today, we are going to solve that problem. It goes something like this:
We have a machine that adds a liquid into a closed container. The machine calculates the amount of liquid being added by measuring the pressure change inside the container. Boyle’s Law, a very old basic gas law, says that the pressure in a closed container is inversely proportional to the container’s volume. If we make the container smaller, the pressure inside it will go up. Because liquid cannot be compressed, introducing liquid into the container effectively makes the container smaller, resulting in an increase in pressure. We then correlate the increase in pressure to the volume of liquid added to get a calibration curve.
The problem is sometimes the liquid runs out, and gas gets injected into the container instead. When this happens, the machine becomes non-functional. We need a way to tell when gas gets into the container so we can stop the machine and alert the user that there is no more liquid.
One way of doing this is to use the fact that the pressure in the container will increase at a much greater rate when gas is being added as opposed to liquid. If we can measure the rate of change of the pressure in the container during an add, we can differentiate between a gas and a liquid.Quick Review of the Derivative
Before we get started, let’s do a quick review on how the derivative works. We go into great detail about the derivative here, but we’ll summarize the idea in the following paragraphs.Full liquid add
An average rate of change is a change in position over a change in time. Speed is an example of a rate of change. For example, a car traveling at 50 miles per hour is changing its position at 50 mile intervals every hour. The derivative gives us an instantaneous rate of change. It does this by getting the average rate of change while making the time intervals between measurements increasingly smaller.
Let us imagine a car is at mile marker one at time zero. An hour later, it is at mile marker 51. We deduce that the average speed of the car was 50 miles per hour. What is the speed at mile marker one? How do we calculate that? [Issac Newton] would advise us to start getting the average speeds in smaller time intervals. We just calculated the average speed between mile marker 1 and 51. Let’s calculate the average speed between mile marker’s 1 and 2. And then mile marker’s 1 and 1.1. And then 1 and 1.01, then, 1.001…etc. As we make the interval between measurements smaller and smaller, we begin to converge on the instantaneous speed at mile marker one. This is the basic principle behind the derivative.Average Rate of Change Gas enters between time T4 and T5
We can use a similar process with our pressure measurements to distinguish between a gas and a liquid. The rate of change units for this process is PSI per second. We need to calculate this rate as the liquid is being added. If it gets too high, we know gas has entered the container. First, we need some data to work with. Let us make two controls. One will give us the pressure data for a normal liquid add, as seen in the graph above and to the left. The other is the pressure data when the liquid runs out, shown in the graph on the right. Visually, it’s easy to see when gas gets in the system. We see a surge between time’s T4 and T5. If we calculate the average rate of change between 1 second time intervals, we see that all but one of them are less that 2 psi/sec. Between time’s 4 and 5 on the gas graph, the average rate of change is 2.2 psi/sec. The next highest change is 1.6 psi/sec between times T2 and T3.
So now we know what we need to do. Monitor the rates of change and error out when it gets above 2 psi/sec.
Our psuedo code would look something like:x = pressure; delay(1000); y = pressure; rateOfChange = (y - x); if (rateOfChange > 2) digitalWrite(13, HIGH); //stop machine and sound alarm Instantaneous Rate of Change
It appears that looking at the average rate of change over a 1 second time interval is all we need to solve our problem. If we wanted to get an instantaneous rate of change at a specific time, we need to make that 1 second time interval smaller. Let us remember that our microcontroller is much faster than the changing pressure data. This gives us the ability to calculate an average rate of change over very small time intervals. If we make them small enough, the average rate of change and instantaneous rate of change are essentially the same.
Therefore, all we need to do to get our derivative is make the delay smaller, say 50ms. You can’t make it too small, or your rate of change will be zero. The delay value would need to be tailored to the specific machine by some old fashioned trial and error.Taking the Limit in a Microcontroller?
One thing we have not touched on is the idea of the limit within a microcontroller. Mainly, because we don’t need it. Going back to our car example, if we can calculate the average speed of the car between mile marker one and mile marker 0.0001, why do we need to go though a limiting process? We already have our instantaneous rate of change with the single calculation.
One can argue that the idea behind the derivative is to converge on a single number while going though a limiting process. Is it possible to do this with incoming data of no known function? Let’s try, shall we? We can take advantage of the large gap between the incoming data’s rate of change and the processor’s speed to formulate a plan.
Let’s revisit our original problem and set up an array. We’ll fill the array with pressure data every 10ms. We wait 2 seconds and obtain 200 data points. Our goal is to get the instantaneous rate of change of the middle data point by taking a limit and converging on a single number.
We start by calculating the average rate of change between data points 100 and 200. We save the value to a variable. We then get the rate of change between points 100 and 150. We then compare our result to our previous rate by taking the difference. We continue this process of getting the rate of change between increasingly smaller amounts of time (from the 100th data point) and comparing them by taking the difference. When the difference is a very small number, we know we have converged on a single value.
We then repeat the process in the opposite direction. We calculate the average rate of change between data points 0 and 100. Then 25 and 100. Then 50 and 100 and so on. We continue the process just as before until we converge on a single number.
If our idea works, we’ll come up with two values that would look something like 1.3999 and 1.4001 We say our instantaneous rate of change at T1 is 1.4 psi per second. Then we just keep repeating this process.
Now it’s your turn. Think you have the chops to code this limiting process?
Filed under: Arduino Hacks, Hackaday Columns
There’s an old saying that you should make things twice. Once to figure out how to build the thing, and again to build it the right way. [Pmbrunelle] must agree. His senior project in college was a machine to balance wheels. It was good enough for him to graduate, but he wanted it to be even better.
The original machine required observation of measurements on an oscilloscope and manual calculations. [Pmbrunelle] added an AVR micro, a better motor drive, and made a host of other improvements. As you can see in the video below, the machine works, but [Pmbrunelle] still wasn’t happy.
He’s started the Mark II version of the project that will be a start-from-scratch redesign. One goal is to make the process faster (it currently takes about 30 minutes per wheel, which seems like a lot unless you are using it for a unicycle).
In the most recent incarnation, the AVR takes the wheel radius and collected data and tells you where to put the weight and, of course, how much weight to use. The Mark II will reuse many of the components in the existing machine although one of the goals is to replace some hard-to-find parts with things that are more readily available.
We couldn’t help but wonder if you could make a micro version of this for Pinewood Derby service. Although [Pmbrunelle] is using this project to learn more about electronics, following it might teach you something about mechanical engineering.
Filed under: misc hacks, repair hacks
A lot of people make the argument that you can’t go wrong buying a tool made in USA, Germany, Japan, Switzerland, etc. They swear that any Chinese tool will be garbage and it’s not worth purchasing them. Now, any discerning mind will say, “Wait a minute, why? China has a huge economy, experienced people, and the ability to use all the scary chemicals that make the best steel. Why would their tools be any better or worse than ours?” It’s a very valid argument. There are lots of Chinese tools that are the best in the world. Most of what we see in our stores are not. So what is the difference. Why does a country who can make the best tools not make the best tools? Surely it isn’t purely cost cutting. Is it cultural? The opinion I wish to put forth is that it’s a matter of design intent communication.
I’ve worked as an engineer in industry. The one common thread between a quality product and a bad product has always been this, ”Is the person who designed the product involved in making the product?” If the person or peoples who imbued the design intent into the original product are actively involved in and working towards the execution of that product, that product has a vastly greater chance of being good. Or in other words: outsourcing doesn’t produce a bad product because the new people making the product don’t care. It makes a bad product because the people who understand the intent behind the product are separated from its execution.As you can see the export made crescent wrench is not made to the same tolerances as the previous wrench.
Let’s take the Crescent wrench as an example. Crescent wrenches used to be made in USA. In the past few years they have begun to make them in China. We can spot many visual differences right away. The new Crescent wrench has a different shape, the logo has changed and the stamping for the logo is dodgy, and worse, the tool just doesn’t operate as well as it used to. The jaws aren’t as hard and they wiggle more. What happened? How could Crescent mess up their flagship so badly. Surely they intended just to cut costs, not to reduce quality. This isn’t shameful in itself
What happened to the Crescent wrench is easily explained by anyone who has seen a product from design to execution before. A factory in the USA set out to make a good adjustable wrench. Hundreds of engineers and employees worked in a building to make a good wrench. When their machines didn’t work, they came up with solutions. When their quality was lacking, they implemented better processes. They had a list of trusted suppliers. They could guarantee that the materials that came in would be imbued with their vision and intent when the product came out. The intent and will of all those people built up in one place over time.Low quality finish and forging can be seen. A higher grit sandblast means less finishing was needed before the sandblasting step. Note the clarity of the logo. One is cast and one is stamped. The stamping of a logo was an extra step, and while casting it ensures that some damage to the logo will occur during the forging and sandblasting steps; it reduces cost.
When Crescent changed manufacturers we can easily predict the mistakes made. “Hey, since we’re switching suppliers lets change up the design a bit, it’s stale.” So they hired a designer. “Hey, the logo is old, let’s put in a new one.” So they made another small change. “Oh, the supplier got back to us and said new forge tooling would be a couple million dollars, but if we modified one of the shapes they have in stock we can save half that!” Good job Jenkins, you did the company well. Small changes and negotiations like this lose sight of the design intent that the wrench started with. These mistakes are usually not evil, they’re just lacking in a philosophical understanding of the product and what went into it all these years. They lose all that combined will and intent by mistake and innocent neglect.
I would like to point out that the same thing could happen to a product that is simply around too long. Many of Starret’s top-of-the-line dial calipers now use a plastic dial ring instead of a metal one. It’s weaker and worse, and while it has no real impact on the instrument’s ability to measure, it feels worse in the hand. This is an example of a company not communicating its intent to itself over time. Shifting the goals for a product because they weren’t explained properly. I doubt anyone over there set out to make a worse product, they just saw a good way to save money. Losing the value for the things that made the product great.
It’s sort of like that one broken window. An abandoned neighborhood and factory will stay unmolested for years until the first window is broken. The rest soon follow and the place falls into disarray.The addition of gimmick features are often a good indicator of a quality drop. A scale on an adjustable wrench is next to useless in its common operation. The advertised larger thumb-wheel in us makes the wrench easier to knock out of adjustment than helps the user put it into adjustment. Also, the jaws have increased in thickness, making previously accessible bolts unaccessible. Thin jaws are one of the features of a properly forged and tempered wrench. My bruised knuckles are a testament to this.
So, using this knowledge can you learn anything about a product’s quality just by reading it’s description? Well, mostly yes. I’m sorry that I can’t make this more scientific for you, but some of it revolves around developing a good intuition. Seeing how much of a product’s design intent made it into the product description is a good way. Apple is great at this. Apple talks about the materials, the circuitry, the processes, and the design intent of every product they make. It shows in the final product. No one can argue that apple’s products aren’t beautiful. That they aren’t wonderfully made. Whether or not the OS is good or whether it’s “the best.” — maybe. Now if you look at a competitor’s product, say a cheap HiQ from Shenzhen. You read about what the product can do, what it’s price is, but not its intent.
You can do this with screwdrivers too. Let’s compare Harbor Freight and Snap-On. Two tool makers in wildly different classes of quality.
You can see the company’s pride in their product. Pittsburgh says “It’s a screw driver made of the regular stuff that’s cheap.” That’s their design intent. Nothing wrong with that, but the intent was price not screw turning. Snap-On, however, says “This is why we did the things we did, this is what makes ours the best” Their intent was a device that turns screws. You can get a sense for the intent everyone shares for making a good screw driver, and it shows in their product.Note how harbor freight mentions what the tool does and snap-on mentions why it does its function better.
I’d like to close by pointing out Chinese companies that do make some nice stuff. All those Harbor Freight, Princess Auto, etc milling machines for sale are actually knock-offs of a Chinese company called Rong Fu. Their mills are pretty dang good because the company’s design intent is close to its production. Likewise they have the higher price to match. Although I’ve heard, somewhat ironically, that Rong Fu outsourced their castings from the original Taiwan shop and moved to mainland China, seeing a quality drop along the way. I should also mention the venerable Rigol, whose oscilloscopes we all know and love. They have their own slew of knock-offs made in their own country, but no one can argue that their scopes aren’t wonderful. Lastly I’d like to mention a US company that outsources successfully: SawStop. While their machines are made in Taiwan, they specifically set up shop there and went through the trouble of installing engineers, managers, etc. on site to make sure the design intent of the product comes though.
So next time you buy a tool. Check where it was made and ask yourself. Are the people who understand this tool’s intent involved in the making of the tool. It’s not about their facilities. Someone who never 3d prints can’t make a good printer. A company that makes measuring tapes, but has no one who uses measuring tapes employed isn’t going to make a good product. They are only going to be good at the process of making measuring tapes. The more steps a company can bring under the control of those with the intent the better a product will be. Is their pride mentioned in the packaging? Can I tell from the precision that it’s made with? Can I compare it to something lesser and something more? This is the best way to increase your chances of a good buy. Intent is what makes a good product, not a country, everything else is just melted rocks and dinosaurs that came along for the ride.
Filed under: Featured, slider, tool hacks
Turning the classic toy Etch-A-Sketch into a CNC drawing tablet intrigues a large number of hackers. This version by [GeekMom] certainly takes the award for precision and utility. Once you build something like this, you can hardly stop writing firmware for it; [GeekMom] produced an entire Arduino library of code to allow joystick doodling, drawing web images, and a self-erasing spirograph mode. The topper is the version that runs as a clock!
The major hassle with making a CNC version of this toy is the slop in the drawing mechanism. There is a large amount of backlash when you reverse the drawing direction. If that isn’t bad enough, the backlash is different in the vertical or horizontal directions. Part of [GeekMom’s] presentation is on how to measure and correct for this backlash.
The EtchABot uses three small stepper motors. Two drive the drawing controls and the third flips the device forward to erase the previous drawing. The motors are each controlled by a ULN2003 stepper motor drivers. An Arduino Uno provides the intelligence. Optional components are a DS3231 Real Time Clock and a dual axis X-Y joystick for the clock and doodling capability. Laser cut wood creates a base for holding the Etch-A-Sketch and the electronics.
The write up and details for this project are impressive. Be sure to check out the other entries in [GeekMom’s] blog. Watch the complete spirograph video after the break.
Filed under: Arduino Hacks, toy hacks
A few years ago, we saw a project from a few researchers in Germany who built a device to clone contactless smart cards. These contactless smart cards can be found in everything from subway cards to passports, and a tool to investigate and emulate these cards has exceptionally interesting implications. [David] and [Tino], the researchers behind the first iteration of this hardware have been working on an improved version for a few years, and they’re finally ready to release it. They’re behind a Kickstarter campaign for the ChameleonMini, a device for NFC security analysis that can also clone and emulate contactless cards.
While the original Chameleon smart card emulator could handle many of the contactless smart cards you could throw at it, there at a lot of different contactless protocols. The new card can emulate just about every contactless card that operates on 13.56 MHz.
The board itself is mostly a PCB antenna, with the electronics based on an ATXMega128A4U microcontroller. This micro has AES and DES encryption engines, meaning if your contactless card has encryption and you have the cryptographic key, you can emulate that card with this device. They’re also making a more expensive version that also has a built-in reader that makes the ChameleonMini a one-stop card cloning tool.
Filed under: Crowd Funding
We’ve all done it. You’re walking out the door or maybe you’ve even gotten on the road when the question hits, “Did I leave the [coffee pot | stove | hair curler | soldering iron ] on?” [Daniel Johnson’s] problem was even worse. He couldn’t tell if his Hakko-936 soldering iron was off because the LED indicator wasn’t always on. Instead it flashed. He fixed that problem and along the way hacked his battery powered soldering iron since he was out of batteries. Now that’s perseverance.Soldering Iron Hack Recursion
The Hakko’s LED turned on whenever the power turned on to heat the tip. That was about every 5 seconds once the tip was hot. But just as a watched pot never boils, a watched LED never seems to flash. After determining the LED was driven by a comparator he decide to unsolder it as part of his hack. He wisely decided using the Hakko on itself was not a good idea so reached for the battery-powered portable iron, which was sadly battery-free. Undaunted, he wired the portable to a power supply and when 4.5 volts didn’t melt the solder cranked it up to 6 volts.
Back to the Hakko, he replaced the red LED with a RBG LED but used only the red and green leads. The green was tied to the 24v power supply through a hefty 47k ohm resistor, and the red was tied to the comparator. A little masking tape to hold things in place and provide insulation finished the job. Now when the Hakko is on the green LED is lit and the red LED shows the heating cycle. Quite clever.
Filed under: led hacks, slider, tool hacks
Knowing where to start when adding a device to your home automation is always a tough thing. Most likely, you are already working on the device end of things (whatever you’re trying to automate) so it would be nice if the user end is already figured out. This is one such case. [Aditya Tannu] is using Siri to control ESP8266 connected devices by leveraging the functionality of Apple’s HomeKit protocols.
HomeKit is a framework from Apple that uses Siri as the voice activation on the user end of the system. Just like Amazon’s voice-control automation, this is ripe for exploration. [Aditya] is building upon the HAP-NodeJS package which implements a HomeKit Accessory Server using anything that will run Node.
Once the server is up and running (in this case, on a raspberry Pi) each connected device simply needs to communicate via MQTT. The Arduino IDE is used to program an ESP8266, and there are plenty of MQTT sketches out there that may be used for this purpose. The most recent example build from [Aditya] is a retrofit for a fiber optic lamp. He added an ESP8266 board and replaced the stock LEDs with WS2812 modules. The current version, demonstrated below, has on/off and color control for the device.
Filed under: home hacks, Network Hacks
The BBC has commissioned a new series of Robot Wars. This is not Battlebots; that show was revived last year, and a second season will air again this summer. Robot Wars is the one with the ‘house’ robots. We would like to take this opportunity to remind the BBC that Robot Wars is neither Scrapheap Challenge nor Junkyard Wars, and by virtue of that fact alone is an inferior show.
[Fran] is a favorite around these parts. She’s taken apart a Saturn V Launch Vehicle Digital Computer, visited the Smithsonian Air and Space Museum warehouse, and is the occasional host of the Dinosaur Den with [Bil Herd]. Now, she’s relaunching her line of guitar pedals. ‘Boutique’ pedals are a weird market, but with the help of a few manufacturers, [Fran] is bringing her Peachfuzz pedal back to life through Kickstarter.
Want to be an astronaut? Here’s the application.
Here’s your monthly, ‘WTF is this thing on eBay’ link. It’s a clamshell/toilet seat iBook (c.2000), loaded up with an Intel i5 Broadwell CPU, 128 GB of Flash storage, 4 GB of RAM, a 12″ 1024×768 LCD, Gigabit Ethernet, WiFi, Bluetooth, and runs OS X El Capitan. I might be mistaken, but it looks like someone took the motherboard out of a 2015 MacBook Air, crammed it into a sixteen year old computer, and put it up on eBay. I’m not saying that’s what it is; this is from China, and there are people over there making new improved motherboards for a Thinkpad x61. Weirder stuff has already happened.
In the last installment of the Travelling Hacker Box, I asked if anyone can receive mail in Antarctica. A person with friends in the British survey team emailed me, but nothing came of that. It’s summer, so if Antarctica is going to happen, it needs to happen soon.
Filed under: Hackaday Columns, Hackaday links
One of the big problems in detecting malware is that there are so many different forms of the same malicious code. This problem of polymorphism is what led Rick Wesson to develop icewater, a clustering technique that identifies malware.
Presented at Shmoocon 2016, the icewater project is a new way to process and filter the vast number of samples one finds on the Internet. Processing 300,000 new samples a day to determine if they have polymorphic malware in them is a daunting task. The approach used here is to create a fingerprint from each binary sample by using a space-filling curve. Polymorphism will change a lot of the bits in each sample, but as with human fingerprints, patterns are still present in this binary fingerprints that indicate the sample is a variation on a previously known object.
The images you’re seeing above are graphic representations of these fingerprints. Images aren’t actually part of the technique, but by converting each byte value to greyscale it is a good way for humans to understand what the computer is using in its analysis.
Once the fingerprint is made, it’s simple to compare and cluster together samples that are likely the same. The expensive part of this method is running the space-filling curve. It take a lot of time to run this using a CPU. FPGAs are idea, but the hardware is comparatively costly. In its current implementation, GPUs are the best balance of time and expense.
This expense measurement gets really interesting when you start talking Internet-scale problems; needing to constantly processing huge amounts of data. The current GPU method can calculate an object in about 33ms, allowing for a couple hundred thousand samples per day. This is about four orders of magnitude better than CPU methods. But the goal is to transition away form GPUs to leverage the parallel processing found in FPGAs.
Rick’s early testing with Xenon Phi/Altera FPGAs can calculate space-filling curves at a rate of one object every 586µs. This represents a gain of nine orders of magnitude over CPUs but he’s still not satisfied. His goal is to get icewater down to 150µs per object which would allow 10 million samples to be processed in four hours with a power cost of 4000 Watts.
How to do you compare computations on hardware the has a different cost to manufacture and different power budgets? Rick plans to reduce the problem with a measurement he calls InfoJoules. This is an expression of computational decisions versus Watt seconds. 1000 new pieces of information calculated in 1 second on a machine consuming 1000 Watts is 1 InfoJoule. This will make the choice of hardware a bit easier as you can weigh both the cost of acquiring the hardware with the operational cost per new piece of information.
Filed under: cons, FPGA, security hacks
Shmoocon is here, and that means a dozen or so security companies have bought a booth and are out to promote themselves. Some are giving out shot glasses. One is giving out quadcopters. It is exceedingly difficult to stand out in the crowd.
At least one company figured it out. They’ve built a game so perfect for the computer literate crowd, so novel, and so interesting it guarantees a line in front of their booth. Who are they? Fortego, but that’s not important right now. The game they’ve created, BattleBits, is the perfect conference booth.
The game play for BattleBits is as simple as counting to two. You’re presented with an eight-bit hexidecimal number, and the goal is to key them into a controller with eight buttons for 1, 2, 4, 8, 16, 32, 64, and 128. The answer for 0x56 is 01010110, and the answer for 0xFF is mashing all the buttons.
To anyone not familiar with hex, there’s actually a rather handy trick to the game: you only need to memorize 16 different numbers. Hexadecimal numbers are easily broken up into nibbles, or groups of four bits. All you need to do is solve one hexadecimal digit at a time.
This is by far the best conference booth I’ve ever seen. The creator of the BattleBits hardware, [Riley Porter], says he’ll be releasing the design files and code for this game so anyone can make one, something we really look forward to.
Filed under: cons