Quantcast
Channel: Controlrede
Viewing all 4677 articles
Browse latest View live

$6 Weather Station Goes Where you Do

$
0
0

We admit, we see a lot of weather stations. What makes [Mike Diamond’s] take on this old favorite interesting is that it is tiny enough to carry with you, and uses your cell phone as a hotspot to deliver its data. Of course, that assumes you have a phone that can act as a hotspot.

The parts are straightforward, a power supply, an ESP8266, and a weather sensor board. It looks as though you could easily slip the whole affair into a tube or maybe a 3D printed enclosure. We were a little concerned about the bare wire used, but as [Mike] points out you can use insulated wire if you like, and we’d encourage you to do so.

There are some modifications required including removing the pin headers. [Mike] uses the old trick of smacking your hand on the table after melting the pins. You can also heat up each pin and pull it out with pliers. Or, if you have a hot air gun, get all the pins molten at once — just don’t heat up more of the board than you need.

On the data end, the ESP8266 uses Cayenne to transmit data which is the same kind of IoT backend we see a lot lately. On the one hand, this allows you to distribute it without developing a phone application. On the other hand, we would have been tempted to just make the ESP8266 a web server and populate a simple web page. Of course, you could still do that if you wanted to.

We’ve seen plenty of weather stations, but a lot of them are not nearly as compact. If you want to go old school, there’s always the TI 99/4A weather station.


3D Printed Clockwork Star Tracker

$
0
0

Astrophotography is one of those things you naturally assume must be pretty difficult; surely something so awesome requires years of practice and specialized equipment which costs as much as your car. You shake your fist at the sky (since you have given up on taking pictures of it), and move on with your life. Another experience you’ll miss out on.

But in reality, dramatic results don’t necessarily require sticker shock. We’ve covered cheap DIY star trackers before on Hackaday, but this design posted on Thingiverse by [Tinfoil_Haberdashery] is perhaps the easiest we’ve ever seen. It keeps things simple by using a cheap 24 hour clock movement to rotate a GoPro as the Earth spins. The result is a time-lapse where the stars appear to be stationary while the horizon rotates.

Using a 24 hour clock movement is an absolutely brilliant way to synchronize the camera with the Earth’s rotation without the hoops one usually has to jump through. Sure you could do with a microcontroller, a stepper motor, and some math. But a clock is a device that’s essentially been designed from the ground up for keeping track of the planet’s rotation, so why not use it?

If there’s a downside to the clock movement, it’s the fact that it doesn’t have much torque. It was intended to move an hour hand, not your camera, so it doesn’t take much to stall out. The GoPro (and other “action” cameras) should be light enough that it’s not a big deal; but don’t expect to mount your DSLR up to one. Even in the video after the break, it looks like the clock may skip a few steps on the way down as the weight of the camera starts pushing on the gears.

If you want something with a bit more muscle, we’ve recently covered a very slick Arduino powered “barn door” star tracker. But there’re simpler options if you’re looking to get some shots tonight.

Turning That Old Hoverboard Into A Learning Platform

$
0
0

[Isabelle Simova] is building Hoverbot, a flexible robotics platform using Ikea plastic trays, JavaScript running on a Raspberry Pi and parts scavenged from commonly available hoverboards.

Self-balancing scooters a.k.a. Hoverboards are a great source of parts for such a project. Their high torque, direct drive brushless motors can drive loads of 100 kg or more. In addition, you also get a matching motor controller board, a rechargeable battery and its charging circuit. Most hoverboard controllers use the STM32F103, so flashing them with your own firmware becomes easy using a ST-link V2 programmer.

The next set of parts you need to build your robot is sensors. Some are cheap and easily available, such as microphones, contact switches or LDRs, while others such as ultrasonic distance sensors or LiDAR’s may cost a lot more. One source of cheap sensors are car parking assist transducers. An aftermarket parking sensor kit usually consists of four transducers, a control box, cables and display. Using a logic analyzer, [Isabelle] shows how you can poke around the output port of the control box to reverse engineer the data stream and decipher the sensor data. Once the data structure is decoded, you can then use some SPI bit-banging and voltage translation to interface it with the Raspberry Pi. Using the Pi makes it easy to add a cheap web camera, microphone and speakers to the Hoverbot.

Ikea is a hackers favourite, and offers a wide variety of hacker friendly devices and supplies. Their catalog offers a wide selection of fine, Swedish engineered products which can be used as enclosures for building robots. [Isabelle] zeroed in on a deep, circular plastic tray from a storage table set, stiffened with some plywood reinforcement. The tray offers ample space to mount the two motors, two castor wheels, battery and the rest of the electronics. Most of the original hardware from the hoverboard comes handy while putting it all together.

The software glue that holds all this together is JavaScript. The event-driven architecture of Node.js makes it a very suitable framework to use for Hoverbot. [Isabelle] has built a basic application allowing remote control of the robot. It includes a dashboard which shows live video and audio streams from the robot, buttons for movement control, an input box for converting text to speech, ultrasonic sensor visualization, LED lighting control, message log and status display for the motors. This makes the dashboard a useful debugging tool and a starting point for building more interesting applications. Check the build log for all the juicy details. Which other products from the Ikea catalog can be used to build the Hoverbot? How about a robotic Chair?

A Canon Lens Adapter for the Game Boy Camera

$
0
0

Released in 1998, the Game Boy camera was a bit ahead of its time. This specialized Game Boy cartridge featured a 128×128 pixel CMOS sensor and took 4-color greyscale photos. The camera even rotated, allowing for selfies years before that word existed.

The fixed lens on this camera meant no zoom was possible. [Bastiaan] decided to address this shortcoming by building a Canon EF Lens Mount. The resulting build looks hilarious, but actually takes some interesting photos.

[Bastiaan] designed the mount using Rhino 3D, and printed it out on a Monoprice 3D printer. After some light disassembly, the mount can be screwed onto the Game Boy Camera. With the massive 70-200 f4 lens and 1.4x extender shown here, the camera gets a max focal distance of just over 3000 mm.

One issue with the Game Boy Camera was the limited options for doing anything with the photos. They could be transferred to other Game Boy Camera cartridges, or printed using the Game Boy Printer. Fortunately, [Brian Khuu] has a modern day solution that emulates the Game Boy Printer using an Arduino. This lets you get PNG files out of the device.

Power Harvesting Challenge: Scavenge Some Power, Win Prizes

