Tag Archives: hardware

State-Aware Foldable Electronics Enters The Third Dimension

via Hackaday » hardware

Still working with PCBs in 2D? Not [Yoav]. With some clever twists on the way we fab PCBs, he’s managed to create a state-aware foldable circuit board that responds to different configurations.

From his paper [PDF warning], [Yoav] discusses two techniques for developing foldable circuits that may be used repeatedly. The first method involves printing the circuit onto a flexible circuit board material and then bound front-and-back between two sheets of acrylic. Valid folded edges are distinguished by the edges of individual acrylic pieces. The second method involves laying out circuits manually via conductive copper tape and then exposing pads to determine an open or closed state.

Reconfigurable foldable objects may open the door for many creative avenues; in the video (after the break), [Yoav] demonstrates the project’s state-awareness with a simple onscreen rendering that echoes its physical counterpart.

While these circuits are fabbed from a custom solution, not FR1 or FR4, don’t let that note hold your imagination back. In fact, If you’re interested with using PCB FR4 as a structural element, check out [Voja’s] comprehensive guide on the subject.


Filed under: hardware

Tiny x86 Systems With Graphics Cards

via Hackaday » hardware

The Intel Edison is out, and that means there’s someone out there trying to get a postage-stamp sized x86 machine running all those classic mid-90s games that just won’t work with modern hardware. The Edison isn’t the only tiny single board computer with an x86 processor out there; the legends told of another, and you can connect a graphics card to this one.

This build uses the 86Duino Zero, a single board computer stuffed into an Arduino form factor with a CPU that’s just about as capable as a Pentium II or III, loaded up with 128 MB of RAM, a PCI-e bus, and USB. It’s been a while since we’ve seen the 86Duino. We first saw it way back at the beginning of 2013, and since then, barring this build, nothing else has come up.

The 86Duino Zero only has a PCI-e x1 connector, but with an x16 adapter, this tiny board can drive an old nVidia GT230. A patch to the Coreboot image and a resistor for the Reset signal to the VGA was required, but other than that, it’s not terribly difficult to run old games on something the size of an Arduino and a significantly larger graphics card.

Thanks [Rasz] for sending this one in.


Filed under: hardware

Logic Noise: Ping-pong Stereo, Mixers, and More

via Hackaday » hardware

So far on Logic Noise, we’ve built up a bunch of sound-making voices and played around with sequencing them. The few times that we’ve combined voices together, we’ve done so using the simplest possible passive mixer — a bunch of resistors. And while that can work, we’ve mostly just gotten lucky. In this session, we’ll take our system’s output a little bit more seriously and build up an active mixer and simple stereo headphone driver circuit.

For this, we’ll need some kind of amplification, and our old friend, the 4069UB, will be doing all of the heavy lifting. Honestly, this week’s circuitry is just an elaboration of the buffer amplifiers and variable overdrive circuits we looked at before. To keep things interesting we’ll explore ping-pong stereo effects, and eventually (of course) put the panning under logic-level control, which is ridiculous and mostly a pretext to introduce another useful switch IC, the 4066 quad switch.

At the very end of the article is a parts list for essentially everything we’ve done so far. If you’ve been following along and just want to make a one-time order from an electronics supply house, check it out.

klangoriumIf you’re wondering why the delay in putting out this issue of Logic Noise, it’s partly because I’ve built up a PCB that incorporates essentially everything we’ve done so far into a powerhouse of a quasi-modular Logic Noise demo — The Klangorium. The idea was to take the material from each Logic Noise column so far and build out the board that makes experimenting with each one easy.

Everything’s open and documented, and it’s essentially modular so you can feel free to take as much or as little out of the project as you’d like. Maybe you’d like to hard-wire the cymbal circuit, or maybe you’d like to swap some of the parts around. Copy ours or build your own. If you do, let us know!

OK, enough intro babble, let’s dig in.

DC Bias Voltage

We perceive compression waves in the air as sound when they reach our ears. We make these compressions by pushing and pulling a speaker cone back and forth. And to make the cone move, we need to get current to flow one way and then the other through the speaker’s magnet windings.

