Hackaday

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

Voice Controlled Stereo Balance With ESP8266

4 hours 1 นาทีก่อน

A stereo setup assumes that the listener is physically located between the speakers, that’s how it can deliver sound equally from both sides. It’s also why the receiver has a “Balance” adjustment, so the listener can virtually move the center point of the audio by changing the relative volume of the speakers. You should set your speaker balance so that your normal sitting location is centered, but of course you might not always be in that same position every time you listen to music or watch something.

[Vije Miller] writes in with his unique solution to the problem of the roving listener. He’s come up with a system that can adjust the volume of his speakers without having to touch the receiver’s setup, in fact, he doesn’t have to touch anything. By leveraging configurable voice control software running on his computer, his little ESP8266-based devices do all the work.

Each speaker has its own device which consists of a NodeMCU ESP8266 and X9C104 digital potentiometer inside of a 3D printed case. The audio terminal block on the gadget allows him to connect it inline between the speaker and the receiver, giving [Vije] the ability to adjust the volume through software. The source code, which he’s posted on the Hackaday.io project page, uses a very simple REST-style API to change speaker volume based on HTTP requests which hit the ESP8266’s IP address.

The second part of the project is a computer running VoiceAttack, which lets [Vije] assign different actions based on what the software hears. When he says the appropriate command, the software goes through and fires off HTTP requests to the nodes in the system. Everything is currently setup for two speakers, but it shouldn’t be too difficult to expand to more speakers (or even rooms) with some adjustment to the software.

It’s not the first voice controlled speaker we’ve ever seen, but it does solve a very specific problem in a unique way. We’d be interested in seeing the next logical step, which would see this technology integrated into the speaker itself.

‘SHE BON’ is an Artful, Wearable, Sensual, Sensing Platform

5 hours 31 minก่อน

SHE BON (that’s the French bon, or “good”) is an ambitious project by [Sarah Petkus] that consists of a series of wearable electronic and mechanical elements which all come together as a system for a single purpose: to sense and indicate female arousal. As a proponent of increased discussion and openness around the topic of sexuality, [Sarah]’s goal is to take something hidden and turn it into something obvious and overt, while giving it a certain artful flair in the process.

The core of the system is a wearable backpack in the shape of a heart, from which all other sensors and feedback elements are connected. A lot of thought has gone into the design of the system, ensuring that the different modules have an artistic angle to their feedback while also being comfortable to actually wear, and [Sarah] seems to have a knack for slick design. Some of the elements are complete and some are still in progress, but the system is well documented with a clear vision for the whole. It’s an unusual and fascinating project, and was one of the finalists selected in the Human Computer Interface portion of the 2018 Hackaday Prize. Speaking of which, the Musical Instrument Challenge is underway, so be sure check it out!

The HackadayPrize2018 is Sponsored by:





Industrial 3D Printing Uses Layers Like We’ve Never Seen Before

7 hours 22 secก่อน

We’ve seen FDM printers lay down layers by extruding plastic in a line. We’ve seen printers use sintering and lithography to melt or cure one layer at a time before more print medium moves into place for the next layer. What we’ve never seen before is a printer like this that builds parts from distinct layers of substrate.

At the International Manufacturing Technology Show last week I spoke with Eric Povitz of Impossible Objects. The company is using a “sheet lamination process” that first prints each layer on carbon fiber or fiberglass, then uses a hydraulic press and an oven to bake the part into existence before bead-blasting the excess substrate away. Check out my interview with Eric and join me below for more pictures and details.

It’s incredible to see a process that prints the layers individually, using holes to align all of the layers on rods before fusing them together. I’m told the accuracy and resolution is quite good but don’t have a metric to back that up. The accuracy is best running parallel to the layers, so wide flat parts will yield consistent results. Very tall parts that require many layers will eventually see variations in accuracy.

The substrate used in this process is quite thin and wispy. The printer itself moves the substrate through a process that uses inkjet printing to deposit a binder. Powdered thermoplastic is then applied where it sticks to the binder and the excess is reclaimed. The layers are automatically stacked in order at the end of the machine.

The second half of the process compresses the layers in a press, and bakes them to melt the thermoplastic into a solid. Bead blasting is then used to remove the excess substrate. Depending on your application, the part is now ready to used, or can be further processed through machining, adding threaded inserts, or other processes common to working with composites.

There’s a range of materials available for use with this technique. They depend on what substrate and thermoplastic is chosen. One of the more interesting examples they had on hand is made of carbon fiber reinforced polyether ether ketone (PEEK). This material has excellent heat resistance, and feels like metal when held in your hand. This particular demo is a jig for holding PCBs during wave soldering.

What you end up with are composite parts that have very different properties from those printed in powder or resin processes. These parts are reinforced by the fibers of the substrate and will certainly find eager customers in the manufacturing industry for applications that aren’t being met by other additive technologies.

If you loved this, make sure you also check out the direct metal printing equipment we saw at IMTS.

Join Hackaday For A Night Of Pre-Maker Faire Hacks

พุธ, 09/19/2018 - 23:01

This weekend is the World Maker Faire in New York, and Hackaday will be there looking at the latest and greatest projects from makers around the globe. We’ll also be buying bottles of water for five dollars, but that’s another story entirely.

As always, this year’s World Maker Faire will be held at the wonderful New York Hall of Science, and the lineup is spectacular. There will be cosplay, and Adam Savage will be there with a half dozen Junior Mythbusters. There will be a twenty-six foot tall hydraulic hand trucked in from Burning Man. You’re looking at the greatest event in STEAM education since the Bay Area Maker Faire last May.