$
0
0

It’s a brand new day as the Power Harvesting Challenge begins. This is the newest part of the 2018 Hackaday Prize and we’re looking for 20 entries who will each receive $1,000 and move onto the finals to compete for the top five spots, scoring cash prizes of $50k, $25k, $15k, $10k, and $5k.

Put simply, Power Harvesting is anything you can do that will pull some of the energy you need from a source other than wall-power or traditional battery tech. The most obvious power harvesting technologies are solar and wind. Ditch the battery in your doorbell for a solar panel, or turn your time-lapse camera rig into one that tops its battery with a tiny wind turbine. On the other end of the spectrum you could go nuts with chemistry and develop your own take on harvesting power from saltwater, or sip off the ambient RF waves all around us.

Every Idea Matters

We live in an amazing time as chip manufacturers have squeezed every low power trick out of their silicon dies that they possibly can. The Power Harvesting Challenge is the complement to those achievements: can we now squeeze as much energy out of non-traditional sources as possible to further reduce our energy footprints?

Ideas have a way of pollinating each other and growing into something new. Explore those threads of power harvesting inspiration you come across and show them off so others may benefit. What opportunities do you see in your everyday life? Can you remove from the power grid that reading light you use for 40 minutes each night? What kind of energy would a turbine on your rain downspout generate; is it enough to power a wireless rainfall sensor indefinitely? (After all, you only need those readings when it’s raining). Turn your shoes into power plants and report back on the amount of juice you see come in for any given number of steps.

A Bit of Inspiration

Earlier this year, Hackaday’s own Sean Boyce took on a power harvesting project. He set out to build a solar-powered spot welder that charged supercapacitors using the sun’s energy. The resulting proof of concept works, and is entirely self-sufficient without the need to receive power from the grid. It’s a first rev and isn’t 100% practical, but his research points to practicality through more work on component choice and usage. Whether you need something like this or not, the design process, characterization of components, and testing he did is applicable to all power harvesting projects so check it out!

Did you know there are doorbells that have no batteries in them? Well, kinda. The button you put next to your front door has a piezo element in it (a trick we saw starting about nine years ago). When you press the button it generates just enough juice to squawk out to the receiver — which is itself powered by a wall wart. How often does your doorbell ring? We’d love to see that receiver get some or all of its energy through power harvesting — that is low hanging fruit for an entry. Or, you could repurpose the button unit for other uses. Show us what you’ve got!

Do you remember the battery-less HD video streaming demo that we covered last month? This falls into the category of serious research, but highlights the kind of wacky ideas that might just become reality. This works using backscatter, reflecting the radio waves in the space all around us. It injects an analog HD video signal into that backscatter which is picked up and decoded by a receiving nearby. The camera is meant to be mounted in a pair of glasses and is completely battery-free because it uses RF to power the camera sensors and backscatter system. It’s a great example of doing a lot with the power harvested and stored in a capacitor.

Do It!

This is a fun area of electronics/physics to explore and you’ll learn a lot of interesting stuff just by trying. Our battery technology is slow to make big improvements, so let’s dream up some ways to take more of the effort off of those battery systems. Enter your project in the Power Harvesting Challenge now!

Preparing For A Lathe: How to Move 3000 Pounds of Iron

$
0
0

You say to yourself, “Self, I want, nay, need a lathe”. Being a good little trooper, you then did all your research, having chosen Import or American, Imperial or Metric, and all your feed options and such. You then pulled the trigger and the machine is en route to your shop. Now what?

Choosing a Spot for a Serious Tool

First and foremost, you need to figure out where to put it. Sure, you probably should have done that before you bought it, and maybe a pulling a tape measure would have been a good idea. Never let pesky details like that get in the way of buying something cool, though. You can make room. How badly do you really need a refrigerator? In a pinch you could sleep under the workbench and gain all that space taken up by the bed. Get creative in your shop layout.

If you bought a bench-top machine, you will of course need bench space for it. Some smaller machines, such as watchmaker’s lathes, can be stored in a cabinet and pulled out for use. Anything larger will need a permanent home, and should be bolted to the heaviest bench possible. The more mass you can inject into the system, the fewer issues you’ll have with tool chatter. Mass also damps vibrations when turning stock off-center or spinning up oddly-shaped things. Make sure the bench location you choose is close to power, because extension cords are to be avoided for machine tools. You’ll also likely need a bit of room behind the machine to access fuses and such.

If you bought a large floor-standing machine, be aware that these often require access to the back side of them for some types of adjustments and setup. This can mean anywhere from a few inches to several feet, depending on the machine. Large lathes are often placed in the middle of a shop partly for this reason. Big lathes also often need access to an overhead crane or chain fall for changing large chucks, or manipulating heavy stock.

The author’s Precision Matthews lathe, bolted to a steel bench, with plenty of space behind and to the left.

Regardless of the type of machine, make sure to leave space to the left of the headstock. You need room for long stock to protrude through the spindle. If you’re limited to only working on stock that fits entirely inside the spindle, you’ll limit your projects quite a bit, and you’ll be forced to waste a lot more stock.

I also recommend giving a thought to cleaning. Machine tools throw chips everywhere, and all the shields and trays and guards in the world won’t prevent it. Make sure you’ll be able to clean in, around, and behind the machine. You don’t want oily chips piling up forever. In some cases, this can even be a bit of a fire hazard.

Next, you want to look down and see what’s there. If your shop is in a bouncy castle, you’re no doubt having fun, but perhaps machining is not for you. (Small children also tend to gum up the change gears, which are a hassle to clean.) A concrete floor is ideal, whether under the machine itself, or under the workbench the machine is sitting on. Wood floors are not ideal for a floor-standing machine, because it shifts and warps. Less stable flooring can be okay, but you’ll need to re-level your machines more often. The same goes for mounting a bench-top machine on a wooden bench.

Delivery Day is About Heavy Lifting

The author’s Precision Matthews lathe on delivery day.