Why the return to fundamentals? Because it’s important to think of the voltages and currents that we want to amplify as being bi-polar, oscillating around some central voltage level. When the signal voltage is higher than neutral, current flows one way and the cone gets pushed. When the signal is lower, current flows the other way and the cone is pulled. The neutral voltage around which we’ll oscillate is called a DC bias (or level) voltage.

In the course of Logic Noise we’ve ignored DC bias voltage whenever possible, but in mixing several signals together, we can’t do that anymore, because signals only add up correctly if they’re generated with respect to the same bias voltage.

envelope_with_xor_drumWe’ve gotten away without blocking DC voltages before because our square wave and triangle wave signals were biased around VCC/2, just like an amplifier with feedback built from a 4069UB inverter is. It all worked fine until we introduced the drum and cymbals circuits, which are so strange that they don’t really even have a well-defined DC level.

Blocking DC voltage is simply done by passing the signal through a capacitor. How large? Large enough that combined with the input resistance of the next stage in the audio chain, it doesn’t cut too much into our low frequency components. In the case of the 4069UB output amplifier stage, a 1 microfarad capacitor will do nicely.

So for now, let’s assume that we first pull the DC level off of any signals that we’d like to mix together, noting that we can “get away with it” for full-swing square waves. Now it’s time to get down to the mixing.

Mixers: Passive and Active

Passive Mixers

passive_mixer.sch“Passive mixer” is a two-dollar name for combining signals together by passing them through resistors. The higher the resistor value, all other things equal, the quieter the contribution to the overall mix.

It’s the simplest way to add a few signals together, and you should play around with passive mixing anyway, just to get the feel for it. The key to making a passive mixer work is using relatively large resistors for all of the mix inputs.

The downside of the simple passive mixer is that because all of the signals combine at the junction, one signal can influence the others. Essentially, each input signal can pull the junction’s voltage higher or lower than the neutral voltage, and this can feed back out to the other “inputs” through their input resistor. Passive resistor mixers are tremendously simple, but they don’t isolate the signal sources well from each other.

Active Mixers

The trick to active mixing is adding negative feedback. Otherwise, it’s just the same circuit as the passive mixer, but it’s a whole lot better.

active_mixer.schRemember from the session on filters that the inverter acts as if it were trying to zero out any net incoming signal current that shows up on the input pin; the logic is that if the voltage on the input rises up above the switching point, the output goes low and fights it back down again through the feedback path.

How much resistance is present in the feedback determines how hard the inverter needs to work to cancel out the input signal. More feedback resistance leads to larger voltage swings on the inverter’s output, which end up as louder tones in our headphones, so the feedback path is a great place to add in a master volume control knob.

In the passive mixer example, when one input was high, it raised the voltage at the junction which could then flow “backwards” to the other connected circuits through their input resistors. In an active mixer, when one input is high the inverter cancels it out by lowering the overall mixed output voltage until the input to the inverter sits at its neutral point again. By the negative feedback mechanism, the junction of all the summing resistors is held at a constant midpoint voltage, and none of the inputs can affect each other. Only the output voltage swings around.

Here we see the need to remove the DC level from the input signals — the 4069UB will do whatever it can to hold its input at roughly VCC/2 by pushing current through the feedback loop. A 1uF capacitor before each input resistor will take care of that.

Beyond isolating the inputs from one another, we can also control the gain of an active mixer by changing the value of the feedback resistor. This gives us a simple place to insert a master volume control just by replacing the feedback resistor with a potentiometer. The convenience of a master volume knob should not be underestimated.

If you’re mixing signals, and you have electricity at your disposal, you almost always want an active mixer.

Multiple Input Volumes

The main function of a mixer is to make a bunch of sounds with different volume levels play nicely together. For instance, the square wave output of a 40106 oscillator swings fully from GND to VCC, while the (unbuffered) triangle wave coming from the input of the same oscillator is a lot quieter. The bass drum circuit is also by nature fairly quiet, and the output of the VCA that gave the cymbal its percussive envelope swing only a few volts. Aesthetically, you’ll want to tweak the volume of each different sound source.

