In simple terms, Kirchhoff’s laws are really an expression of conservation of energy. Kirchhoff’s current law (KCL) says that the current going into a single point (a node) has to have exactly the same amount of current going out of it. If you are more mathematical, you can say that …read more

]]>In simple terms, Kirchhoff’s laws are really an expression of conservation of energy. Kirchhoff’s current law (KCL) says that the current going into a single point (a node) has to have exactly the same amount of current going out of it. If you are more mathematical, you can say that the sum of the current going in and the current going out will always be zero, since the current going out will have a negative sign compared to the current going in.

You know the current in a series circuit is always the same, right? For example, in a circuit with a battery, an LED, and a resistor, the LED and the resistor will have the same current in them. That’s KCL. The current going into the resistor better be the same as the current going out of it and into the LED.

This is mostly interesting when there are more than two wires going into one point. If a battery drives 3 magically-identical light bulbs, for instance, then each bulb will get one-third of the total current. The node where the battery’s wire joins with the leads to the 3 bulbs is the node. All the current coming in, has to equal all the current going out. Even if the bulbs are not identical, the totals will still be equal. So if you know any three values, you can compute the fourth.

If you want to play with it yourself, you can simulate the circuit below.

The current from the battery has to equal the current going into the battery. The two resistors at the extreme left and right have the same current through them (1.56 mA). Within rounding error of the simulator, each branch of the split has its share of the total (note the bottom leg has 3K total resistance and, thus, carries less current).

Kirchhoff’s voltage law (KVL) says that the voltage around a loop has to sum to zero. Take a simple example. A 12V battery has a 12V light bulb across it. How much voltage is across the bulb? 12V. If there are two identical bulbs they will still see 12V across each bulb.

You can simulate this circuit to see the effect. The loop with the two bulbs has 12V across it and each bulb gets half because they are identical. The right-hand path has different voltages but they still have to add up to 12.

All by itself, KVL wouldn’t be very useful, but there is a principle known as superposition. That’s a fancy way of saying that you can break a complex circuit up into pieces and look at each piece, then add the results back and get the right answer.

You can use these two laws to analyze circuits using nodal analysis (for KCL) or mesh analysis for KVL, regardless of how complex they are. The only problem is that you wind up with lots of equations and may have to solve them as a system of simultaneous equations. Luckily, computers are really good at that, and circuit analysis software often uses one of these techniques to find answers.

Consider this circuit:

This is actually too simple since we know V1 and V2 right out of the gate (5V for the battery and 0, because V2 is connected to ground). In addition, a human would know to calculate the equivalent of R2 and R3, but that might not be apparent in a more complex circuit, especially to a computer.

The node labeled Vx has three currents. I1 is the current through the battery and R1 flowing in. I2 is the current flowing through R2 and I3 is the current flowing through R3. You can write equations for all three currents, easily:

I1=(Vx-V1)/R1 I2=(Vx-V2)/R2 I3=(Vx-V2)/R3

Of course, we know the values of everything on the right except Vx, so:

I1=(Vx-5)/300 I2=Vx/R2 I3=Vx/R3

Note that the first line above is “backward” because I1 is flowing into node Vx and the others are flowing out; there are several ways you could elect to handle this. Now using KCL we know that: `I1+I2+I3=0`

You can replace all of the I’s with their equation:

(Vx-5)/300 + Vx/500 + Vx/100 = 0 (5Vx+3Vx+15Vx)/1500 = 5/300 23Vx/1500=5/300 23Vx=1500(5/300) Vx=25/23=1.09V (about)

For line 2 above, the least common multiple of 300, 500, and 100 is 1500 and we add 5/300 to both sides to get the Vx terms alone. In line 4 we multiply both sides by 1500 to arrive at the solution.

If you look at the simulation, you will see that Vx is 1.09V. Now you can go back in the equations and get I1, I2, and I3, by just plugging in values. Of course, real problems get thornier and usually wind up with a system of equations you have to solve.

If you really want to pursue the higher math, you might enjoy the Khan Academy video on nodal analysis, below. Note that they handle the idea of negative current explicitly. If you want to use their math on our example, then I2 and I3 are explicitly negative and I1 is derived from 5-Vx instead of Vx-5. Then you wind up with -23Vx=-25 and get the same result in the end. That’s how math is.

The other way to do this sort of systematic analysis with KCL and KVL is mesh analysis. There you use superposition and simultaneous equations. But don’t worry — it isn’t as hard as it might sound. Rather than go into that, you can watch another Khan Academy video on the subject. Just dust off those algebra skills.

[Gustav Kirchhoff] was a German physicist who worked all this out in 1845, about 20 years after [Ohm] worked out his law. Actually, [Ohm] wasn’t first, he was just the first to talk about it. [Henry Cavendish] figured out Ohm’s law in 1781 using Leyden jars (big capacitors) and his own body as an ammeter. He’d complete the circuit with his body and judge the current flow by the amount of shock he received. Now that’s dedication. [Ohm] had a better experimental setup and — as far as we know — didn’t shock himself as a matter of course.