Hackaday has a fantastic New York community and we’re holding a meetup this Thursday to sync up with Maker Faire. Guess what?  You’re invited!

We’re teaming up with our friends at Kickstarter to bring you an awesome night of hardware builds, music hacks, snacks, and more. While this is an informal event, we do have a few people who will be bringing their latest hacks to show off. Nick Chelyapov, a designer turned gear head who designed an Arduino-based synthesizer and drum machine. This isn’t a toy, but it’s also not a complicated mess of patch cables and eurorack modules. The Bitty is a real instrument that’s easy enough for anyone to pick up and make bleep bloops.

Also confirmed for this meetup is Nick Yulman, an artist who works with sound and interactive media in a variety of contexts. He’s gearing up to install his robotic musical instruments in the Areté Gallery in Greenpoint, Brooklyn. But this week he’ll be showing us how musical robots helped him stop worrying and love digital music.

This isn’t an event to be missed. You can RSVP for the event over on Eventbrite, and be sure to bring whatever project you’re working on. It’s going to be an entire night of drinks and hacks, just the thing before Maker Faire really gets rolling. Once the weekend hits, find us at the Faire; several of us from the Hackaday crew will be wandering the grounds looking for awesome hardware projects. Stephen Tranovich is even giving a talk about the Hackaday Prize on Sunday at 11. See you at the Faire!

Braille on a Tablet Computer

พุธ, 09/19/2018 - 22:00

Signing up for college classes can be intimidating, from tuition, textbook requirements, to finding an engaging professor. Imagine signing up online, but you cannot use your monitor. We wager that roughly ninety-nine percent of the hackers reading this article have it displayed on a tablet, phone, or computer monitor. Conversely, “Only one percent of published books is available in Braille,” according to [Kristina Tsvetanova] who has created a hybrid tablet computer with a Braille display next to a touch-screen tablet running Android. The tablet accepts voice commands for launching apps, a feature baked right into Android. The idea came to her after helping a blind classmate sign up for classes.

Details on the mechanism are not clear, but they are calling it smart liquid, so it may be safe to assume hydraulic valves control the raised dots, which they call “tixels”. A rendering of the tablet can be seen below the break. The ability to create a full page of braille cells suggest they have made the technology pretty compact. We have seen Braille written on PCBs, a refreshable display based on vibrator motors, and a nicely sized Braille keyboard that can fit on the back of a mobile phone.

Learn To Loop The Python Way: Iterators And Generators Explained

พุธ, 09/19/2018 - 21:00

If you’ve ever written any Python at all, the chances are you’ve used iterators without even realising it. Writing your own and using them in your programs can provide significant performance improvements, particularly when handling large datasets or running in an environment with limited resources. They can also make your code more elegant and give you “Pythonic” bragging rights.

Here we’ll walk through the details and show you how to roll your own, illustrating along the way just why they’re useful.

You’re probably familiar with looping over objects in Python using English-style syntax like this:

people = [['Sam', 19], ['Laura', 34], ['Jona', 23]] for name, age in people: ... info_file = open('info.txt') for line in info_file: ... hundred_squares = [x**2 for x in range(100)] ", ".join(["Punctuated", "by", "commas"])

These kind of statements are possible due to the magic of iterators. To explain the benefits of being able to write your own iterators, we first need to dive into some details and de-mystify what’s actually going on.

Iterators and Iterables

Iterators and iterables are two different concepts. The definitions seem finickity, but they’re well worth understanding as they will make everything else much easier, particularly when we get to the fun of generators. Stay with us!

Iterators

An iterator is an object which represents a stream of data. More precisely, an object that has a __next__ method. When you use a for-loop, list comprehension or anything else that iterates over an object, in the background the __next__ method is being called on an iterator.

Ok, so let’s make an example. All we have to do is create a class which implements __next__. Our iterator will just spit out multiples of a specified number.

class Multiple: def __init__(self, number): self.number = number self.counter = 0 def __next__(self): self.counter += 1 return self.number * self.counter if __name__ == '__main__': m = Multiple(463) print(next(m)) print(next(m)) print(next(m)) print(next(m))

When this code is run, it produces the following output:

$ python iterator_test.py 463 926 1389 1852

Let’s take a look at what’s going on. We made our own class and defined a __next__ method, which returns a new iteration every time it’s called. An iterator always has to keep a record of where it is in the sequence, which we do using self.counter. Instead of calling the object’s __next__ method, we called next on the object. This is the recommended way of doing things since it’s nicer to read as well as being more flexible.

Cool. But if we try to use this in a for-loop instead of calling next manually, we’ll discover something’s amiss.

if __name__ == '__main__': for number in Multiple(463): print(number) $ python iterator_test.py Traceback (most recent call last): File "iterator_test.py", line 11, in <module> for number in Multiple(463): TypeError: 'Multiple' object is not iterable

What? Not iterable? But it’s an iterator!

This is where the difference between iterators and iterables becomes apparent. The for loop we wrote above expected an iterable.

Iterables

An iterable is something which is able to iterate. In practice, an iterable is an object which has an __iter__ method, which returns an iterator. This seems like a bit of a strange idea, but it does make for a lot of flexibility; let us explain why.

When __iter__ is called on an object, it must return an iterator. That iterator can be an external object which can be re-used between different iterables, or the iterator could be self. That’s right: an iterable can simply return itself as the iterator! This makes for an easy way to write a compact jack-of-all-trades class which does everything we need it to.

To clarify: strings, lists, files, and dictionaries are all examples of iterables. They are datatypes in their own right, but will all automatically play nicely if you try and loop over them in any way because they return an iterator on themselves.