With all that sorted out, it’s time to think about taking delivery. New bench-top machines are likely to come on a pallet. Unless you have a loading dock, that means you’ll need lift-gate delivery service, which costs extra. If you’re buying used, don’t assume the seller has any way to put it in your truck. You’ll also need a way to get it off your truck and on to your bench in your shop. An engine hoist (sometimes also called a cherry picker, engine picker, or shop crane) is a great tool for all these jobs. They fold up nicely and are incredibly useful for lots of things around the shop. The rule of thumb for these is to get one at least double the size you think you need. If your machine weighs around 300lbs, get the 2-ton crane. The reason is that the ratings for these are based on the shortest extension of the lifting arm, which renders them useless. They operate (typically) at one-quarter their rating at full extension of the arm. Note that engine hoists can handle up to medium-sized floor-standing machines as well. Just make sure you really know how much it weighs.

Using an engine hoist to set a small lathe on its stand. Note the use of a lifting sling, and the properly-chosen lift point around the ways webbing.

For a large floor standing machine, you’ll need to get more creative for loading in your truck. Forklifts and front-end loaders are a good option, and can be easily rented. If the seller has a gantry crane or overhead chain fall hoist of some sort, that’s also good. Failing all that, it is possible to winch them up a ramp on to a trailer, but don’t underestimate the difficulty of this for 3000lbs of cast iron. It can easily be an all-day job to load this way, and it’s not the safest option. Unloading is the reverse of loading, as the saying goes (not really — I just made that up). If your machine came with a manual, be sure to follow the lifting instructions therein. Machines often have an unintuitive center of mass, so it can be tricky to know where and how to lift it. Use proper lift slings and good crane etiquette. This means absolutely no meat parts under the load at any time, be in control of the momentum, and always assume the worst is about to happen.

Using round bars and a prybar to move a large milling machine.

Once in your shop, floor-standing machines can be moved with various methods. A pallet jack is a great option if the machine is already sitting on something that allows you to get under it. Failing that, a common method is to go Full Egyptian. You can jack up the machine a little at a time and slide round steel bar stock under it. With a piece every foot or so, you can roll and slide the machine with a large prybar. It’s possible to move huge machines by yourself using this method.

I’ll close with the word that sows dread into the heart of every machine shop enthusiast. That word so heinous that many dare not speak it aloud: Stairs. Yes, the real world often has stairs in it, and people have moved huge machines down narrow basement death ladders. The first rule of doing this is to reduce weight as much as possible. Tear the machine down as far as you can. I’ve seen people strip lathes all the way down to a bare ways in order to slide pieces down the stairs one at a time. If you’re doing a restoration project, this is no big deal because you were going to dismantle it anyway. Plan ahead for this, though. It can be a long project in itself to dismantle a large machine, and you don’t want to be doing that on your front lawn on a school night in the rain.

Once you get your machine in situ, it’s time to get set up. Next time we’ll talk all about the fine art of lathe leveling.

Robot Dances to the Beat of New YouTube Subs

$
0
0

Sure, you could build some kind of numerical counter to keep track of new YouTube subscribers. But does an increasing digit display truly convey the importance of such an event? Of course not. What you need is something that recognizes this achievement for what it is and celebrates it with you. Something like Subby, the Interactive YouTube Subscriber Robot.

Whenever [brian brocken] gets a new subscriber, Subby’s little TV screen face lights up, and he either dances, salutes, or does another move within his impressive range of motion. [brian] wrote a Visual Basic app that searches his channel’s page for the subscriber count and sends it to the Nano’s COM port over serial every thousand milliseconds. [brian]’s got the VB app and all the STL files available on IO through Dropbox. Moonwalk past the break to watch Subby get down.

We like that Subby is too focused on celebrating each new subscriber to care about the total number itself. Maybe he could be programmed to do some extra special moves whenever the channel hits a milestone.

Tesla Model 3 Battery Pack Teardown

$
0
0

The Tesla Model 3 has been available for almost a year now, and hackers and tinkerers all over the world are eager to dig into Elon’s latest ride to see what makes it tick. But while it’s considerably cheaper than the Model S that came before it, the $35,000+ USD price tag on the new Tesla is still a bit too high to buy one just to take it apart. So for budget conscious grease monkeys, the only thing to do is wait until somebody with more money than you crashes one and then buy the wreckage cheaply.

Tesla Model 3 battery monitor board

Which is exactly what electric vehicle connoisseur [Jack Rickard] did. He bought the first wrecked Model 3 he could get his hands on, and proceeded to do a lengthy teardown on what’s arguably the heart and soul of the machine: its 75 kWh battery pack. Along the way he made some interesting discoveries, and gained some insight on to how Tesla has been able to drop the cost of the Model 3 so low compared to their previous vehicles.

On a Tesla, the battery pack is a large flat panel which takes up effectively the entire underside of the vehicle. To remove it, [Jack] and his assistant raise the wreck of the Model 3 up on a standard lift and then drop the battery down with a small lift table. Here the first differences are observed: while the Model S battery was made for rapid swapping (a feature apparently rarely utilized in practice), the battery in the Model 3 battery is obviously intended to be a permanent piece of the car; removing it required taking out a good portion of the interior.

With the battery out of the car and opened up, the biggest change for the Model 3 becomes apparent. The battery pack actually contains the charger, DC-DC converter, and battery management system in one integrated unit. Whereas on the Model S these components were installed in the vehicle itself, on the Model 3, most of the primary electronics are stored in this single module.

That greatly reduces the wiring and complexity of the car, and [Jack] mentions the only significant hardware left inside the Model 3 (beyond the motors) would be the user interface computer in the dashboard. When the communication protocol for this electronics module is reverse engineered, it may end up being exceptionally useful for not only electric vehicle conversions but things like off-grid energy storage.

A little over a year ago we featured a similar teardown for the battery back in the Tesla Model S, as well as the incredible project that built a working car from multiple wrecks.

[Thanks to DarksideDave for the tip.]


Pipelining Digital Logic in FPGAs

$
0
0

When you first learn about digital logic, it probably seems like it is easy. You learn about AND and OR gates and figure that’s not very hard. However, going from a few basic gates to something like a CPU or another complex system is a whole different story. It is like going from “Hello World!” to writing an operating system. There’s a lot to understand before you can make that leap. In this set of articles, I want to talk about a way to organize more complex FPGA designs like CPUs using a technique called pipelining.

These days a complex digital logic system is likely to be on an FPGA. And part of the reason we can get fooled into thinking digital is simple is because of the modern FPGA tools. They hide a lot of complexity from you, which is great until they can’t do what you want and then you are stuck. A good example of that is where you are trying to hit a certain clock frequency. If you aren’t careful, you’ll get a complaint from the tool that you can’t meet timing constraints.