Kookie_Studio_MixerA studio’s mixing console is dominated by an impressive array of faders that fine-tune the volumes of the individual tracks. But before we end up investing in hundreds of dollars of fancy potentiometers, let’s see how far we can get with a bunch of one-cent resistors.

Let’s think about this like an engineer for a second. We want around one volt peak-to-peak of output signal, either for line-level inputs or for headphones. That means that if we’re seeing 9V peak-to-peak square waves, we’ll want to cut them down by about a factor of ten. On the other hand, the one or two volts peak-to-peak that we get out of the low-level signals can plausibly be run through with simple unity-gain buffering. (Bear in mind, this is all before the global output volume control knob.)

If we’re using a 100k potentiometer for the variable feedback resistance (and overall volume), this means that we can use something around 1M Ohm for the high-volume digital signals to knock the amplitude down by at least a factor of ten. Using a 100k Ohm resistor for the quieter signals means that they’ll pass through with unity gain when the channel’s volume knob is turned up to maximum. Of course, you can tweak these values to fit your exact preferences by picking different resistor values.

So round up a bunch of noise-making devices and pick some input resistor values that make them sound good together. (Remembering to remove the DC level with a capacitor if necessary.) If the end result works, nobody will know that you didn’t spend hundreds or thousands on a mixing board.

Headphone Out and Line Out

We saw DC bias issues on the input side, and DC bias raises its ugly head again on the output. Our amplifier’s output is centered around VCC/2, but for headphones (or other speakers) we ideally want no current to flow at this neutral voltage level. This suggests two solutions. First is to create a constant “virtual ground” voltage level at VCC/2 and feed the headphones with our signal and the virtual ground. The other is to strip the DC bias off of the signal and connect the downstream headphones or amplifier to real ground.

Virtual Ground

virtual_gnd.schThe clever way to create a virtual ground at the 4069UB’s neutral voltage (roughly VCC/2) is to set up an inverter with negative feedback as usual but with no input signal. The output of this inverter will be constant and exactly at the inverter’s switching midpoint, so we can use this voltage as the symmetric voltage midpoint that we need for the headphone’s “ground” connection. In the circuit here, a big (100uF) capacitor keeps the VCC/2 level steady. If you’re only going to be driving headphones, or if you’ll only be running the circuit on batteries, this is the hi-fi way to go.

The virtual ground solution runs into trouble when our circuit and the amplifier share a ground connection, as can happen when both are powered by (switching) AC adapters. Then the output’s virtual ground (around VCC/2, remember) gets connected directly to actual ground, and that’s not good. The 4069UB will struggle trying to pump out VCC/2 into a short to ground, probably get hot, and certainly not work so well. The moral of the story: if you use a virtual ground voltage, don’t connect it to actual ground.

Output Capacitors

output_caps.schIf you might have this shared-ground situation, the simple solution is to include DC-blocking capacitors on the output for each of the two stereo channels. While it was easy enough to just say “1uF capacitors” on the input side, the size of output caps should probably be larger but this depends on the load resistance and the amount of current we’ll need to drive into the load.

For example, I have a pair of headphones with 32 Ohm drivers inside, which puts the cutoff frequency of a 100uF capacitor at 1/(2*pi*C*R) = 1/(2*pi*100uF*32 Ohms) = 50 Hz — a low pitch, but one I’d like to hear. Maybe 220uF would be better for low impedance headphones. On the other hand, a less-demanding pair of 600 Ohm headphones will run fine with a 100uF cap down to around 3 Hz which is way below human hearing, and more like a fast tempo than a low note. You could probably get away with 10uF in this case.

In sum, the capacitor-based solution won’t end up shorting to ground, but requires a fairly big capacitor to pass bass notes. The virtual ground solution is clever and works perfectly well with headphones or when battery powered. Shorting the virtual ground to actual ground is to be avoided.

(Discrete) Stereo Mix

Stereo audio is nothing more than a right and left channel, that is two inverters on the 4069UB instead of one, but it’s a great step forward for our synth devices. You can either send all of one instrument voice to the left or right channel, or connect a single voice to both channels through different input resistors.