With this in mind, let’s patch up our Multiple example, by simply adding an __iter__ method that returns self.

class Multiple: def __init__(self, number): self.number = number self.counter = 0 def __iter__(self): return self def __next__(self): self.counter += 1 return self.number * self.counter if __name__ == '__main__': for number in Multiple(463): print(number)

It now runs as we would expect it to. It also goes on forever! We created an infinite iterator, since we didn’t specify any kind of maximum condition. This kind of behaviour is sometimes useful, but often our iterator will need to provide a finite amount of items before becoming exhausted. Here’s how we would implement a maximum limit:

class Multiple: def __init__(self, number, maximum): self.number = number self.maximum = maximum self.counter = 0 def __iter__(self): return self def __next__(self): self.counter += 1 value = self.number * self.counter if value > self.maximum: raise StopIteration else: return value if __name__ == '__main__': for number in Multiple(463, 3000): print(number)

To signal that our iterator has been exhausted, the defined protocol is to raise StopIteration. Any construct which deals with iterators will be prepared for this, like the for loop in our example. When this is run, it correctly stops at the appropriate point.

$ python iterator_test.py 463 926 1389 1852 2315 2778 It’s good to be lazy

So why is it worthwhile to be able to write our own iterators?

Many programs have a need to iterate over a large list of generated data. The conventional way to do this would be to calculate the values for the list and populate it, then loop over the whole thing. However, if you’re dealing with big datasets, this can tie up a pretty sizeable chunk of memory.

As we’ve already seen, iterators can work on the principle of lazy evaluation: as you loop over an iterator, values are generated as required. In many situations, the simple choice to use an iterator or generator can markedly improve performance, and ensure that your program doesn’t bottleneck when used in the wild with bigger datasets or smaller memory than it was tested on.

Now that we’ve had a quick poke around under the hood and understand what’s going on, we can move onto a much cleaner and more abstracted way to work: generators.

Generators

You may have noticed that there’s a fair amount of boilerplate code in the example above. Generators make it far easier to build your own iterators. There’s no fussing around with __iter__ and __next__, and we don’t have to keep track of an internal state or worry about raising exceptions.

Let’s re-write our multiple-machine as a generator.

def multiple_gen(number, maximum): counter = 1 value = number * counter while value <= maximum: yield value counter += 1 value = number * counter if __name__ == '__main__': for number in multiple_gen(463, 3000): print(number)

Wow, that’s a lot shorter than our iterator example. The main thing to note is a new keyword: yield. yield is similar to return, but instead of terminating the function, it simply pauses execution until another value is required. Pretty neat.

In most cases where you generate values, append them to a list and then return the whole list, you can simply yield each value instead! It’s more readable, there’s less code, and it performs better in most cases.

With all this talk about performance, it’s time we put iterators to the test!

Here’s a really simple program comparing our multiple-machine from above with a ‘traditional’ list approach. We generate multiples of 463 up to 100,000,000,000 and time how long each strategy takes.

import time def multiple(number, maximum): counter = 1 multiple_list = [] value = number * counter while value <= maximum: multiple_list.append(value) value = number * counter counter += 1 return multiple_list def multiple_gen(number, maximum): counter = 1 value = number * counter while value <= maximum: yield value counter += 1 value = number * counter if __name__ == '__main__': MULTIPLE = 463 MAX = 100_000_000_000 start_time = time.time() for number in multiple_gen(MULTIPLE, MAX): pass print(f"Generator took {time.time() - start_time :.2f}s") start_time = time.time() for number in multiple(MULTIPLE, MAX): pass print(f"Normal list took {time.time() - start_time :.2f}s")

We ran this on a few different Linux and Windows boxes with various specs. On average, the generator approach was about three times faster, using barely any memory, whilst the normal list method quickly gobbled all the RAM and a decent chunk of swap as well. A few times we got a MemoryError when the normal list approach was running on Windows.

Generator comprehensions

You might be familiar with list comprehensions: concise syntax for creating a list from an iterable. Here’s an example where we compute the cube of each number in a list.

nums = [2512, 37, 946, 522, 7984] cubes = [number**3 for number in nums]

It just so happens that we have a similar construct to create generators (officially called “generator expressions”, but they’re nearly identical to list comprehensions). It’s as easy as swapping [] for (). A quick session at a Python prompt confirms this.

>>> nums = [2512, 37, 946, 522, 7984] >>> cubes = [number**3 for number in nums] >>> type(cubes) <class 'list'> >>> cubes_gen = (number**3 for number in nums) >>> type(cubes_gen) <class 'generator'> >>>

Again, not likely to make much difference in the example above, but it’s a two-second change which does come in handy.

Summary

When you’re dealing with lots of data, it’s essential to be smart about how you use resources, and if you can process the data one item at a time, iterators and generators are just the ticket. A lot of the techniques we’ve talked about above are just common sense, but the fact that they are built into Python in a defined way is great. Once you dip your toe into iterators and generators, you’ll find yourself using them surprisingly often.

Final Fantasy Exploit Teaches 32-bit Integer Math

พุธ, 09/19/2018 - 18:00

One of the fun things about old video games, besides their obvious nostalgia, is that some of the more popular games have been pried apart and tinkered with for years, leading to a lot of new “development” within the games. This often uncovers some hidden gems that gamers might not have had any knowledge of during the game’s heyday, like this coding oddity found in Final Fantasy 7 that illustrates a lot about how 32-bit processors do math.