There are many possible reasons this can happen, but probably the most common is you are just trying to do too much on each clock cycle. While we tend to think of our circuits as perfect, they aren’t. The logic gates are fast — very, very fast — but they are not infinitely fast. On larger chips, even the time for a signal to get to one part of the chip to another becomes significant.

The modern tools have great models for how long everything takes worst case and helps you by figuring out cases where things won’t work reliably. Consider this circuit:

The cloud represents a bunch of combinatorial logic like AND and OR. Could even be a lookup table, it doesn’t matter. If the delay from the input of the box to the output is shorter than the clock pulse, all is well. But if the signal on the right-hand flip flop’s D input is still in transit before the clock pulses again, you’ll get bad behavior. In fact, it is a little more complicated than that. The signal actually has to beat the clock by the flip flop’s setup time and stay stable over the hold time, both things the software knows about. We’ve talked about this in depth before. But for the purposes of this article, the key idea is the transit delay of our logic “cloud” has to be shorter than the clock timing.

Let’s say you have your heart set on a 100 MHz clock but the tool tells you that you can’t get there. Your logic is too slow. What can you do? One answer is pipelining.

Logic Traffic Jams

I often think a better term for a pipeline in this context would be a bucket brigade. The idea is to do a little work each clock cycle and then hand that off to another part of the chip. You see CPUs do this all the time. For example, a typical 8-bit Microchip PIC CPU does one instruction every four clock cycles. But some PIC clones (like the old Ubicom SX) could do an instruction every clock cycle and the clock speed was generally faster.

Consider a hypothetical CPU. It executes instructions in four steps:

  1. Fetch instruction
  2. Fetch arguments
  3. Do operation
  4. Write results

I’m glossing over a few things, but that is actually pretty close to accurate for a lot of CPUs. You have two choices. You could try to do everything in one clock cycle but that would be a nightmare. Suppose you are doing step 2 and one argument is the accumulator which takes 33 picoseconds to arrive at the logic that does the operation in step 3. But the register argument takes 95 picoseconds. Then the execution logic takes some time. When do you do step 4?

The only way to handle that would be to figure out the absolute longest time it would take for the answer in step 4 to be correct and limit your clock speed to that. It isn’t going to be very fast.

A much more common approach is to do one step during one clock cycle. Then do the next step in the next clock cycle. This effectively divides the clock by four since each instruction now requires four clock cycles, instead of one.

You could set up a counter that goes from 0 to 3 so you know what part of the processing you are doing. Or, you might use a one-hot scheme where each state has its own flip flop. Then the CPU does what it has to do and only that part of the logic has to finish before the clock strikes again. Really, it is the same problem as before, except the total time in each tick is less and you have to keep your clock slower than the slowest section. In some cases, a very slow section (like step 1) might introduce wait states so that you stay in that step longer, but you don’t see that as much as you used to when memory was slower and dynamic RAM refresh cycles were longer.

This works and it is a common way to do things. Probably exactly what is happening inside a PIC. But if you think about it, if all the steps take about the same amount of logic, then 3/4 of the device is doing nothing most of the time. While step 2 occurs, all the logic for the other steps is doing basically idle.

Pipelines

That’s where pipelining comes in. Imagine if instead of a counter that activates one of the four steps we put flip flops between each step. Consider executing four instructions: A, B, C, and D. The CPU resources would look like this:

See how it is like a bucket brigade? Each section does its thing and then hands off to the next section. This lets all the sections work on something all the time.

The general idea is to break the logic into chunks that are independent. Then put flip flops on all the outputs. This lets each section generate a result on each clock cycle that the flip flop then holds for the next chunk. Presumably, the chunks are significantly faster than the overall processing. If the Step 3 logic was, say, 95% of the time delay, you wouldn’t get much help from this technique.

Exactly how you do this will depend on what you want and how you want to build your logic in each step. Next time I’ll show you an example where each step takes a clock cycle. However, it is possible to let the processing in the block use a higher clock frequency and then use a slower clock enable signal for the pipeline. In that case, the output of one step can only change when clock enable is asserted.

All that assumes that each stage needs the same amount of time, too. In some cases, you’ll add “do nothing” stages to the pipeline to handle the case where a step requires more than one clock cycle. The no operation stages go before the slow stage, of course. Another alternative is to place a FIFO buffer between stages, which is often available as a ready-made block in your design environment.

You can also design each stage so it signals when it has valid data for the next stage. In a complex case, you can even have the stages handshake like a serial port. Step 2 could signal step 1 it is ready for more data and step 1 can signal when that data is valid. This can also combine with FIFO buffers if you want to make your pipeline super complex.

There are probably many more approaches you could devise, but the principles are the same. The issue with buffering and handshaking is that it further drives the logic complexity up which hurts speed and eats up FPGA resources. You have to balance the cost of the additional complexity against the benefits.

No Free Lunch

Going back to the simple pipeline, now we get one instruction per clock cycle and the processing chunks are smaller, so we can easily have a faster clock. This might seem like getting something for nothing — well, for very little, anyway — but it isn’t. If you are observant, you’ll notice that while we get one instruction per clock, there is also a big latency from the start of execution until the time that instruction A completes. Of course, since the clock is faster, that latency is really about the same as the unpipelined clock speed.

There are some other issues. Obviously, you add complexity. For a CPU, there are other concerns known as hazards. A complete discussion of hazards would have to start with some CPU design basics so that’s beyond the scope of this article, but consider this: If step 2 of instruction B has to read something that was written by instruction A, how would that work? Instruction A hasn’t made it to step 4 yet. In some cases, the solution is to stall the pipeline. In others, there is a way to steal the result from the pipeline early.

Another complexity you are probably aware of is filling the pipeline. In all modern processors, there is a penalty for making a conditional branch. You want to do, for example, a jump on zero instruction. But after you fetch it, where do you fetch the next instruction? If you grab the next instruction, there is some chance the jump will occur and that instruction won’t execute. If you grab the one that the jump references, you’ll still be wrong some of the time. Different designers do different things. Some try to predict the branch. Others just pick a strategy (usually get the next instruction) and stick to it. Skip instructions are often provided because the CPU can invalidate one instruction instead of the entire pipeline (unless the skipped instruction is a jump, of course).

You also have to make sure when you jump that any instruction that was in the middle of the pipeline at the time of the jump is not just discarded but also had no effect on the machine’s state before you dumped it. In CPU design lingo, the instruction doesn’t commit until you are sure it really executed.