You might think that [Ohm] was well respected for his discovery, but that wasn’t the case. The establishment was very upset with his findings. One German yearbook of scientific critique labeled it “a web of naked fancies.” The German Minister of Education called it a “heresy.” It was in opposition to Barlow’s law (suggested in 1825 by [Peter Barlow]) which said that current was related to the diameter of the wire and the length of it.

Actually, [Barlow] wasn’t totally wrong. He used a constant voltage and did not understand (as [Ohm] did) that the voltage source had an internal resistance. [Ohm], in fact, switched from batteries to thermocouples because at the time they had a more stable output and predictable low internal resistance.

It is hard to imagine today, but there was a lot of experimentation and law writing back then — not all of it correct, obviously. Often the person we associate with the work wasn’t really the first, just the one that published. Another example is the Wheatstone bridge. [Sir Charles Wheatstone] made it famous, but it was actually the brainchild of [Samuel Christie].

For some reason, everyone knows Ohm’s law, but you don’t hear much about poor old [Gustav]. If you take an electrical engineering class, these laws are among the first things you learn. You might not use it every day, especially in this day of computer simulations. However, understanding analysis like this can help you develop an intuitive understanding of electronics.

By the way, the simulations in this post are using the Falstad simulator we’ve covered before. While it is common to use a simulator to just give you answers, it is also useful to let it check your work. The equations above, for example, would be easy to mix up signs or make another mistake. If the answer doesn’t match the simulator, you probably made a mistake. Sure, you can just read the value off the simulator, but that doesn’t let you develop the intuition that working through the math will.

Filed under: Engineering, Featured, Original Art, slider ]]>

NIST stepped up to the plate, starting a lightweight cryptography project in 2013 which has now come out with a first report, and here it is as a PDF. The project is …read more

]]>NIST stepped up to the plate, starting a lightweight cryptography project in 2013 which has now come out with a first report, and here it is as a PDF. The project is ongoing, so don’t expect a how-to guide. Indeed, most of the report is a description of the problems with crypto on small devices. Given the state of IoT security, just defining the problem is a huge contribution.

Still, there are some concrete recommendations. Here are some spoilers. For encryption, they recommend a trimmed-down version of AES-128, which is a well-tested block cipher on the big machines. For message authentication, they’re happy with Galois/Counter Mode and AES-128.

I was most interested in hashing, and came away disappointed; the conclusion is that the SHA-2 and SHA-3 families simply require too much state (and RAM) and they make no recommendation, leaving you to pick among less-known functions: check out PHOTON or SPONGENT, and they’re still being actively researched.

If you think small-device security is easy, read through the 22-question checklist that starts on page twelve. And if you’re looking for a good starting point to read up on the state of the art, the bibliography is extensive.

Your tax dollars at work. Thanks, NIST!

And thanks [acs] for the tip!

Filed under: Microcontrollers ]]>

On display at her Maker Faire Bay Area booth were numerous builds …read more

]]>

On display at her Maker Faire Bay Area booth were numerous builds built common goods you likely have on hand. I quite enjoyed seeing the tentacle made of out popsicle sticks, glue, straws, and some string. It’s pretty cool to hold onto one end and pull the string to roll up the appendage, and provides the most basic intro to fabrication and robotics concepts. Think back to some of your earliest empowering moments when you realized you didn’t need purpose-built things like LEGO to build stuff. You can build using *anything*!

Most popular at the booth is a set of electric banjos. They’re nothing more than a fingerboard, strings, and a piezo element. Connect to a small Radio Shack amp/speaker combo and you get a pretty good sound out of them. [Miranda] added a 3D printed fret board which she plans to make available for those who don’t want to fabricate their own fret system. Along with those, there is a DJ mixing board that used old CDs placed on bottle caps to swivel and have salvage tactile switches underneath to give them interactivity.

There’s a ton to look at on her collection of guides. She gave me a demonstration of her Harry Potter themed wands, one which shoots water and the other that shoots BBs. These would make perfect summer projects to take on one the kids are out of school. There are plans to get a subscription kit biz up and running at some point in the future but the instructions for the builds will always be available free.

Filed under: misc hacks ]]>

The questions he wanted to answer were:

- Are they 3.3 V-compatible?
- How much current do they draw?
- How long to they show a detection?
- How far away can they detect the motion of a typical adult?
- What is the angle of detection?
- Can they see through certain materials?
- Can the devices coexist with other devices in the same area? What about WiFi networks?

Good list of questions, and if …read more

]]>The questions he wanted to answer were:

