How do I use an op-amp in a new Bit design?

Continuing the discussion from Make: "It's New to You" Bit:

Jude, (@JackANDJude) et al:

Your video (QVC music not-with-standing) has been my inspiration for making littleBits circuits! And although I am a HUGE Bob Widlar (inventor of the IC op amp, etc.) fan, I don’t really understand the op amp (operational amplifier.) Shameful I know. :wink:

When I look under my littleBits, their backsides are lousy with opamps (they are the tiny 1.3X2.5mm dark gray rectangles with 3 solder connections on one side, and two on the other.) Opamps have something to do with almost EVERY bit!

Jude, when I look at your schematic, I find that I can also light a LED according to the voltage on the signal line without using an opamp to ‘amplify’ the signal. When I short out the inverting input to the output of the 741 (or any other opamp chip, I’ve tried about half a dozen) I get a range of outputs that echo the input voltage. Here is an experiment I did with a 741(really an NTE 941, but it’s ‘an equivalent’):

I notice that the output voltage, which is used to run whatever the bit does, is proportional to the input voltage, but the range from min to max is smaller. This works well with LEDs, where the Vf is typically smaller than littleBits’ 5 volts, but for general signal processing, why is this useful as a bit designer?

1 Like

Hi, @chris101. Thanks for starting this topic. I’ll reply with some resources, as well as my own kitchen experiment from a year ago. I hope others from our hardware crew (@StuckInSynth, @Philip_Verbeek, @matthiasmwolf, @alexpikkert, @codewizard58, @waxmoose, @Kadin907, @Jopet, @GMan ) can chime in to discuss, explain, and share their own experiments. Tag a friend! :smile:

##Wikipedia

  • Quoted from Wikipedia “Buffer Amplifier”:
    A unity gain buffer amplifier may be constructed by applying a full series negative feedback (Fig. 2) to an op-amp simply by connecting its output to its inverting input, and connecting the signal source to the non-inverting input (Fig. 3). In this configuration, the entire output voltage (β = 1 in Fig. 2) is placed contrary and in series with the input voltage. Thus the two voltages are subtracted according to Kirchhoff’s voltage law (KVL) and their difference is applied to the op-amp differential input. This connection forces the op-amp to adjust its output voltage simply equal to the input voltage (Vout follows Vin so the circuit is named op-amp voltage follower).
    .
    The importance of this circuit does not come from any change in voltage, but from the input and output impedances of the op-amp. The input impedance of the op-amp is very high (1 MΩ to 10 TΩ), meaning that the input of the op-amp does not load down the source and draws only minimal current from it. Because the output impedance of the op-amp is very low, it drives the load as if it were a perfect voltage source. Both the connections to and from the buffer are therefore bridging connections, which reduce power consumption in the source, distortion from overloading, crosstalk and other electromagnetic interference.

    ##Bitlab

##Experiments
Forrest M. Mims III
Want more experiments with op-amps? Buy Forrest Mims book, “Timer, Op Amp & Optoelectronic Circuits & Projects” from the Shack or from the man himself.

Kitchen Experiment
In the first part of this video, the rgb led and long led do not have op amps. In the second part, I have op amps in them. The pulse remains “quick and dirty” throughout - to me that means it does not follow the littleBits schematic and does not have an op amp. Sorry about the Mommy voice - I was talking to a 7 year old. :smile:

1 Like

OP Amps come in a wide range of specifications. The main LittleBits related specification is the +5 volt power supply. This is common for logic, but most OP Amps are designed more for ± 12 Volt or so. The LM324 is a quad OP Amp that can run from 5 volts.

1 Like

Most datasheets for parts have application notes which show how the part can be used. As an example see Datasheet for LM324

1 Like

Hi Jude @JackANDJude,
You are fully right about the reasons to use opamps.
(As described in your wikipedia quote).
Using opamps will not put a burden on the SIG line.
See for example the buzzer diagram:

1 Like

Thank you both @JackANDJude and @codewizard58 !!

Your explanations are clear, and (magically) coincide with the hardware that is available to me. In addition to the 941, I also have LM358M and LM324N. Later this weekend I will characterize these other two op-amps in a unity gain circuit, and discuss more my motivation for exploring them.

Alex, I will study this circuit, but right now I am baby-stepping. Having read through the bitlab guidelines, I see the reason for many of the ‘extra’ parts of the circuit.

Thanks @alexpikkert !

Hi @chris101,
Without diving into the details , in general you can say that the extra parts are always there to protect the system against failures like overvoltages and misaligning of circuits (impedance issues). The bits must work even if you click many many together. But in practice there will be limitations, for example the issue of noise from the servos. …

2 Likes

Thanks (@alexpikkert) Alex,

I went on a search for the electronic symbol in the above schematic that I didn’t recognize: the one that looks like two zeners hooking up nose-to-nose. Turns out that thing is a transient voltage suppressor. The one illustrated is a type of zener diode. As a chemist tho, I’m partial to the discharge tube type. C’mon - bzzzzt! So many cool technologies to learn!