The original PlayStation used a 32-bit RISC processor, but the most significant bit could be used for integer signing. This means that if you have an integer that has a value of 2,147,483,647 (01111111111111111111111111111111 in binary) and you add one, the value is suddenly negative 2147483648 because the most significant digit is also an indicator of the integer’s sign. In this situation, the integer is said to “overflow”. In Final Fantasy 7, if you can somehow get a character to deal 262,144 damage in one hit (much less than two billion, due to the way the game does damage calculations), the game has a little bit of a meltdown.

[4-8Productions] had to do a lot of work to show how this glitch can be exploited in the game as well. Usually damage in this game is limited to 9,999 but under certain configurations (admittedly obtained by using other exploits and tools available for FF7 like a savegame editor) two of the characters can deal more damage than this critical value, exposing the 32-bit processor’s weak spot.

Even though integer signing is a pretty basic concept for most of us, the video is definitely worth a watch especially if you’re fans of the classic game. Of course, Final Fantasy 7 isn’t the only classic that has been exploited and reverse-engineered to the extreme. You can use a Super Mario World level to implement a calculator now, too.

Visual Schematic Diffs in KiCAD Help Find Changes

พุธ, 09/19/2018 - 15:00

When writing software a key part of the development workflow is looking at changes between files. With version control systems this process can get pretty advanced, letting you see changes between arbitrary files and slices in time. Tooling exists to do this visually in the world of EDA tools but it hasn’t really trickled all the way down to the free hobbyist level yet. But thanks to open and well understood file formats [jean-noël] has written plotgitsch to do it for KiCAD.

In the high(er)-end world of EDA tools like OrCAD and Altium there is a tight integration between the version control system and the design tools, with the VCS is sold as a product to improve the design workflow. But KiCAD doesn’t try to force a version control system on the user so it doesn’t really make sense to bake VCS related tools in directly. You can manage changes in KiCAD projects with git but as [jean-noël] notes reading Git’s textual description of changed X/Y coordinates and paths to library files is much more useful for a computer than for a human. It basically sucks to use. What you really need is a diff tool that can show the user what changed between two versions instead of describe it. And that’s what plotgitsch provides.

plotgitsch’s core function is to generate images of a KiCAD project at arbitrary Git revisions. After that there are two ways to view the output. One is to generate images of each version which can be fed into a generic visual diff tool (UNIX philosophy anyone?). The documentation has an example script to help facilitate setting this up. The other way generates a color coded image in plotgitsch itself and opens it in the user’s viewer of choice. It may not be integrated into the EDA but we’ll take one click visual diffs any day!

Soldering Like It’s 205 BC

พุธ, 09/19/2018 - 12:00

Did you ever stop to think how unlikely the discovery of soldering is? It’s hard to imagine what sequence of events led to it; after all, metals heated to just the right temperature while applying an alloy of lead and tin in the right proportions in the presence of a proper fluxing agent doesn’t seem like something that would happen by accident.

Luckily, [Chris] at Clickspring is currently in the business of recreating the tools and technologies that would have been used in ancient times, and he’s made a wonderful video on precision soft soldering the old-fashioned way. The video below is part of a side series he’s been working on while he builds a replica of the Antikythera mechanism, that curious analog astronomical computer of antiquity. Many parts in the mechanism were soldered, and [Chris] explores plausible methods using tools and materials known to have been available at the time the mechanism was constructed (reported by different historians as any time between 205 BC and 70 BC or so). His irons are forged copper blocks, his heat source is a charcoal fire, and his solder is a 60:40 mix of lead and tin, just as we use today. He vividly demonstrates how important both surface prep and flux are, and shows both active and passive fluxes. He settled on rosin for the final joints, which turned out silky smooth and perfect; we suspect it took quite a bit of practice to get the technique down, but as always, [Chris] makes it look easy.

If you’d like to dig a bit deeper into modern techniques, we’ve covered the physics of solder and fluxes in some depth. And if you need more of those sweet, sweet Clickspring videos, we’ve got you covered there as well.

Super Magnesium: Lighter Than Aluminum, Cheaper Than Carbon Fiber

พุธ, 09/19/2018 - 09:00

We think of high tech materials as the purview of the space program, or of high-performance aircraft. But there are other niche applications that foster super materials, for example the world of cycling. Magnesium is one such material as it is strong and light, but it has the annoying property of burning in its pure state. Alloys of magnesium meanwhile generally don’t combust unless they are ground fine or exposed to high temperatures. Allite is introducing a new line known as “super magnesium” which is in reality three distinct alloys that they claim are 30% lighter than aluminum, as well as stronger and stiffer than the equivalent mass of that metal. They also claim the material will melt at 1200F instead of burning. To lend an air of mystique, this material was once only available for defense applications but now is open to everyone.

It’s a material that comes in three grades. AE81 is optimized for welding, ZE62 is better suited for forging, while WE54 is made for casting processes. Those names might sound like made up stock numbers, but they aren’t, as magnesium allows typically have names that indicate the material used to mix with the magnesium. A stands for aluminum, Z is for zirconium zinc, W is for yttrium, and E stands for rare earths. So AE81 is a mix of magnesium, aluminum, and some rare earth material. The numbers indicate the approximate amount of each addition, so AE81 is 8% aluminum and 1% rare earth.

Previously, flame retardant magnesium had calcium added to the mix which raised the burn temperature significantly. There remains a widespread perception that magnesium alloys easily burn, but that’s because elemental magnesium burns spectacularly. Typical alloys can burn, but fortunately for us that doesn’t happen at temperatures under 800F with these alloys in a solid piece of metal although powders or ribbons may burn more easily. According to the company, normal machining works well and requires less power than machining with other metals.

IF you want to see a big magnesium alloy forge, check out the Mesta. If you want to make your own wheels, maybe you should stick to aluminum for now.