stereo_output_dongle_smallIt’s nice to have a simple stereo jack breakout board at this point — something you can simply clip or plug into your circuit and then connect up to your headphones or amplifier. Ours was made by soldering a 3.5mm stereo jack to a scrap of copper-clad, traces hand-drawn with a Sharpie, and etched. We tossed on some small wire loops to serve as nice ‘scope test points, because it’s nice to see as well as hear what’s going on.

Let’s take a break from all this theory and build up two capacitor-decoupled mixer circuits.

The 4066 Quad Switch

We’ll play around with ping-pong stereo just to show off, and use the 4066 quad switch chip to do it. Just above, we plugged a given voice into either the left or right channel, or both, and then swapped them around. Now, we’ll use the 4066 switch IC to do the plugging and unplugging for us.

The 4066 quad switch is both as useful and as simple as it sounds — it’s four logic controlled single-pole, single-throw switches in a package. If you want to connect and disconnect stuff, naturally under logic control, this IC is a great solution.

4066_pinoutPreviously we’ve looked at the 4051 8-way switch and used it to select one from eight possible inputs. The limitation with the 4051 is that it’s only possible to select one from the eight inputs at a time. The 4066, on the other hand, is just a set of four switches. This lets us build setups where more than one input channel is active at a time.

Here, we’ll be using the 4066 to route two sound inputs each into one or both of our right and left outputs. Take one voice, say a quiet one like the drum or cymbal circuit, and connect it through two 100k resistors into two switches from the 4066. The other side of each switch is connected to the left and right 4069UB amplifier circuits, respectively. When only the “left” switch is active our drum sound comes out the left side, and vice-versa. When neither is active, the drum is silenced, and when both are active the drum will be centered in the stereo field, and a bit louder because you’ve got two drum signals in place of one.

We can repeat the same hookup for a second voice. Let’s assume that the second voice is a loud one, like a VCC-to-GND square wave or similar. For comparable volume level with the quieter sound, we’ll need to run this loud input through a larger resistor, say 1 MOhm. Any of these input resistors can be substituted with a potentiometer if you’d like smooth control of the volume level. And again, if any of the input signals are not centered around VCC/2, pass them through a 1uF cap on their way into this circuit and don’t forget to de-couple the output or use a virtual ground.

4066_stereo_router.sch

Now we can turn on and off the left and right channels for inputs A and B with logic-level voltages at the four inputs.

Getting Fancy

Now don’t forget our sequencing tricks from previous sessions. For instance, adding a 4017 counter to the mix would allow us to trip the different 4066 switches in order by tapping off of the counter stages. Panning two similar sounds (triangle wave and square wave in the demo below) between the two stereo channels in sequence or in pairs can make a neat, evolving sound texture out of very simple sources.

The 4066 switch makes a great general-purpose control for turning on and off a given voice. We’re using it here for panning effects, but you could also imagine hooking up four different pitch oscillators to the four switches and playing a simple tune just by selecting which notes make it through the switches at a given time.

And as you can hear in the videos, the 4066 switch works fast enough to be fed audio signals into the switch control port. Every time a jumper wire is pulled out of the board, it couples with the 50 Hz power-line frequency and makes more overtones as the input frequency and the 50 Hz switching frequency mix with each other, for a sound that’s not unlike what you’d get by running both signals through an XOR.

An on-off switch seems like a humble device, but it’s very broadly useful. So have some fun switching elements on and off in the stereo field here, but don’t think that you’ve seen the last of the 4066.

Next Session

As promised previously, next session we’ll start getting into a little more advanced Logic Noise circuits, and in particular getting into voltage control. The 4046 phase-locked loop IC has a small voltage controlled oscillator inside it (among other parts) so it’ll be our first stop. We’ll make sweeping pitches without turning knobs. Stay tuned!

PS: Parts List

A number of folks have asked for a parts list for the Logic Noise series. Here goes.