I think more than anything, the HDK materials stress proper input and output impedance , which as @alexpikkert and @JackANDJude are saying, allows almost no signal degradation from 'bit to 'bit, no matter how many are strung along. I have been using the closest match I could find to the LV321 in schematic. Texas Instruments LMV321 is virtually identical as far as I can discern. Being able to operate well at on a single sided power supply and as you often see in these datasheets, “rail-to-rail” output. It basically ensures a unity gain across a large bandwidth(frequency) It does only come in the SOT23-5 package, but DIP adapters are easy to find and inexpensive. The TVS diode is in everything today electronic, just as cheap protection if nothing else. TI LMV321 seems a very close performance match.

1 Like

Thanks RyanI (@StuckInSynth) I will have to find that LVM321.

The closest opamp I have on hand is the nte928m, It works with a +5 supply, and has a rail-to-“almost rail” output, zero to 3.8 volts. I had noticed the littleBits all use 321s, but have not been able to get my hands on one, nor any other single-supply & rail-to-rail amplifier (do others exist?), so I’ve compromised my designs so far to use the 928. For things like lighting LEDs, it works fine, since the voltage needs to be dropped for the LEDs anyway.

But some applications require the full 5 volts however, so the 321 will be needed. For example I spec’ed the fan for my co2 sensor to run on 5 volts to give 0.2 L/min through the detector. It was difficult to go as low as 5 volts. So if I put an opamp that drops the output below 5 volts, I’ll need to find (and calibrate!) another fan (which I don’t want to do. 321 to the rescue!)

… to be continued.

Yo, @syedBits, my initial bitlab prototype does not need to be littleBits compliant, right? It just has to work? And it can be huge, compared to the size of a typical littleBit?

@chris101You can draft a project and we’ll be happy to give you feedback!

Thanks @syedBits, I have an update that is getting much closer to a prototype Bit here. I would certainly appreciate any comments, ideas and especially critiques you may have!

So you can see my application for the NTE928N op-amp in the write-up for my people counter project. It’s different than the protective use the 321 is often put to in bits. I still need to get some 321 chips to work with, but none of my usual vendors carry them.

Where would I be able to find them available, or are there other ‘rail to rail’ amplifiers that would work?

@chris101 You can substitute with other op amps for now. I had 3 modules go up for voting that all had 741 op amps in them. If a module gets the 1,000 votes, then you can redesign and test with the exact components littleBits uses.

1 Like

Thanks Jude. That is what I ended up doing with the co2 project - I used NTE928N dual op-amp (it’s the same as the LM358). I liked the 928 because it output is rail-to-“almost rail”. That means it goes to zero, but not quite to 5 volts. Since the maximum output of the sensor I have is 4 volts, this is a pretty good match.

However for applications that measure the voltage, like my bargraph, or Ryan’s number bit, it is imperative that the output follow the input all the way from 0 volts up to 5 volts. None of the op-amps I have now can do that, or maybe I am not doing something right?

Here are my experiments with the three op-amps I have.

Experimental Setup

LM324N

NTE928M (LM358 equivalent)

NTE941 (LM741 equivalent)

When I get a LV321 (or another rail-to-rail device) I will do the same test and post it back in this thread. Or if I am wrong about how a rail-to-rail device works, somebody please correct me!

the LV321 has a CMOS output stage. LM324 and 741 have transistor output stages. CMOS is basically a variable resistor so can connect output to either rail as long as current not too large. 324 has darlington pair outputs which means two Vbe drops atleast which is around 1.2 volts. Section 8.2.1.3 Application Curve in TI Datasheet for LM324 shows a similiar graph. http://www.ti.com/lit/ds/symlink/lm124-n.pdf Nice thing about datasheets is that they typically have a standard format…

Thanks Peter (@codewizard58),

As an amateur electronics technician, I am a complete noob, and your post really sent me back to school. :smiley:

I had seen that graph in the datasheet, but I did not know how to estimate the voltage drop, and the ‘Vmax’ line on the graph was not labeled, so I did the experiments to find out what the max voltage would be with the op-amps I have. Do I understand from your comment:

to mean that any CMOS op-amp (with a +5 volt/GND power supply) would be capable of +5 volt output?

Some Op amps have FET front ends for High impedence. The 321 has a CMOS output stage. I have not found a circuit diagram for it. CMOS usually uses P and N fet devices. Both LM324 and LMV321 would be considered totem pole output configurations.

Is ‘totem pole’ output the same as a push-pull amplifier, like the old, sweet-sounding, tube amplifiers? I thought that was for power - does it also affect the maximum output voltage? Because, except where I need amplification (like in the people counter circuit), littleBits uses LV321’s to follow the voltage of the input for circuit protection.