Robotic Fruit Fly Won’t Eat Your Fruit

พุธ, 09/19/2018 - 06:00

The DelFly project has been busy since the last time we checked in on them. The Dutch team started 13 years ago and produced the smallest camera-carrying drone, and an autonomous tiny ornithopter. However, that ornithopter — now five years old — had to use some traditional control surfaces and a tail like an airplane which was decidedly not fruit fly-like. Now they’ve solved those problems and have announced the DelFly Nimble, a 13 inch and 1-ounce ornithopter. You can see the Nimble in the video below.

The close emulation of a real fly means the thing looks distinctly insect-like in flight. The dual wings use Mylar and form an X configuration. They flap about 17 times per second. A fully charged battery  — remember, the whole thing weighs an ounce — lasts five minutes. With an efficient speed of 3 meters per second, the team claims a flight range of over 1 kilometer with a peak speed that can reach  7 meters per second. It can even take a payload, as long as that payload weighs 4 grams or less.

The tiny robot has two rotary servo actuators, one for each pair of wings, along with two flapping mechanisms. There are a lot of technical details on their website, but it caught our eye that the flight computer is an STM32 microcontroller.

We assumed this had some sort of spy application, but DelFly says they want to use the machine to study insect flight dynamics. We’ll take that at face value.

If you want to see the previous revision which clearly had an airplane tail and control surfaces, we looked at it earlier. If you are wondering what the world looks like to an autonomous fruit fly, we can help with that, too.

Photos courtesy of TU Delft, CC BY-SA 4.0

Epic Clock Clocks The Unix Epoch

พุธ, 09/19/2018 - 03:00

Admit it: when you first heard of the concept of the Unix Epoch, you sat down with a calculator to see when exactly 2³¹-1 seconds would be from midnight UTC on January 1, 1970. Personally, I did that math right around the time my company hired contractors to put “Y2K Suspect” stickers on every piece of equipment that looked like it might have a computer in it, so the fact that the big day would come sometime in 2038 was both comforting and terrifying.

[Forklift] is similarly entranced by the idea of the Unix Epoch and built a clock to display it, at least for the next 20 years or so. Accommodating the eventual maximum value of 2,147,483,647, plus the more practical ISO-8601 format, required a few more digits than the usual clock – sixteen to be exact. The blue seven-segment displays make an impression in the sleek wooden case, about which there is sadly no detail in the build log. But the internals are well documented, and include a GPS module and an RTC. The clock parses the NMEA time string from the satellites and syncs the RTC. There’s a brief video below of the clock in action.

We really like the look of [Forklift]’s clock, and watching the seconds count up to the eventual overflow seems like a fun way to spend the next two decades. It’s not the first Epoch clock we’ve featured, of course, but it’s pretty slick.

A Look at Liquid Dielectrics

พุธ, 09/19/2018 - 00:00

One evening quite a few years ago, as I was driving through my hometown I saw the telltale flashing lights of the local volunteer fire department ahead. I passed by a side road where all the activity was: a utility pole on fire. I could see smoke and flames shooting from the transformer and I could hear the loud, angry 60 Hz buzzing that sounded like a million hornet nests. As I passed, the transformer exploded and released a cloud of flaming liquid that rained down on the road and lawns underneath. It seemed like a good time to quit rubbernecking and beat it as fast as I could.

I knew at the time that the flaming liquid was transformer oil, but I never really knew what it was for or why it was in there. Oil is just one of many liquid dielectrics that are found in a lot of power distribution equipment, from those transformers on the pole to the big capacitors and switchgear in the local substation. Liquid dielectrics are interesting materials that are worth taking a look at.

Same Thing, Different State

If you know what a dielectric is, you’ve got a pretty good idea already of why a dielectric in a liquid state would be a useful thing. A dielectric is just a material that doesn’t conduct electricity but can be polarized by an electric field. So dielectrics are just special cases of insulators, where the properties of the material make it easy for charges to separate but not flow. Therefore, all dielectrics are insulators, but not all insulators are dielectrics.

Liquid dielectrics are just dielectric materials in the liquid state, and maintain all the properties of the solid dielectrics commonly found in the capacitors we’re all familiar with. But for practical purposes, the more useful property of liquid dielectrics is their insulating ability as opposed to their charge separation properties. In fact, electrical insulation is probably the most important property of a liquid dielectric, at least as far as their use in power distribution gear.

That transformer I watched explode was likely filled with mineral oil, which is probably the most common liquid dielectric in use today. Mineral oil is just highly refined petroleum – baby oil is perfumed mineral oil – and it’s used in transformers because of its high flash point and excellent insulating properties. Its primary job is to conduct heat away from the windings by convection; some large transformers even have radiator fins to increase heat transfer to the atmosphere. The transformer oil also serves to exclude oxygen and moisture that would attack the interior components, especially the paper used to insulate the windings.

Another reason that electrical gear is often filled with oil is to limit corona discharge and quench arcing. Coronas occur when an electric field ionizes the fluid surrounding it. You can hear corona discharge under most high-tension lines, where the fluid being ionized is the air around the insulators. That’s not such a bad thing high in the air, but inside an enclosure it could lead to disaster. Liquid dielectric, with a lower relative permittivity (the preferred term over “dielectric constant”) than air, solves that problem. Liquid dielectrics are also used in the massive switches that control high-voltage systems, to damp the long, powerful arcs that can occur when circuits are broken in free air.

Buchholz relay: Source: Electrical Live