I’ve tried to keep the variety of parts used as low as possible, for instance by using 100k resistors as a standard value whenever they’ll work. All potentiometers we’ve used so far are also 100 kOhms. Capacitors have been between 10nF and 10uF, a fairly normal range, and we’ve used 100nF caps for almost all of pitch-determining applications. The point of all this is that you can buy these parts in large enough volume to hopefully get a discount.

ICs / Actives:

All of the 4000-series ICs are available under different names from different manufacturers.  Most of the chips in my drawer are from TI or Fairchild, but I’ve got a bunch from ON and NXP.  Most of the time, they’re interchangeable:
CD4xxx from TI and Fairchild Semiconductor
MC14xxx from ON Semiconductor
HEF4xxx from NXP

In buying ICs, I almost never buy one, and for most of these parts the volume discounts start at 10 pieces. Take the quantites below to be rough suggestions. You can never have too many useful parts.

  • 10x 40106 hex inverter (you’ll use these everywhere)
  • 10x 4069UB inverter, amplifier (UB is crucial)
  • 4x 4051 eight-way switch
  • 4x 4066 quad single-pole switch
  • 2x 4040 binary counter
  • 2x 4017 decimal counter
  • 2x 4015 shift register (or 4094 if you won’t use the dual-clock functionality)
  • 2x 4070 XOR
  • 2x 2N3904/2N2222/BC548 or similar NPN signal transistors

(and soon:)

  • 2x 4046 PLL
  • 2x 4007 misc gates

Passives:

  • 100x signal diodes, e.g. 1N4148.
  • 100x 100k Ohm resistors (our mainstay)
  • 100x 10k Ohm resistors (also useful)
  • A handful of odd-value resistors here and there. Get an assortment if you don’t already have one.
  • 100x 0.1uF (100nF) capacitors. Ceramic/MLCC is fine.
  • 100x 1uF capacitors. ditto
  • 10x 10nF capacitors, ditto
  • 10x 10uF capacitors, electrolytic, 16v is fine.
  • 10x 100uF capacitors, electrolytic, ditto.

Potentiometers:

  • 10x 100k Ohm linear potentiometers (this is where most of your budget will go, and honestly 20 wouldn’t be too many)
  • 1x 100k stereo / dual potentiometer for bass drum circuit

Misc:

  • Some pushbuttons, but again you’ll never have too many
  • Breadboard and a lot of breadboarding wires
  • 9V battery and clips to connect to breadboard, or power supply
  • Powered computer speakers or amp and speaker
  • 3.5mm audio jack / stereo cable for output

Filed under: Featured, hardware, misc hacks, slider

Amazingly Detailed Robotics Ground Vehicle Guide

via Hackaday » hardware

[Andrey Nechypurenko] has put together an excellent design guide describing the development of his a20 grou1nd vehicle and is open sourcing all the schematics and source code.

20150627_180534One of [Andrey]’s previous designs used a Pololu tracked chassis. But this time he designed everything from scratch. In his first post on the a20, [Andrey] describes the mechanical design of the vehicle. In particular focusing on trade-offs between different drive systems, motor types, and approaches to chassis construction. He also covers the challenges of using open source design tools (FreeCAD), and other practical challenges he faced. His thorough documentation makes an invaluable reference for future hackers.

[Andrey] was eager to take the system for a spin so he quickly hacked a motor controller and radio receiver onto the platform (checkout the video below). The a20s final brain will be a Raspberry Pi, and we look forward to more posts from [Andrey] on the software and electronic control system.



Filed under: hardware, robots hacks

Gates to FPGAs: TTL Electrical Properties

via Hackaday » hardware

On the path to exploring complex logic, let’s discuss the electrical properties that digital logic signals are comprised of. While there are many types of digital signals, here we are talking about the more common voltage based single-ended signals and not the dual-conductor based differential signals.

Simulated "Real Life"
Single-ended Logic Signal

I think of most logic as being in one of two major divisions as far as the technology used for today’s logic: Bipolar and CMOS. Bipolar is characterized by use of (non-insulated gate) transistors and most often associated with Transistor Transistor Logic (TTL) based logic levels. As CMOS technology came of age and got faster and became able to drive higher currents it began to augment or offer an alternative to bipolar logic families. This is especially true as power supply voltages dropped and the need for low power increased. We will talk more about CMOS in the next installment.

