Teaching PBCore, Questions and Notes

The questions below are loosly based on those raised by particpants in the introduction to XML workshop presented at the Association of Moving Image Archivists 2009 conference in St. Louis, MO on 3 November.

In general, tangible examples are crucial to the teaching and understanding of PBCore. At present, the PBCore examples are hap-hazard and follow little logical progression. An improvement in this area would be beneficial to the adoption of PBCore. In addition, tools should be created to support new PBCore-based applications which would make distiguishing between well-formed XML, valid PBCore, and PBCore that conforms to a community of practice easier.

- Where are the XML attributes?
After an introduction to XML, which taught the partipants about the basic building blocks of XML (elements, entities, and attributes), the lack of attributes in PBCore was confusing. Rather than:

<title type="Program">Jimmy Carter</title>

PBCore requires:

<pbcoreTitle>
<title>Jimmy Carter</title>
<titleType>Program</titleType>
</pbcoreTitle>

As a developer, the additional mechanics to parse each type, each authority, or each role are annoying copy+paste jobs, but it is clear that even those new to XML develop the same expectations. With some of the recent developments from DCMI to make Dublin Core more relevant to the changing metadata landscape, it seems like PBCore has failed to evolve.

The reason, as best I can determine, is the PBCore 1.x schema was developed based on existing XML exports from a relational database where that convention is born out of the need for a semantically agnostic schema rather than proper schema creation.

- What is PBCore’s relation to Dublin Core?
PBCore is introduced as being a derivative or extension of Dublin Core, but for some shared element names, there is no obvious relationship. This should either be clarified in future development or dropped.

- What is the difference between the formatPhysical, formatMediaType, and formatGenerations?
These three instantiation-level metadata elements all describe similar problems slightly differently

* formatPhysical (or formatDigital, perhaps) describes the carrier format, which may be independent of the content on the carrier
* formatMediaType describes the content present on the carrier
* formatGenerations describes the type of content on the carrier

The PBCore value lists could be clarified to remove some of the current (seemingly) redundant information

- Why are formatPhysical and formatDigital formatted different? Or, why wouldn’t one use multiple instantiations to express the different formats for which an item is available?

The value list for formatDigital is based on the IANA MIME type registry, while the formatPhysical list is the aggregate of the source elements, which is reflected in the inconsistency of formatting. Could the formatPhysical list become more cohesive and resemble MIME types?

The relation between current instantiations is, at best, unclear and not systematic. The biggest flaw in the current approach is that it is difficult to express the provenance of an instantiation and it’s relation to the intellectual work. The current situation also breaks the 1:1 correspondance between an instantiation and a carrier/file/etc. Some major restructuring, possibly breaking backwards-compatibility is necessary to correct these issues. In the meantime, I would recommend creating a new instantiation for each instance and using the pbcoreAnnotation field to supply basic provenance information.

- The PBCore outline graph is confusing.
As is, the outline graph mixes XML elements with conceptual groupings which makes it confusing to someone new to XML or to PBCore. The graphic could be easily revised to use shaded groups to communicate the content classes, rather than tree nodes.

- The PBCore metadata dictionary picklists provide no definitions or best practices
The metadata dictionary, which may be the most important part of PBCore 1.x, is marginalized on the website. The picklists are offered only as lists and fail to provide appropriate definitions for titleType, descriptionType, etc. Without this guidance, each implementor is forced to make determinations without respect to a community of practice. Taking descriptionType as an example, guidance is needed to describe when to use the format-specific types (program, series, etc) vs the generic type labels (abstract, summary).

- The PBCore website conflates schema rules with best practices
The PBCore website recommends best practices and guidelines for usage closely integrated with the schema requirements. This placement is confusing; while the best practices are very important and are essential resources for understanding, it adds difficulty to the understanding of PBCore.

- A schema-validating XML editor complains when the XML document lacks recommended or optional fields
In particular, oXygen indicates to the user that fields like pbcoreGenre are REQUIRED for conformance to PBCore, while the website leads one to believe this is not the case. In fact, this should not be the case because genre is very specific to broadcasting/traffic needs and will likely be missing in general usage.

This leads me to believe that PBCore should examine the approach the TEI community took with regard to modulization. Proper modulization would provide implementors with a relevant set of metadata elements necessary for use, and perhaps make it easier to integrate PBCore with other metadata schemas (for example, a rights schema or technical metadata standard), leaving PBCore responsible for description and rules for aggregation.