One interesting device that monitors the health of a transformer through its cooling oil is the Buchholz relay. This is an electromechanical device that sits in an oil-filled chamber plumbed to between the transformer and its radiator. It has two mercury tilt switches: one attached to a ball float at the top of the chamber, the other attached to a flap near the bottom where the pipes enter and exit. Minor transformer faults will decompose the oil and produce gas bubbles; if enough gas accumulates in the chamber, the float will drop enough for the mercury switch to make contact and trigger an alarm. Similarly, a major fault will produce a large slug of gas that will move the flap to trigger a circuit breaker to isolate the transformer and prevent further damage.

Better Options

Mineral oil isn’t perfect, of course. As I saw dramatically demonstrated, mineral oil is flammable. The search for a better transformer oil in decades past led to the use of polychlorinated biphenyls, or PCBs, organic chlorine compounds that have excellent dielectric properties and are practically non-flammable. Unfortunately they’re also highly toxic; think Love Canal and Agent Orange toxic. Their production was banned in the 1970s, but a not insignificant number of transformers filled with or contaminated by PCBs are still hanging on poles.

Other substitutes for mineral oil in transformers and switchgear include expensive silicone and fluorocarbon oils, used where flammability is a safety issue, and even oils derived from plants, like castor oil and plain vegetable oil. The natural oils are more easily biodegradable than the mineral-derived dielectrics and work well where there’s a possibility for leaks. Considerable effort has been put into optimizing these natural oils with additives and to using them as the basis for synthetic oils with the desired properties.

[Featured image: Transformer oil under test, KEP Power Testing Blog]

Get Your PCBs Made at the Mall

อังคาร, 09/18/2018 - 22:30

As we’ve seen with some recent posts on the subject here at Hackaday, there seems to be a growing schism within the community about the production of PCBs. Part of the community embraces (relatively) cheap professional fabrication, where you send your design off and get a stack of PCBs in the mail a couple weeks later. Others prefer at home methods of creating PCBs, such as using a CNC, laser engraver, or even the traditional toner transfer. These DIY PCBs take some skill and dedication to produce, but the advantage is that you can have the board in hand the same day you design it. But there may be a third option that seems to have slipped through the cracks.

[Virgil] writes in with a very interesting method of producing professional looking prototype PCBs that doesn’t involve weeks of waiting for the results, nor does it require any complicated techniques or specialized equipment. In this method, a UV printer is used to deposit your mask directly onto the copper clad board, which you then etch with whatever solution you like. Don’t have a UV printer you say? No worries, there’s probably somebody at the mall that does.

As [Virgil] explains, the little kiosks at the mall which offer to personalize items for customers generally use a UV printer which allows them to shoot ink on nearly any material. Instead of asking them to put a logo on the back of your phone, you’ll just be asking them to put the vector file of your mask, which you can bring along on a USB flash drive, onto the bare copper board. They may tell you they can’t guarantee the ink will stick to the bare copper, but just tell them you’re willing to take the risk. It’s one of those situations in which your money will be glad to speak on your behalf.

After the UV printer does its thing, the mask might be somewhat fragile. [Virgil] likes to wrap the boards in plastic for the ride home to make sure they don’t get damaged. Then it’s a quick dunk in the etching solution followed by a rinse and some isopropyl alcohol to get the remainder of the UV ink off. The results really do speak for themselves: nice sharp lines with exceptionally little manual work.

We’ve covered some relatively easy ways of quickly producing nice PCBs at home, as long as you don’t mind spending a couple hundred US dollars to get the hardware together. This seems to be the best of both worlds, though it does have the downside of requiring you speak with another human. We’d love to hear from any readers who give this particular method a shot.

Ask Hackaday: How’s That Capacitor Shortage Going?

อังคาร, 09/18/2018 - 21:01

There is a looming spectre of doom hovering over the world of electronics manufacturing. It’s getting hard to find parts, and the parts you can find are expensive. No, it doesn’t have anything to with the tariffs enacted by the United States against Chinese goods this last summer. This is a problem that doesn’t have an easy scapegoat. This is a problem that strikes at the heart of any economic system. This is the capacitor and resistor shortage.

When we first reported on the possibility of a global shortage of chip capacitors and resistors, things were for the time being, okay. Yes, major manufacturers were saying they were spinning down production lines until it was profitable to start them up again, but there was relief: parts were in stock, and they didn’t cost that much more.

Now, it’s a different story. We’re in the Great Capacitor Shortage of 2018, and we don’t know when it’s going to get any better.

The Beginnings of a Shortage

The news of a coming shortage of chip resistors and capacitors hit early this year. Yaego was not taking any new chip resistor orders. The best reasoning for Yaego’s actions were that prices on SMD resistors were already too low. There was an abundance of chip resistors and capacitors, and inventory simply wasn’t moving fast enough. There is a minimum price at which it is economical to manufacture resistors. It seems that price is somewhat north of a few tenths of a penny per resistor.

When we first looked at the impending shortage of resistors and capacitors a few things stood out. Firstly, it is nigh impossible to properly count the inventory of a single value of capacitor or resistor across all manufacturers, markets, and distributors. There’s a reason tiny chip resistors and capacitors are referred to as jellybean parts: if you need a 1MΩ, 5%, 100mW, 0603 resistor, that’s really all you need to know. But that doesn’t describe a single stock keeping unit — far from it. Distributors will list that same part three times, one for tape on reel, one for cut tape, and one for a complete reel. Between manufacturers parts will have slight differences, like in the temperature coefficient. And some manufacturers might not make a 1MΩ, 5%, 100mW, 0603 resistor, instead opting to bin out 1/8W resistors (unless you’re using them as heating elements, these resistors are the same). In short, if you’re building something that needs a 1MΩ resistor that will dissipate 100mW, and you need it in an 0603 package, there’s really no way of knowing how many resistors will work in that application.