I’ve used a lot of CPU examples because they are common. But these issues are true even if you are doing something that isn’t a traditional CPU. You have to make sure the pipeline is filled with the right instructions and that data is available when you need it.

Next Stop: Working Example

All this is great in theory, but how about a practical example? I’m going to use Verilog which has great features for modeling delays in circuits. Next time, I’ll explain how that works and show you an actual example of “computing” a value inside an FPGA and using pipelining to make it faster. You can play with the example using any Verilog simulator of your choice, but I’m going to use EDAPlayground. It is great for running little tests or demonstrations and gives you a wide range of tools right in your browser.

By the way, a good example of a non-pipelined CPU is Blue, which I’ve talked about before. The clock generator uses a one-hot scheme to produce 8 clock enables that govern what part of the instruction execution is underway. The chip does one part of the execution per clock, so the clock speed is essentially 1/8 of the clock input frequency.

See you next time!

Drifting Instrument Presents Opportunity to Learn about Crystal Oscillators

$
0
0

Sure, we all love fixing stuff, but there’s often a fine line between something that’s worth repairing and something that’s cheaper in the long run to just replace. That line gets blurred, though, when there’s something to be learned from a repair.

This wonky temperature-compensated crystal oscillator is a good example of leaning toward repair just for the opportunity to peek inside. [Kerry Wong] identified it as the problem behind a programmable frequency counter reading significantly low. A TCXO is supposed to output a fixed frequency signal that stays stable over a range of temperatures by using a temperature sensor to adjust a voltage-controlled oscillator that corrects for the crystal’s natural tendency to vary its frequency as it gets hotter or colder. But this TCXO was pretty old, and even the trimmer capacitor provided was no longer enough to nudge it back in range. [Kerry] did some Dremel surgery on the case and came to the conclusion that adding another trim cap between one of the crystal’s leads and ground would help. This gave him a much wider adjustment range and let him zero in on the correct 10-MHz setting. [Mr. Murphy] still runs the show, though – after he got the TCXO buttoned up with the new trimmer inaccessible, he found that the frequency was not quite right. But going from 2 kHz off to only 2 Hz is still pretty good.

Whether it’s the weird world of microwave electronics or building a whole-house battery bank, it’s always fun to watch [Kerry]’s videos, and we usually end up learning a thing or two.

Ted Dabney, Atari, and the Video Game Revolution

$
0
0

It may be hard for those raised on cinematic video games to conceive of the wonder of watching a plain white dot tracing across a black screen, reflecting off walls and a bounced by a little paddle that responded instantly to the twist of a wrist. But there was a time when Pong was all we had, and it was fascinating. People lined up for hours for the privilege of exchanging a quarter for a few minutes of monochrome distraction. In an arcade stuffed with noisy pinball machines with garish artwork and flashing lights, Pong seemed like a calm oasis, and you could almost feel your brain doing the geometry to figure out where to place the paddle so as not to miss the shot.

As primitive as it now seems, Pong was at the forefront of the video game revolution, and that little game spawned an industry that raked in $108 billion last year alone. It also spawned one of the early success stories of the industry, Atari, a company founded in 1972. Just last week, Ted Dabney, one of the co-founders of Atari, died at the age of 81. It’s sad that we’re getting to the point where we’re losing some of the pioneers of the industry, but it’s the way of things. All we can do is reflect on Dabney’s life and legacy, and examine the improbable path that led him to be one of the fathers of the video game industry.

Anything, Even Electronics

Ted Dabney, in the Corps. Source: They Create Worlds

Samuel F. Dabney, who preferred the nickname Ted, was born in 1937 – too late to experience the Depression and World War II, but just in time to be influenced by them. A native San Franciscan, he seems to have inherited the values of thrift and shared sacrifice that very much defined the culture at the time. His work ethic and poor grades led him to a trade school where he learned drafting, which served as an entree into the working world while he was still in his teens.

After high school, Ted worked as a surveyor, but it was seasonal work that left him high and dry for the California winters. Looking for a steady paycheck, Ted enlisted in the Marine Corps for a three-year stint, on the condition that he get training in an advanced technical specialty. Ted eventually got into electronics school, a sixteen-week immersion course that gave him the basics and led to him working on complicated systems like multiplex radios.

After the Corps, Ted looked for work so that he could afford to go to college. Jobs in electronics were plentiful in the late 50s in Silicon Valley, and Ted landed an engineering job at Ampex, the audio and video tape recorder company, working on military systems used to view spy plane film images. One day, a suit approached his bench while he was elbows-deep in a project and asked what he was doing. Ted said, “I don’t know if I can tell you about it. It’s all military.” The suit walked off, and Ted only found out later that it was Alexander M. Poniatoff, the “AMP” in Ampex. He had just brushed off the founder of the company.

Big Ideas in Silicon Valley

Computer Space, the game no one got.

Ted’s work on military imaging systems would serve him well after meeting Nolan Bushnell, a new Ampex hire. Bushnell, a fellow electrical engineer, had the entrepreneurial spirit that was common in the Valley in those days. Nolan had seen Spacewar! at the University of Utah and decided to commercialize it. He originally pictured a mainframe behind the scenes with coin-operated terminals to play the game, but when that proved too expensive, he convinced Ted to help engineer a cheaper game using the video techniques he had learned at Ampex.

An original Pong cabinet, signed by Al Alcorn. Source: By Chris Rand from Wikimedia Commons

With a $100 investment each, Ted and Nolan formed a company to build games. Their first game would be Computer Space, a clone of Spacewar! in a futuristic cabinet. Despite $3 million in sales, the game was a flop.

But Bushnell and Dabney had enough money to try again, and with the company renamed Atari, a term from the game Go, they set about looking for the next big idea. Nolan wanted a driving game, but Ted dismissed that idea as too complex, so Nolan settled for a tennis game similar to one seen on the Magnavox Odyssey home game console as a practice game. They hired a programmer, Allan Alcorn, to build the game using the video circuitry Ted had built. Three weeks later, they were all addicted to the finished game, and realized they had a product.

They had 12 cabinets built and installed in various bars and restaurants in the area, unsure of what would happen. Then the quarters started rolling in. Amazed at their luck, Nolan and Ted were alarmed to hear that the prototype machine, which had been installed in a local bar, was broken. They dispatched Alcorn to fix it, who found people lined up waiting to play the machine as soon as it was fixed. The problem: they had jammed so many quarters into it that the coinbox overflowed and shorted the machine out. Pong was a bona fide hit.

Pong Goes Poof

Orders for more machines pored in. Ted had to scramble to get cabinets built, convert dime store black and white TVs into game monitors, and put everything together. Atari grew rapidly, moving to a larger space to build their machines, hiring new people, and still only barely keeping ahead of the Pong craze.

But in the frenzy of the young company’s growth, things started going bad. Nolan made management decisions that left Ted out, and fearing that the company was going down, Ted bailed. He stayed on friendly terms with Nolan for a while, even helping him turn his pizza restaurant idea into a reality that would one day morph into the “Chuck E. Cheese’s Pizza Time Theaters” franchise. But the restaurant fell on hard times in the early 80s, and when Nolan was unable to pay Ted for his work, they parted ways for good.

Free from the video game industry, Ted returned to electrical engineering, working for companies like Raytheon and Teledyne. But the corporate scene chafed, and eventually he just threw in the towel and moved with his wife to the country. They bought a small grocery store, added a deli, and lived a life of well-deserved quiet.

Few people get to claim, “I was there when…”, but Ted Dabney was certainly in the thick of things of an unintentional revolution that started an industry. That following his own path and doing what he loved led him there hold lessons for us all.

Hacked RC Transmitters Control All The Things

$
0
0

If you have lots of RC creations about, each with their own receiver, you’ll know that the cost of a new one for each project can quickly mount up – despite RC receivers being pretty cheap these days. What if you could use a NRF24L01+ module costing less than $3?

That’s just what [Rudolph] has done for his Hackaday Prize entry, rudRemoteThough many people already spin their own RC link with the NRF24 modules, this sets itself apart by being a complete, well thought out solution, easily scalable to a large number of receivers.

The transmitter can be made of anything to hand; stick an NRF24 module and Teensy inside, some gimbals if needed, and you have a rudRemote transmitter. Gaming controllers, sandwich boxes and piles of laser cut parts are all encouraged options. [Rudolph] used some 40-year-old transmitters for his build – on the outside they remain unchanged, apart from a small OLED and rotary encoder for the function menu. The gimbal connections are simply re-routed to the Teensy I/O.

The protocol used is CRTP (Crazy RealTime Protocol); this is partly because one of the things [Rudolph] wanted to control is a CrazyFlie quadcopter. It’s a protocol that can easily be used to control anything you like, providing it fits into the 29-byte payload space. The CrazyFlie only uses 14 bytes of that, so there’s plenty of headroom for auxiliary functions.

We’d be interested to see the latency of this system – we’ve some surprising results when it comes to measuring cheap RC transmitter latency.

Lightning Generator from Electric Lighter

$
0
0

Generating high voltages isn’t too hard. A decent transformer will easily get you into the 100s of kilovolts, provided you’re a power company and have access to millions of dollars and a substation to put it. If you want to go above that then things start getting difficult, and most tend to look in other places for high voltages such as voltage multipliers.

These devices use nothing but capacitors and diodes, as [Jay] from [Plasma Channel] shows us how to build a small desktop version of a voltage multiplier that can produce almost 70 kV. That’s enough to throw a substantial spark, powered by nothing but a rechargable battery found in an electric lighter. They can also be cheaper than transformers to a point, since they require less insulation and less copper and iron. The voltage multiplier works in stages, with each stage boosting the voltage to a critical level above the stage before it similar to a Marx generator.

Similar designs are used by laboratories to simulate lightning strikes, and can generate millions of volts. They’re a cost-effective way of generating huge voltage pulses and studying everything from the effects of lightning on various equipment to generating X-rays in fusion power tests. We’ve even seen them in use in lasers.

Illuminated Bread for a Cookie Cutter World

$
0
0

Just in case you thought your eyes were playing tricks on you, we’d like to confirm right from the start that what you are looking at is a loaf of bread with internal LED lighting. Why has this bread been internally lit? We can’t really say. But what we can do is pass on the fascinating process that took an unremarkable piece of stale bread and turned it into an exceptional piece of stale bread.

As demonstrated by [The Maker Monster], working with stale bread is basically like working with wood. Wood that you can dip in soup, granted, but wood nonetheless. The process of electrifying the loaf starts with cutting it down the length on a bandsaw, and then hollowing it out with a rotary tool. This creates a fairly translucent shell that’s basically just crust.

You’re probably wondering how you keep a bread-light from getting moldy, and thankfully [The Maker Monster] does address that issue. The bread shell is completely coated with shellac, which creates a hard protective layer that will not only prevent decay but should give it some added strength. In the video it looks like only one coat is applied, but if we had to guess, a few coats would be necessary to really seal it up. Coating it with epoxy wouldn’t be a terrible idea either.

While the shellac dries on the bread, he gets to work on the lighted base (bet you never imagined you’d read a sentence like that), which is really just a sanded piece of wood with a standard LED strip stuck too it. It’s very understated, but of course the glowing loaf really draws the eye anyway. All that’s left is to glue the bread down to the base, and proudly display your creation at your next dinner party.

We can’t say that an electric ciabatta is in the cards for Hackaday HQ; but we know that baking good bread is a science in itself, and turning the failed attempts into works of art does have a certain appeal to it.

Friday Hack Chat: Hacking The Wild

$
0
0

It’s nearly summer, and that means we’re right at the start of conference season, at least for the tech and netsec crowd. Conferences, if you’re not aware, are a conspiracy for the hotel-industrial complex and a terrible way to spend thousands of dollars on a crappy hotel room and twenty-five dollar hamburgers.

[Andrew Quitmeyer] is working on an experimental academic conference that might just put an end to the horrors of conference season. He’s creating his own conference called Dinacon, and it’s going to be cheaper to attend, even though it’s on a tropical island in the Pacific.

For this week’s Hack Chat, we’re going to be talking with [Andrew] about Dinacon, a free, two-month-long conference with over 140 attendees from every continent except Antarctica. [Andrew]’s research is in ‘digital naturalism’ at the National University of Singapore and blends biological fieldwork with DIY crafting. The focus of this conference will be workshops where participants build technology in the wild meant to interact with nature.

Not only is the intersection of DIY electronics interesting to the Hackaday community, this is also an interesting conference from a logistical standpoint. The conference philosophy spells it out pretty clearly, with the main takeaway being that [Andrew] is self-funding this conference himself. It’s only going to take about $10,000 USD to host this conference (!), and there are even a few travel stipends to go around. This is also a two-month-long conference. I assure you, after dealing with Supercons, Hackaday meetups, and all the other events Hackaday puts on, this is exceptionally interesting. It’s unheard of, even.

For this week’s Hack Chat, we’re going to be discussing:

  • What is digital Naturalism?
  • What does DIY electronics look like in the forest? 
  • What did you learn from Hacking The Wild
  • What kind of things do people make at Dinacon? 
  • What is the biggest bug that ever got into one of your electronics experiments? 

You are, of course, encouraged to add your own questions to the discussion. You can do that by leaving a comment on the Hack Chat Event Page and we’ll put that in the queue for the Hack Chat discussion.join-hack-chat

Our Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. This week is just like any other, and we’ll be gathering ’round our video terminals at noon, Pacific, on Friday, June 8th.  Here’s a clock counting down the time until the Hack Chat starts.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io.

You don’t have to wait until Friday; join whenever you want and you can see what the community is talking about.


The Hacky Throttle Repair That Got Me On The Road Again

$
0
0

Old cars are great. For the nostalgia-obsessed like myself, getting into an old car is like sitting in a living, breathing representation of another time. They also happen to come with their fair share of problems. As the owner of two cars which are nearing their 30th birthdays, you start to face issues that you’d never encounter on a younger automobile. The worst offender of all is plastics. Whether in the interior or in the engine bay, after many years of exposure to the elements, parts become brittle and will crack, snap and shatter at the slightest provocation.

You also get stuck bolts. This was the initial cause of frustration with my Volvo 740 Turbo on a cold Sunday afternoon in May. As I tried in vain to free the fuel rail from its fittings, I tossed a spanner in frustration and I gave up any hope of completing, or indeed, starting the job that day. As I went to move the car back into the driveway, I quickly noticed a new problem. The accelerator was doing approximately nothing. Popping the hood, found the problem and shook my head in resignation. A Volvo 740 Turbo is fitted with a ball-jointed linkage which connects the accelerator cable to the throttle body itself. In my angst, the flying spanner had hit the throttle body and snapped the linkage’s plastic clips. It was at this point that I stormed off, cursing the car that has given me so much trouble over the past year.

Getting Back on the (Broken) Horse

Of course, I didn’t give up that easily. A few hours later, my enmity for the insolent Volvo had cooled down to a low simmer. I inspected the broken linkage and decided it would be an easy fix after all. I lathered the broken pieces in epoxy, wrapped them in paper to add strength and topped it all off with a small ziptie for good measure. I left it to set over night, and popped it on first thing in the morning.

Success! I started the car, and got a full 200 meters down the road before the accelerator once again became limp and useless. After pulling over, I found that the other half of the linkage had now broken off, and having fallen out on the road somewhere, I wasn’t going to find the pieces anytime soon. I left the car at the side of the road, got myself off to work, and began the search for replacement parts.

New linkage on the left, old linkage on the right. Note the extended length of the new linkage, and the paper-and-epoxy repair on the old one.

Alas, owning a European classic in Australia was hurting me. I could source the plastic ball-joint clips I had broken, sure – but for the princely sum of $50 by the time shipping was over with. This wouldn’t do. Instead, I decided to head to the wrecking yard, which appeared to have a car matching mine.

Upon arriving, I was dismayed to find that there was no car akin to mine at all! A day driving my race car to work had been irritating enough, so I wasn’t ready to give up yet. I scoured the yard for similar cars, and found a couple with similar linkages, and in the end, a Volvo 850 bore fruit. Pleased with what I’d found, I headed home, with the wrecking yard giving me the part for free. Kind chaps!

Getting home, I found that while the ball joint clips were the same size, the new linkage was far too long. The linkage uses an interesting method of adjustment. One plastic clip is permanently attached to the shaft, and doesn’t move. The other clip has a screw-on cap, underneath which there are several washers. When the cap is tightened onto the clip, a special washer inside is deformed and expands outward, gripping the shaft tightly and stopping the linkage from changing length.

Customizing Salvaged Parts

The new linkage, disassembled prior to cutting it to size. Note the circlip, which holds a spring and several washers on the shaft which make up the adjustment mechanism.

At the maximum extent of adjustment, it still wouldn’t fit, so I got creative. Undoing the adjustable clip, I found a circlip fitted to the shaft which acted as a stop for an internal spring. However, this only seemed to serve the purpose of stopping the washers from falling off the shaft. I removed this with pliers, and then all the internal washers. I then simply took out the angle grinder and cut the shaft down to the necessary size.

After some fiddling, I determined that the washers had to be assembled in a particular order to make them work properly. I then laid the new linkage next to the old one to set the length the same as the original part. This was important, as I had no interest in spending hours tinkering with the full adjustment process for the throttle body. I gingerly approached the car, and to my great relief, the new linkage clicked into place without a problem. Happily, the car has since completed many miles and has been free of further breakdowns.

There is Power in Greasy Hands

Be not afraid

In this day and age, it can be very tempting to just throw one’s hands up and replace something broken, or in the case of cars, just give up and trust the dealership to fix it. Granted, when the chips are down and your only ride is out of commission, sometimes the choice is out of our hands. But something to remember in this replacement culture is that repair can be possible, and can even be remarkably easy.

The real bonus is that you can learn something along the way, and if you’ve got the love for the project, putting your own labour in doesn’t sting so bad.  The lesson I learned was that while you can’t always source the correct parts, that doesn’t mean it’s over. With a little ingenuity and a willingness to do the work to make things fit, it’s often possible to get yourself out of a bind, and usually pretty cheaply, too.

Now, there’s every chance that my “new” part will only last a few years, given that it came from a car that itself was only a handful of years younger. But for now, I am once again enjoying my classic vehicle on a daily basis, and it cost me practically nothing! I’m calling that a win.

32 Shades Of Gray

$
0
0

The ATtiny85 is an incredible piece of engineering. In just eight pins, you get a microcontroller with just enough oomph to do some really heavy lifting. You get an Open Source toolchain, and if you’re really good, you can build your own programmer. It does have its limits though; there isn’t a whole lot of Flash, and of course you’re always going to need a few extra pins.