- How do you exchange records? Or, how can I put multiple description documents in the same file?

A PBCoreDescriptionDocument, according to the PBCore schema, should have only one document per file, which is common XML practice, but unknown to those new to XML. Participants were attracted to aggregations as a way to deliver contextually complete documents containing metadata records for relations, etc. Other standards have explored aggregations independent of standards (say, Atom or OAI-PMH), which is probably a more-sound approach.

- Extensions are hard, confusing.
Yep.

Posted in Uncategorized.


15 ways to improve PBCore

This is a post describing shortcomings and potential improvements for PBCore, an XML markup for media material interchange. These suggestions try to work within the current confines of PBCore, rather than introducing radical changes (which could bring PBCore more in line with the rest of the XML and linked data worlds). Further, we recognize the strength of PBCore is in descriptive metadata, and these suggestions are primarily to strengthen those components, rather than trying to compete on technical metadata.

  1. Define what all the data dictionary elements mean — “clip”, “element”, “actuality”, “version of”, etc. These need to be defined in order for the community to better apply consistently. Other communities have come up with these already – we just need to determine which ones apply to which elements.  See for example, the European Broadcasting Union does a nice job of distributing machine-readable XML definitions for their data dictionary.
  2. Enhance semantics of relation types by creating an ontology (using rdfs or similar, like the Fedora RELS-EXT ontology) – eg. instead of simply “version of” allow “derivation of”, “copy of” “identical to” etc.
  3. PBCore only has contextual date on individual instantiations, but we want an overall date with types for created/issued/etc (e.g. the date an interview was conducted). A similar issue exists for locations. Both of these are different from pbcoreCoverage — coverage is about the content, rather than the context.
  4. Format of the content — whether it is an interview, a panel discussion, a live event, b-roll, beauty shots, etc. formatGenerations provides a piece of this puzzle, but this is ultimately descriptive metadata, which probably don’t belong in an instantiation. EBUCore provides for part of this with a controlled vocabulary for editorial formats, but it’s not granular enough (e.g. Discussion/Interview/Debate/Talkshow). Our suggestion is to explore enhancing the genre data dictionary to include archival descriptors like “interview” “b-roll”, which would solve this in a backwards-compatible way.
  5. Machine parseable rights language; we’re embedding the Open Digital Rights Language (ODRL) as a member of pbcoreRightsSummary, but it would be nice to have a common way to express rights (both rights the publisher has, and rights granted by the publisher to the user). An alternate (and perhaps desirable and necessary) solution would be to at least investigate better ways to combine PBCore with established schemas like ODRL, MODS, etc.
  6.  A way to identify the primary title and description of an asset, for use in a discovery interface. Existing solutions, like picking titles based on hierarchy, or using a separate metadata document, are flawed.
  7. A formal way to order, prioritize, and relate instantiations within a record (e.g. programs within a series, provenance/hierarchy of digital instances).
  8.  A way to label the type for a pbcoreSubject is (e.g. person, organization, place, date, etc), in addition to the existing authority reference.
  9. Authority references should be available in most (if not all) PBCore containers, which could help enable linked data applications. This could be accomplished through new xml attributes, which would be ignored by legacy applications, and perhaps better in line with other standards.
  10. Better handling of “element” level materials, for archival raw footage and similar. Finished programs are handled decently in the existing PBCore, but the data dictionaries aren’t prepared for this level.
  11. Adopt proper RDF relationships for PBCore relations.
  12. Consider adding educational levels and standards. PBCore currently addresses this tangentially with audienceLevel and audienceRating.
  13. Better way to handle metadata about people, whether by enhancing the existing structure, supporting an hCard microformat, or otherwise.
  14. Semantics to deal with thumbnails for discovery interfaces, or how to attach visual representations/facsimiles of a PBCore media instantiation. This is probably a low priority, nice to have change.
  15. Content flags, which include advisory messages about sensitive content, are regularly created for broadcast programs, but PBCore doesn’t provide a way to capture these. Perhaps the best way here is to add time-based metadata to the descriptive material (but, then, what do you base the timecode against? See next.)
  16. BONUS: Add timecode information to instantiations and relationships to identify sections of content, in order to support time-based metadata, content flags, etc.

Posted in Uncategorized.