Secondly, when news of a resistor and capacitor shortage hit, stock levels were still very, very high. You could buy ten million resistors, all identical, from the same manufacturer. It takes a while for stock levels to draw down; Twinkies didn’t magically disappear when Hostess declared bankruptcy in 2012. It took days for those Ding Dongs to disappear from store shelves, and that was with a story eminently attractive to social media and a public primed to panic buy. Resistors simply aren’t as sexy as Twinkies. Engineers are going to buy them as they need them.

Taking these two items together, we can get some idea of how the passive component shortage is going.

Our first look at the passive component shortage pulled data from FindChips Pro on Yageo’s RC0603JR-071ML thick film resistor (Disclosure: FindChips Pro is a tool built by Supplyframe, Hackaday’s parent company). In August of 2017, there were about ten million of these resistors available across all distributors. In February of 2018, there were six million. Today, there are a little more than two million. Supply levels are dropping, and slowly the price of these resistors is climbing.

In the same way that it’s impossible to tell how many 0603 resistors are available, it’s also impossible to say what the general trend is for these passive components. In the absence of data we can look at an anecdote, and in this regard I can tell you yes, there is a capacitor shortage.

On June 18th of this year, I ordered a reel of 50V, 0.1uF, X7R, 0805 capacitors from Mouser. I didn’t notice they were backordered, so oh well, I’ll just have a reel of parts show up sometime. Since then, the order has been pushed back twice, and I’ll now hopefully take delivery of this reel of capacitors on March 25th, 2019.

The Capacitor Shortage Doesn’t Tie In With Tariffs

The biggest news in the world of electronics component procurement are the tariffs enacted by the United States against Chinese goods. These tariffs may seem like an easy scapegoat but this shortage is not connected to the tariffs. It could be reasoned that tariffs have very little effect on stock levels at all — just because something costs more doesn’t mean you won’t be able to buy it, it will just cost more. No, the bigger threat to electronics manufacturers is the availability of resistors, capacitors, and diodes. These boring but vital components are found in every electronic device, and anecdotal evidence seems to say that we’re in the middle of a shortage.

The truth is that thoughtful discussion concerning a capacitor shortage is at least as hard as an Intro to Economics homework problem. Existing inventory sells for half a cent per piece, and the factory is only profitable if it can sell its widgets at seven tenths of a cent per piece. The factory owner can change what widget they’re cranking out, or give the factory some down time until it is profitable to make widgets again. That seems to be what is happening with jellybean parts.

Have You Encountered Stock Shortages on Parts?

So, how is the engineering community dealing with the shortage of these jellybean parts? We’d like to hear from the Hackaday community regarding resistors, capacitors, or any electronic components that have caused you to face shortages when it came time to order. Please share your experience in the comments below.

Rocket Science With The Other SpaceX

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

When you say that something’s not rocket science you mean that it’s not as hard to understand or do as it may seem. The implication is that rocket science is something which is hard and best left to the likes of SpaceX or NASA. But that’s not the hacker spirit.

[Joe Barnard] recently had an unsuccessful flight of his Falcon Heavy’s second stage and gives a very clear explanation of what went wrong using those two simple concepts along with the thrust, which in this case is just the force applied to the moment arm.

And no, you didn’t miss a big happening with SpaceX. His Falcon Heavy is a homebrew one using model rocket solid boosters. Mind you, it is a little more advanced than that as he’s implemented thrust vectoring by controlling the engine’s direction using servo motors.

And therein lies the problem. The second stage’s inertia is so small and the moment arm so short that even a small misalignment in the thrust vectoring results in a big effect on the moment arm causing the vehicle to deviate from the desired path. You can see this in the first video below. Another issue he discusses is the high drag, but we’ll leave that to the second video below which contains his explanation and some chart analysis.

So yeah, maybe rocket science is rocket science. But there’s no better way to get your feet wet then to get out there and get building.

ARM-Based NAS Is A Low Cost, Low Power Beauty

อังคาร, 09/18/2018 - 15:00

A NAS is always a handy addition to a home network, but they can be a little pricey. [Blake Burkhart] decided to create his own, prioritising budget and low power considerations, with a secondary objective to produce some router and IoT functionality on the side.

A Banana Pi R2 was a good choice to meet these requirements, being a router-based development board that also sports dual SATA connectors and gigabit Ethernet. [Blake] had some retrospective regrets about the performance of this particular SBC, but it does just fine when functioning purely as a NAS.

The enclosure for the device is a three bay hot-swap HDD module, with one of the bays gutted and used for the Banana Pi. It’s a simple idea, elegantly executed, which looks great. To access the ports of the Banana Pi, a custom acrylic side panel was laser cut, which also allowed LEDs to shine through – obligatory for any DIY server/computer build. When mounting this panel to the existing enclosure, [Blake] was reluctant to take his chances tapping the brittle acrylic, instead opting to melt the threads into the plastic with a pre-torched screw. We find that tapping acrylic is usually okay if you take it slow, but heat-tapping does sound fun.

The 12 V fan that came built into the hot-swap enclosure was too loud and awkwardly came in a non-standard size with a non-standard connector. What’s more, a buzzer alarm was triggered any time the fan was disconnected and 0 RPM was detected. [Blake]’s solution was to rewire the power pin of the connector to a 5 V rail; he found that running the fan at 5 V led to much quieter performance whilst keeping the HDDs sufficiently cool.

We find that when it comes to DIY network gear and routers, there are two approaches. Either create your own bespoke solution that perfectly fits your needs, like this perfect home router, or work around your current gear and build some tech to automatically reboot it for you.

 