For his Hackaday Prize entry, [danjovic] is pushing whatever limits are left with the ‘tiny85. He’s using it as a test pattern generator, pushing out pixels to any old TV. The entire circuit is powered by a coin cell, and the entire thing fits in a Tic-Tac box.

The heart of the project, as you would expect, is a resistor ladder using all six available pins, using five for luminance and one for the sync. That is thirty-two shades of gray, if you’re keeping track. The trick is using the internal PLL and a bit of math to calculate the proper resistor values. The result is just a test pattern, yes, but [danjovic] managed to get a test pattern that has a resolution of 850 pixels across. That’s not bad by any measure.

Of course, if grayscale isn’t your thing, you can also use the ‘tiny85 to send Never The Same Color over the air or even push out the jams over a VGA port.

Roll A Black Box For Your Wheels

$
0
0

Telemetric devices for vehicles, better known as black boxes, cracked the consumer scene 25 years ago with the premiere of OnStar. These days, you can get one for free from your insurance company if you want to try your luck at the discounts for safe driving game. But what if you wanted a black box just to mess around with that doesn’t share your driving data with the world? Just make one.

[TheForeignMan]’s DIY telematics box was designed to pull reports of the car’s RPM, speed, and throttle depression angle through the ODBII port. An ODBII-to-Bluetooth module sends the data to an Arduino Mega and logs it on an SD card along with latitude and longitude from a NEO-6M GPS module. Everything is powered by the car’s battery through a cigarette lighter-USB adapter.

He’s got everything tightly wrapped up inside a 3D printed box, which makes it pretty hard to retrieve the SD card. In the future, he’d like to send the data to a server instead to avoid accidentally dislodging a jumper wire.

If this one isn’t DIY enough for you to emulate, start by building your own CAN bus reader.

Ask Hackaday: What Is The Future Of Implanted Electronics?

$
0
0

Biohacking is the new frontier. In just a few years, millions of people will have implanted RFID chips under the skin between their thumb and index finger. Already, thousands of people in Sweden have chipped themselves to make their daily lives easier. With a tiny electronic implant, Swedish rail passengers can pay their train ticket, and it goes without saying how convenient opening an RFID lock is without having to pull out your wallet.

That said, embedding RFID chips under the skin has been around for decades; my thirteen-year-old cat has had a chip since he was a kitten. Despite being around for a very, very long time, modern-day cyborgs are rare. The fact that only thousands of people are using chips on a train is a newsworthy event. There simply aren’t many people who would find the convenience of opening locks with a wave of a hand worth the effort of getting chipped.

Why hasn’t the most popular example of biohacking caught on? Why aren’t more people getting chipped? Is it because no one wants to be branded with the Mark of the Beast? Are the reasons for a dearth of biohacking more subtle? That’s what we’re here to find out, so we’re asking you: what is the future of implanted electronics?

Over the past decade, we’ve seen hundreds of builds using RFID and NFC tags. We’ve seen people use these tags to start a car and open a door. We’ve seen NFC tags placed in bio-compatable glass, and we’ve seen RFID tags constructed out of ATtinys and a spool of magnet wire. Hackers, it seems, are all over short-range, batteryless electronic tracking tags, and that doesn’t count the huge number of subway cards, contactless payment systems, or the fact that just about every phone these days can read these cards.

RFID Implants are simple, cheap, and battery-free

While embedding RFID tags under the skin delivers us this world of contactless payments, magic locks, and the ability to be tracked anywhere, we really haven’t seen many applications for embedded tags. In fact, the most interesting application of wearable RFID tags may just be putting LEDs on fingernails. Yes, for just $3 per fingernail, you too can light up whenever you pass within a few inches of a contactless card reader.

Part of the lack of public interest in wearable RFID tags may just be a shortcoming of the system itself; if you want to pay for your drinks at Starbucks, that’s one RFID tag. If you want to get on the subway, that’s another RFID tag. If you want to open the door to your office, that’s a third RFID tag. Short of carrying around a tag programmer with you around at all times — completely negating the convenience of storing your keys under your skin — we don’t yet have the technology to have one RFID implant that rules all.

There are, of course, other technologies available for implantable cyborgation, but chipping yourself with an RFID or NFC tag is by far the most popular. People aren’t really doing it, though, so we’re opening this one up to the peanut gallery. What will it take to make implantable electronics widely popular? Would you get one? If you have a chip in your hand, what do you use it for and how has that changed over time? What do you think?

Building a Knife by Hand is just as Hard as you Think

$
0
0

Carl Sagan once said: “If you wish to make an apple pie from scratch, you must first invent the universe.” In other words, the term “scratch” is really a relative sort of thing. Did you grow the apples? Did you plant the wheat to make the flour? Where do you keep your windmill, incidentally? With Carl’s words in mind, we suppose we can’t say that [Flannagill] truly built this incredible knife from scratch, after all, he ordered the sheet steel on Amazon. But we think it’s close enough.

He was kind enough to document the epic build in fantastic detail, including (crucially), the missteps he made along the way. While none of the mistakes were big enough to derail the project, he mentions a few instances where he wasted time and money trying to take shortcuts. Even if making your own knives at home isn’t on your short list of summer projects, we’d wager there’s something in this build log you can learn from regardless.

So how does one build a knife? Slowly and methodically, if what [Flannagill] has written up is any indication. It started with a sketch of the knife on a piece of paper, the outline of which was then transferred to a piece of tool steel with nothing more exotic than a permanent marker. An angle grinder was then used to follow the outline and create the rough shape of the final knife.

From there, the process is done almost entirely with hand files. Here [Flannagill] gives one of his most important pieces of advice: don’t cheap out on the tools. He bought the cheapest set of files he could, and paid the price: he says it took up to 14 hours to complete just one side of the knife. Once he switched over to higher quality files, the rest of the work went much faster.

After filing and sanding the knife blank, it went into a charcoal fire to be hardened, followed by a total of 4 hours in a 200 C (~400 F) oven to heat temper it. Finally the handle pieces (which are officially known as “scales”) were attached, and finished with considerably less labor intensive woodworking methods. The final result is a gorgeous one of a kind specimen that [Flannagill] is rightly very proud of.

If you’re worried this process looks a bit too quick and easy for you, don’t worry. You can always go the [Bil Herd] route and make a forge out of your old sink if you’d rather start your apple pie a bit closer to the tree.

Viewing all 4677 articles
Browse latest View live