- Are they 3.3 V-compatible?
- How much current do they draw?
- How long to they show a detection?
- How far away can they detect the motion of a typical adult?
- What is the angle of detection?
- Can they see through certain materials?
- Can the devices coexist with other devices in the same area? What about WiFi networks?

Good list of questions, and if you want to know the answers, you should watch the video.

The devices he examines are the RCWL-0512, HW-MS03, WB3-12, XYC-WB-D1, and the HFS-DC06. The RCWL module is the least expensive, and we found several places selling them for anywhere from fifty cents to a dollar each. The most expensive module–the HFS-DC06–is about $5.

If you are interested in these, this video will save you a lot of experimentation time. The boards are all somewhat similar, but [Andreas] covers the differences between them early in the video.

We’ve seen cheap radar detectors before, but not this cheap. We’d love to revisit some of the other radar projects we’ve seen in the past and see if they could use these very cheap devices.

Filed under: wireless hacks ]]>

“Teardown” isn’t really accurate here, at least by the standard of [electronupdate]’s other component teardowns, like his looks inside LED light bulbs and das blinkenlights. “Rubdown” is more like it here, because what starts out as a rather solid looking SMT component needs to be ground down bit by bit to reveal the inner ferrite and copper goodness. [electronupdate] embedded the R30 SMT inductor in epoxy and hand lapped the whole thing until the windings were visible. Of course, just peeking inside …read more

]]>“Teardown” isn’t really accurate here, at least by the standard of [electronupdate]’s other component teardowns, like his looks inside LED light bulbs and das blinkenlights. “Rubdown” is more like it here, because what starts out as a rather solid looking SMT component needs to be ground down bit by bit to reveal the inner ferrite and copper goodness. [electronupdate] embedded the R30 SMT inductor in epoxy and hand lapped the whole thing until the windings were visible. Of course, just peeking inside is never enough, so he set upon an analysis of the inductor’s innards. Using a little careful macro photography and some simple image analysis, he verified the component’s data sheet claims; as an aside, is anyone else surprised that a tiny SMT component can handle 30 amps?

Looking for more practical applications for decapping components? How about iPhone brain surgery?

[via Dangerous Prototypes]

Filed under: misc hacks, teardown ]]>

Floam is a sticky, moldable goo originally sold as the follow-up to Nickelodeon’s Gak in the early 1990s. It consists of styrofoam pellets held together with a colored binder that doesn’t leave a mess and doesn’t dry out. While the Nickelodeon version is lost …read more

]]>Floam is a sticky, moldable goo originally sold as the follow-up to Nickelodeon’s Gak in the early 1990s. It consists of styrofoam pellets held together with a colored binder that doesn’t leave a mess and doesn’t dry out. While the Nickelodeon version is lost to the sands of time, a Floam-like substance is available at any toy store. [Madox] picked up a few blister packs and began modeling his ideal trackball.

With the proper shape in hand, [Madox] needed a way to get this design into a computer. Photogrammetry is the solution, and while earlier experiments with Autodesk Catch were successful, Autodesk has morphed and rebranded their photogrammetry software into Autodesk ReMake. Turing a pile of styrofoam balls into a 3D model is as simple as taking a bunch of pictures and uploaded to Autodesk’s ‘cloud’ service.

In just a few minutes, a proper 3D mesh arrived from the Autodesk mothership, and [Madox] took to importing this model into Fusion 360, fiddling with chamfers, and eventually got to the point where a 3D printer was necessary. It took a few revisions, but now [Madox] has a custom designed trackball that was perfectly ergonomic.

Filed under: peripherals hacks ]]>

Case in point: prolific anti-biometry hacker [starbug] and a group of friends at the Berlin CCC are able to authenticate to the “Samsung Pay” payment system through the iris scanner. The video, embedded below, shows you how: take …read more

]]>Case in point: prolific anti-biometry hacker [starbug] and a group of friends at the Berlin CCC are able to authenticate to the “Samsung Pay” payment system through the iris scanner. The video, embedded below, shows you how: take a picture of the target’s eye, print it out, and hold it up to the phone. That was hard!

Sarcasm aside, the iris sensor uses IR to recognize patterns in your eye, so [starbug] and Co. had to use a camera with night vision mode. A contact lens placed over the photo completes the illusion — we’re guessing it gets the reflections from room lighting right. No etching fingerprint patterns into copper, no conductive gel — just a printout and a contact lens.

We’ve ranted about the insecurity of fingerprints before; they’re not a good secret, they’re irrevocable, and they’re hard to store securely. And on top of these conceptual problems, they’re quite spoofable, as [starbug] and many others have shown, going way back.

So why do we still use them? Fingerprint readers and iris scanners are “good enough” security and they’re fun to hack around with. Should you add one to your project for grins? Absolutely. Should you require your citizenry to use them for authentication, or use them for real security? We wouldn’t.

Thanks [mbln] for the tip!

Filed under: security hacks ]]>