Fall, 2009

 

Autumn Hills Orchard, Oct 10, 2009

Autumn Hills Orchard, Oct 10, 2009

 

 

 

 

Posted in Uncategorized.


Fedora + Ruote workflow system

Workflow flowchart

Here is a high-level diagram of a workflow system that combines Ruote, ActiveMQ, Fedora to create a flexible and extendable lightweight workflow system:

1 person likes this post.

Posted in Uncategorized.


Fedora, Blacklight, and Ruby on Rails

I’ve been playing with Blacklight, a catalog interface built on solr, this weekend with fairly positive results. After some initial frustration trying to figure out the demo data, I switched gears and connected Blacklight to my own solr data source, populated by a Fedora repository.

Two initial kinks here were:

  • The unique identifier field `id` is hard-coded into Blacklight, while my existing data used the field name `PID`; see CODEBASE-171
  • The unique identifiers in my repository began with a qualified namespace in the form “org.example.repository”, which broke the Ruby on Rails default routing system

My quick fix for the routing issue was to change the formatting requirements for the id field in the router, so my resource map now looks like:


  map.resources(:catalog,
    :only => [:index, :show, :update],
  […]
    :requirements => { :id => /([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|~|_|(%[0-9A-F]{2}))+/ }
  )

The regular expression is a copy of the Fedora PID regular expression, but I’ve disallowed periods in the identifier name (but they are still legal in the namespace, which I imagine is common practice).

There is still a fair bit of work hooking in object views, but the catalog + discovery portions were quickly and easily done.

Posted in Repository.


BagIt workflows

Adapted from an email I just wrote, but I think there is some good resources here, so I thought I’d share more widely.

I’ve toyed around with the BagIt standard, and have a demonstrator for a very homogenous use-case (using Ruby, Ruote, and ruby-bagit) but it doesn’t factor into our DAM -> Fedora workflow yet. From my limited implementation, it would certainly be nice to see DAMS beginning to adopt it , if a few issues can be addressed, either by the standard or by convention.

The biggest issue with the BagIt standard at this point is that it is exclusively a framework for transferring a collection of files, but doesn’t yet provide a way to create complex/compound objects out of the contents. The Library of Congress has been using BagIt for their Chronicaling America newspaper project ( tech notes) , but the reconstruction of objects and relationships has been implicit (based on a file naming convention) or manually done. This probably works in the simplest cases, where each BagIt item can be mapped into a compound object with either limited or embedded metadata, but I’m not sure if this could be easily applied to the problem of creating and relating multiple (heterogeneous) complex objects. Ben O’Steen at Oxford has proposed an extension to add an RDF manifest to the BagIt package to provide this sort of relationships , but I haven’t pursued that further. There has also been some recent development around combining BagIt and OAI-ORE, which might be a better way of approaching the problem using existing standards.

A further wrinkle, at our end, is that our Fedora repository is holding compressed access copies of the content, which cannot be stored in the DAM (because the DAM content model fails to account for proxy objects or similar). I imagine this is going to be a problem with almost all large datastreams, and something infrastructure will have to adapt to.

Posted in Uncategorized.


Solr Data Input Handler

This week, I had the opportunity to write a data import handler (DIH) for the Solr search server, which elegantly mapped a mySQL database to the Solr schema. Before this, I had been writing small scripts with an XML output, because the scope of the underlying data wasn’t neatly contained in a single document or database. This is a new feature in Solr 1.3, and it really seems to make integrating search almost trivial, to the point where anyone who can write an SQL query can begin replacing the in-built fulltext engines with a Solr service, offering more flexibility, efficient faceting, and a document-centric view appropriate for search.

The basic skeleton looked something like this:

<dataConfig>
        <dataSource driver="com.mysql.jdbc.Driver" batchSize="-1" url="jdbc:mysql://localhost:3306/cms?zeroDateTimeBehavior=convertToNull" user="root" />
<document name="doc">
        <entity transformer="RegexTransformer" name="page" query="SELECT ... FROM ... JOIN ... JOIN ... JOIN ..">
<field column="title" name="dc.title" />
[...]
<field column="names" splitBy="," name="dc.contributor" />
        </entity>
    </document>
</dataConfig>

A couple things to note:
In the dataSource configuration, I’ve set the batchSize=”-1″, which lowers the number of rows kept in memory and prevents solr (and the servlet engine) from running out of memory

Second, in the jdbc configuration, I’m using zeroDateTimeBehavior=convertToNull, which is a very easy way of dealing with those pesky “0000-00-00 00:00:00″ dates that normally come out of the database, and allows solr to gracefully skip that field.

In some multivalued field declarations (like the names -> dc.contributor), I’m using the regex transformer, and its helper splitBy, to reverse a mySQL GROUP_CONCAT() field, which at least saves a query (and forces more of the data marshaling logic into the SQL query, leaving the Solr mapping fairly straightforward).

The Solr transformers look incredibly powerful and almost certainly worth pursuing further in the future. One update I eagerly await is the integration of the DIH with Solr Cell, a text+metadata extraction service, under [#SOLR-1358], which would let you merge previously extracted (or entered) metadata with the fulltext of documents. When this feature is added, I think I can pretty much give up on my transforming scripts and switch to the DIH for all purposes.

Posted in Uncategorized.


Improved Poster Generator

Partly due to a lack of complete functionality with the Obama Poster Generator, I decided to turn it into a much more generic and useful script for taking an image, smoothing/filtering it, and then changing the palette of the result. Most often this is used to generate things like President Obama’s campaign posters, any t-shirt graphic that has 2 to 4 colors and very smooth lines–at least, the ones based on existing images of people and things, and I think it could be used, in principle, to create the effect of some of the cel-shaded video games, in the style of Jet Grind Radio, or even to create an animation style similar to that of A Scanner Darkly or the Charles Schwab commercials. Why? A normal image contains 8 bits of data per color channel, if it is a truecolor image. If one were to take a picture of a “solid” color, then the lower order bits will be integral in the “texture” of the image, created by variations in the color strength. However, if we chop off these lower order bits and then repaint the whole image in a specific subset of the 24-bit truecolor image, but still using 24-bits to get very precise colors, the textures of things disappear, and the only variations that are visible correspond mostly to edges of things and differences in lighting. I’ve included an example of what our President would look like as a video game character, for effect, but the results aren’t the best because it would take a very long time to determine the correct palette for the effect that we want, and I simply generated a uniform palette that discards the lowest bits when converting, but the similarity is still apparent.

In practice, generating high quality animated-style images based on real photographs will require hours of tweaking the palette’s colors, and while I was able to get away with only a few bits of resolution (I used 2 bits), to have something that looks high quality or has a large number of colors, a larger resolution will be necessary. Interestingly enough, for resolutions above 4 bits, the image looks basically the same, but weird in subtle ways that humans have trouble pin pointing. A resolution like this with a very restricted palette (say, the 3 bit one, properly expanded to provide information for all of the combinations) could provide very fine-grained control of the animated styled.

Without further ado, a re-post of the original picture, a much more accurate campaign-style poster, and a video game/commercial version of a portrait of president Obama, along with the palette files that I used for each of them:

Original portrait of President Obama

Original portrait of President Obama

A Campaign Poster-style Version of the original portrait

A Campaign Poster-style Version of the original portrait

A more cartoony, Jet Grind Radio-style version of the Portrait

A more cartoony, Jet Grind Radio-style version of the Portrait

Palettes:
For the campaign poster (this will need modification on a per-image basis, but the colors should be the same): click here.
For the cartoon-y image (I would recommend making one that is more appropriate for how you want the image to be transformed, this was just a rough starting point): click here.

And, the code. My first contribution to the open source movement, incidentally.

% *************************************************************************
% Image Poster Generator, v2.0
% This filters, decreases the resolution, and then repaints and image with
% values from a specified palette.
%
%   Copyright (C) 2009 Greg Malysa
% *************************************************************************
%    This program is free software: you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation, either version 3 of the License, or
%    (at your option) any later version.
%
%    This program is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.
%
%    You should have received a copy of the GNU General Public License
%    along with this program.  If not, see < http://www.gnu.org/licenses/ >.
% *************************************************************************

% Specify the names of the palette image, the input, and the output
paletteName = 'palette2bit.png';
inputName = 'obama.jpg';
outputName = 'obama_filt_out.png';
outputType = 'png';

% The darken factor divides all of the pixel values in the image by the
% amount given here in order to change the brightness or darkness of the
% image as a whole.
darken = 1.35;

% Amount of smoothing to apply, between 1 and any integer. Large values
% will make things become far too smooth though, so be careful. 1 does no
% smoothing.
smooth = 4;

% The new target resolution (in bits), which also determines the palette
% size. This must be >= 1 or nothing particularly interesting happens.
% Higher resolutions require larger palettes and allow for more colors.
% With resolution = 8, nothing happens, as all of these images are 8-bits
% per channel anyway (24-bit truecolor images).
targetBits = 2;
paletteSize = 2^targetBits;
divideFactor = 256 / paletteSize;

% The palette itself is a column of bits number of bits by bits blocks,
% where the block number indicates the red channel index, the x offset
% within a block indicates the green channel index, and the y offset
% indicates the blue channel index. For some reason, MATLAB specifies y
% first and x second when accessing an image.
paletteBase = cast(imread(paletteName), 'uint8');
palette = zeros([paletteSize paletteSize paletteSize 3]);
for block = 1:paletteSize
    blockBase = (block-1)*paletteSize;
    for green = 1:paletteSize   %x
        for blue = 1:paletteSize    %y
            palette(block, green, blue, :) = paletteBase(blue, blockBase+green, :);
        end
    end
end

% Format is columns by lines by channels (y, x, 3)
image = imread(inputName)/darken;

% Create a filter coefficient matrix based on the order of smoothness
% requested (this is like a 2-D averager, which is a form of low-pass
% filter). This can be changed to create an edge-detector, for instance.
B = ones(smooth)/(smooth*smooth);

% Apply to each channel separately
imagenew(:,:,1) = filter2(B, image(:,:,1));
imagenew(:,:,2) = filter2(B, image(:,:,2));
imagenew(:,:,3) = filter2(B, image(:,:,3));

% Decrease the resolution based on the bit number requested above, dealing
% with some inconsistencies between MATLAB's casting and traditional
% conventions, and MATLAB's array access mechanisms.
imagenew = cast(imagenew, 'double');
image = cast(floor(imagenew/divideFactor), 'uint8')+1;

% Channel 1 is red, channel 2 is green, and channel 3 is blue
for n = 1:length(image(:,1,1))
    for k = 1:length(image(1,:,1))
        image(n, k, :) = palette(image(n, k, 1), image(n, k, 2), image(n, k, 3), :);
    end
end

% Write out the final image
imwrite(cast(image, 'uint8'), outputName, outputType);

Posted in Code, Computer Science.

Tagged with .


Obama Poster Generator

While playing with the idea of hiding images-within-images (aka steganography), I realized that by applying the right thresholds in The Gimp to the 4-bit downscaled version of the image I was trying to hide, it looked sort of like the posters that President Obama used during his campaign, except without the color. Inspired, I hacked together a MATLAB script that will do a reasonable job of converting an image from normal, full color into an image consisting of a peachy color, dark navy, light blue, and red, in a style similar to the campaign posters.

% This Obama-izes an image, applying the basic four-ish color pattern
% utilized in Obama's campaign posters.

% Format is lines by columns by channels (x, y, 3)
image = imread('guitar.jpg', 'jpg');

% Downsample into five sections based on intensity, each 64 values wide
image = cast((image+1)/64, 'uint8');

% Channel 1 is red, channel 2 is green, and channel 3 is blue
for n = 1:length(image(:,1,1))
    for k = 1:length(image(1,:,1))
        if (image(n, k, 1) > 1 && image(n, k, 3) > 1)
            image(n, k, 1) = 252;
            image(n, k, 2) = 228;
            image(n, k, 3) = 166;
        elseif (image(n, k, 1) > image(n, k, 3))
            image(n, k, 1) = 217;
            image(n, k, 2) = 26;
            image(n, k, 3) = 33;
        elseif (image(n, k, 3) >= image(n, k, 1) && image(n, k, 3) > 0)
            image(n, k, 1) = 112;
            image(n, k, 2) = 151;
            image(n, k, 3) = 158;
        else
            image(n, k, 1) = 0;
            image(n, k, 2) = 52;
            image(n, k, 3) = 76;
        end
    end
end

imwrite(image, 'guitar_out.png', 'png');

The results were pretty good for a few minutes of hacking:

I had a lot of trouble finding a “universal” set of conversion rules, instead mostly looking at the output of each image and tweaking the thresholds in each test and whether to use > or >= for the last check before falling back to the dark navy color. A more sophisticated approach to the conversion process would probably yield far better results and require less tweaking to work on each image, but I was surprised by how simple generating a reasonable approximation was.

A more versatile version of this code can be found at the Improved Poster Generator.

Note: I found three of these pictures on the Internet. They are not mine and I make no claim to them. The resulting transformed images (all four) may belong to me; if so, you are free to reproduce them, but I ask that you mention where you found them.

Posted in Computer Science.

Tagged with .


Analog Multiplexer (Update–9/25/09)

After posting about digital multiplexers and decoders, I started thinking about analog multiplexers, which I have not used before, but which can be quite useful, for instance in bypassing an effects pedal on a guitar. In principle, because a CMOS transistor can function as a connected/disconnected switch for digital circuits, I figured that it would work similarly for analog circuits, and threw together this 2:1 analog multiplexer:

Analog 2:1 Multiplexer Circuit

V1 and V2 combine to form a single 0-5 V supply, I simply broke the two apart to demonstrate how the signal biasing could work. V3 and V6 represent the output pins on a microcontroller that are used to select between inputs—they must be able to source a few mA when driven high (this shouldn’t be a problem for practically all microcontrollers, on real I/O pins). A simple logic circuit (i.e. decoder) could be used to take an encoded representation of the desired signal and drive these inputs appropriately. V4 and V5 are the input signals, referenced to any other signal, and they are properly biased (a good practice, even if they are supposedly referenced correctly) to ensure they are within the operating region of the rest of the circuit.

I chose 0-5 V rails to make the mux usable on any board that already had similar supplies for, say, a PIC microcontroller. Not using a -5 V rail simplifies the power requirements for simple circuits, but it does require that the signal be biased properly, in order to avoid clipping as it passes through the output buffer. The resistors and capacitors on the biasing circuit were selected to provide a cutoff frequency of ~0.3 Hz on the implicit high-pass filter, in order to avoid attenuating the low frequencies in audio applications and attempt to provide a relatively flat passband in the entire bandwidth of the NMOS transistors, which was approximately 1 MHz in the SPICE simulation I used. For higher frequency usage only, the values of both can be adjusted in order to make the circuit components easier to find, but care must be taken to limit the current that the input will be required to source/sink. If a piezoelectric transducer is used, its current capabilities are rather limited, so high resistances are preferable, as well as low capacitances (1 uF is large in this case, I think). A buffer stage could be introduced on the front end, but it would again require proper biasing to ensure that the signal is not clipped, which is highly likely using only a single +5 V supply.

This circuit is provided for academic/hobbyist purposes. If you really need to use an analog multiplexer, I suggest you sample or purchase one from Analog Devices because it will be more robust and have fewer caveats than this circuit does (for instance, if you drive both inputs high on this circuit, it will gladly add the two signals together, which might be useful instead of using a summing amplifier). Comments and other feedback are welcome, as I’m by no means good at analog design, and I only did SPICE simulations for this circuit—I haven’t had a chance to build it and try it in the real world yet.

[UPDATE]
I was planning on building this circuit recently, both for a separate project and to test it out, when some shopping on Digi-Key led me to find that it is very difficult to purchase MOSFETs with substrate connections. MOSFETS are four terminal devices, but most common applications do not use them this way. Digi-Key has over 16,000 differently listed MOSFETS and no easy way to search for a four-terminal one (many come in larger packages with multiple pins connected to the drain and source) so I abandoned it and spent some time working on an alternative circuit. A combination of MOSFETs and BJTs should be sufficient to emulate the four-terminal device, but it imposes additional restrictions on the signals that can be passed through for a given power supply. The threshold voltages of BJTs gates require that there be a (device specific) gap between the maximum value of the signal and the power rails, but most operational amplifiers have similar restrictions (although not as large in magnitude). To that end, this is the modified circuit that gives the same results in simulation. I’ve also added a pull-down resistor (which can be tied to any of your negative rail 0V, the positive rail +5V, or a constant voltage available) to deal with the input/offset current of the op amp. This resistor should ideally be as big as possible (5 MOhm like the others is fine), but it will, in theory, attenuate all frequencies equally, which means that something as low as 10 or 100 kOhm is acceptable, depending on how wide the voltage margins your op amp requires are and how much current your signal transducers can source.

2:1 Analog Multiplexer

Posted in Hardware.

Tagged with , .