It’s The Web, Basically

อังคาร, 09/18/2018 - 12:00

If you are of a certain age, you probably learned to program in Basic. Even if you aren’t, a lot of microcontroller hobbyists got started on the Basic Stamp, and there are plenty of other places where to venerable language still hides out. But if you want to write cool browser applications, you have to write JavaScript, right? Google will now let you code your web pages in Basic. Known as WWWBasic, this is — of course — a Javascript hack that you can load remotely into a web page and then have your page use Basic for customization. You can even import the thing into Node.js and use Basic inside your JavaScript, although it is hard to think of why you’d want to.

According to the project’s documentation — which is pretty sparse so far, we’re afraid — the Basic program is compiled into JavaScript on page load. There are a few examples, so you can generally pick up what’s available to use. There are graphics, the ability to read a keyboard key, and a way to handle the mouse.

If you were thinking about old-school games, so was Google, apparently. It would be fun to pull out some of the old books full of Basic games and get Star Trek, Wumpus, and all the other games of that era in the browser. However, it looks as though some things that would be difficult are yet to be implemented (for example, the INPUT statement). We suppose you could write your own quasi-input function using INKEY but that would be painful.

We couldn’t find any way for the Basic code to interact with the browser data directly which is a shame because that means your output is limited to a virtual Basic “screen.” It looks pretty good for graphics, but the text output looks like an old-school computer, which is charming but not terribly practical. Microsoft’s VBScript technology for example, can write into the page just like JavaScript does, and that would be nice to see in WWWBasic.

Is it practical? Probably not, but we enjoyed seeing our old friend Basic show up in the browser again. The fact that unlike VBScript it is sort of retro just made it that much more fun.

If you want a more traditional Basic experience, Quickbasic is still around. Or, if you want to stay in the browser, you can do that, too. Incidentally, no actual donkeys were harmed during the production of this post.

A $1, Linux-Capable, Hand-Solderable Processor

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

Over on the EEVblog, someone noticed an interesting chip that’s been apparently flying under our radar for a while. This is an ARM processor capable of running Linux. It’s hand-solderable in a TQFP package, has a built-in Mali GPU, support for a touch panel, and has support for 512MB of DDR3. If you do it right, this will get you into the territory of a BeagleBone or a Raspberry Pi Zero, on a board that’s whatever form factor you can imagine. Here’s the best part: you can get this part for $1 USD in large-ish quantities. A cursory glance at the usual online retailers tells me you can get this part in quantity one for under $3. This is interesting, to say the least.

The chip in question, the Allwinner A13, is a 1GHz ARM Cortex-A8 processor. While it’s not much, it is a chip that can run Linux in a hand-solderable package. There is no HDMI support, you’ll need to add some more chips (that are probably in a BGA package), but, hey, it’s only a dollar.

If you’d like to prototype with this chip, the best options right now are a few boards from Olimex, and a System on Module from the same company. That SoM is an interesting bit of kit, allowing anyone to connect a power supply, load an SD card, and get this chip doing something.

Currently, there aren’t really any good solutions for a cheap Linux system you can build at home, with hand-solderable chips. Yes, you could put Linux on an ATMega, but that’s the worst PC ever. A better option is the Octavo OSD335x SoC, better known as ‘the BeagleBone on a Chip’. This is a BGA chip, but the layout isn’t too bad, and it can be assembled using a $12 toaster oven. The problem with this chip is the price; at quantity 1000, it’s a $25 chip. At quantity one, it’s a $40 chip. NXP’s i.MX6 chips have great software support, but they’re $30 chips, and you’ll need some DDR to make it do something useful, and that doesn’t even touch the fiddlyness of a 600-ball package

While the Allwinner A13 beats all the other options on price and solderability, it should be noted that like all of these random Linux-capable SoCs, the software is a mess. There is a reason those ‘Raspberry Pi killers’ haven’t yet killed the Raspberry Pi, and it’s because the Allwinner chips don’t have documentation and let’s repeat that for emphasis: the software is a mess.

Still, if you’re looking for a cheap chip you can solder at home, this one seems to be the only game in town. We’re really looking forward to seeing what you make with it!

Hacked Electric Toothbrush Defeats Locks With Ease

อังคาร, 09/18/2018 - 06:00

The movie version of lockpicking tends to emphasize the meticulous, delicate image of the craft. The hero or villain takes out a slim wallet of fine tools, applies them with skill and precision, and quickly defeats the lock. They make it look easy, and while the image isn’t far from reality, there are other ways to pick a lock.

This expedient electric toothbrush lockpick is a surprisingly effective example of the more brute force approach to lockpicking. As [Jolly Peanut] explains, pin tumbler locks work by lining up each pin with the shear line of the cylinder, which allows the lock to turn. This can be accomplished a pin at a time with picks, or en masse by vibrating the pins until they randomly line up with the shear line just long enough for the lock to turn. A locksmith might use a purpose-built tool for the job, but a simple battery-powered electric toothbrush works in a pinch too. [Jolly Peanut] removed the usual business end of the brush to reveal a metal drive rod that vibrates at a high frequency. The rod was slimmed down by a little grinding to fit into the keyway of a lock, and with the application of a little torque, the vibration is enough to pop the pins into the right position. He tries it out on several locks in the video below, and it only takes a few seconds each time.

Such brute force methods have their drawbacks, of course. They’re not exactly subtle, and the noise they create may attract unwanted attention. In that case, hone your manual lockpicking skills with a giant 3D-printed see-through lock.

Thanks for the tip, [Net Imp].