TTL rtl dtl

TTL was a result of a natural progression from the earlier Resistor Transistor Logic (RTL) and Diode Transistor Logic (DTL) technologies and the standards used by early TTL became the standard for a multitude of logic families to follow.

TTL Signal Voltage

When connecting two logic gates together there are essentially four voltages of interest: the high and low voltage that the gate’s output will produce, and the high and low voltage that the gate’s input is expecting.
Image2

TTL Output signal voltage specification:
Voltage Output High VOH 2.4V
Voltage Output Low VOL .4-.5V
TTL Input signal voltage specification:
Voltage Input High VIH 2V
Voltage Input Low VIL .8V

In short the output gate generates a slightly larger signal than required by the input gate; the difference between the output and input voltages allows for some loss of signal and/or the addition of some noise into the equation. This difference is often referred to as the noise margin.

TTL Voltage Compatibility

The TTL signal levels are usually the same, or very close for both “standard” 5 volt TTL and for low voltage 3.3 volt TTL, often referred to as LVTTL. While this would sound like they should then be able to connect together safely there is however a specification for most TTL/Bipolar logic families that states that the input signal cannot exceed the power supply by more than a few tenths of volts.  There is a  possibility that a 5 volt gate may generate more than 3.3 volts on its output, hence the problem.

3.3V TTL Feeding 5V TTL 5V TTL feeding 3.3v TTL

There are logic families such as 74AHCT that are tolerant of higher voltages than their power supply on their inputs, however this is a CMOS family and will be discussed in the next post.

Schottky Logic

Before I do a quick summary of the Bipolar/TTL families let me first explain what a “Schottky” family logic device is and where it gets its speed improvement from.

A transistor when used as a switch can go into a state known as saturation. Part of the definition of “transistor saturation” includes the state when both Base-Emitter and Base-Collector junctions are forward biased, however the property of interest here is that it is also slow to turn off as there is an excess of charge built up that has to be drained off first before the device starts to respond. A Schottky diode across the base-collector junction effectively holds the transistor right on the edge of being turned “on” and keeps excessive charge from building up. A transistor paired with a Schottky diode in a gate is often redrawn as shown above on the right.

TTL Logic Families

74 Original TTL – Some parts still around.
74LS Low Power Schottky – Good compromise speed vs power/noise and inexpensive.
74S Schottky – The sledge hammer of the early TTL, speedy but a heavy lift.
74AS Advanced Schottky – When you really to go really fast.
74ALS Advanced Low Power Schottky – Fast and low power, however not without noise considerations due to the speed in which the signal changes (slew rate).
74F Fairchild Advanced Schottky TTL – Fast and low power, a little less noisy than ALS in my experience.
74L Low Power – Not widely used.
74H High Speed – An early compromise for more speed, not widely used.

Here you can see the bipolar TTL based families. Some of the families above are also able to sink and source a lot of current which we will also compare to their CMOS counterparts in the future.

Glitch Quiz

Lastly if you remember the last post which covered Basic Logic, I asked about a risk of a glitch in the circuit shown below on the left. The glitch would arise when “D” changes state because in theory there is a time when one equation, known as a term, has stopped being true before the other term has become true. In fact the D signal itself is not needed as the two sets of terms were otherwise identical

example1-resized example2

Looking at the circuit on the right; have we gotten rid of the possibility of the glitch since the terms are no longer otherwise equal?


Filed under: Featured, hardware, slider

Watch Makezine’s interview with Massimo Banzi and Eric Pan

via Arduino Blog

Seeed_post

According to Make, the biggest news coming out of Maker Faire Shenzhen, outside the size and intensity of the event itself, was the partnership involving our team at Arduino and SeeedStudio.  Massimo Banzi during his talk presented Arduino boards using the new sister brand Genuino which will be made in China by Seeedstudio.

Dale Dougherty was in Shenzhen with them and did this video interview and article: