Selasa, 25 Februari 2014

Bristol Digest, Vol 539, Issue 7

Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk

You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."


Today's Topics:

1. Re: Opamp - somewhat off topic (david.smith@ds-electronics.co.uk)
2. Re: Slony probs (Martin Moore)
3. Re: Slony probs (Colin M. Strickland)
4. Re: Opamp - somewhat off topic (Allen Coates)
5. Re: Opamp - somewhat off topic (Dave SMITH)


----------------------------------------------------------------------

Message: 1
Date: Mon, 24 Feb 2014 21:35:08 +0000
From: david.smith@ds-electronics.co.uk
To: bristol@mailman.lug.org.uk
Subject: Re: [bristol] Opamp - somewhat off topic
Message-ID:
<686d1d7979c391b80da700cf6105bb259390a523@webmail.eclipse.net.uk>
Content-Type: text/plain; charset="utf-8"

?

----- Original Message -----
From: "Andrew"
Thanks for that.

Is there such a thing as 4 or 5 of these on a board, or even 10? We
are thinking of setting it up to do several in parallel.

Well, if you'd told me that.... :)

In that case, I'd look at something like the MCP6004-I/P - four on a
chip.? Whether you use single, dual or quad-device ICs, you won't
get them "on a board" - you'll need to build your own board, but if
you don't want to go to the lengths of doing a PCB design, you can
just use Veroboard (or similar) for something this simple, or maybe
your Pi extension board has a little prototyping area?

You can get 8 devices on a single chip, but then you're starting to
get into packages that don't play well with Veroboard/breadboard so
you would have to design a "proper" PCB or do a really nasty hack.

Also, look at buying them from RS rather than eBay - eBay price is
?2.66 each, RS price is 31p+VAT with an order multiple of 10 - so,
for ?3.72 you'll get 10 quad-device chips, which is cheaper than two
from eBay.? I guess it depends on how easy it is for you to get to
their trade counter in St Philips.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20140224/a651067a/attachment-0001.html>

------------------------------

Message: 2
Date: Mon, 24 Feb 2014 22:06:28 -0000
From: "Martin Moore" <martinm@it-helps.co.uk>
To: "'Bristol and Bath Linux User Group'" <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Slony probs
Message-ID:
<!&!AAAAAAAAAAAYAAAAAAAAAFLxZtQqo65Oo+1jhlUB9DvCgAAAEAAAAI/62qywx4dHuYnJUqWliWYBAAAAAA==@it-helps.co.uk>

Content-Type: text/plain; charset="us-ascii"

Thanks Colin - Slony was removed from the dump (I think!) so should be OK
there, and the server is a clean install. I did look at the slony functions
but still can't see what the problem is - and I don't want to start playing
around in that area !!

I'll check out skytools londiste - I only want some tables replicated, so
can't use the built-in stuff.


Martin

-----Original Message-----
From: bristol-bounces@mailman.lug.org.uk
[mailto:bristol-bounces@mailman.lug.org.uk] On Behalf Of Colin M. Strickland
Sent: 24 February 2014 21:33
To: Martin Moore; Bristol and Bath Linux User Group
Subject: Re: [bristol] Slony probs

On 24 Feb 2014, at 15:17, Martin Moore wrote:

> I've restored a postgres 8.4 database onto a 9.3 installation (on
> Debian Jessie).
>
> Running a script (as used in 8.4 so may need to be changed, but can't
> find
> anything) which contains the following
>
>

Hmm, slony can be brittle. All of your errors seem to be thrown from inside
the slony stored procedures where attempts to cast ints to text.
I'm afraid I haven't worked with it for a couple of years now, and my memory
is rusty :-/

A couple of thoughts. There was a change in implicit casting behaviour
between 8.2 and 8.3 after which all sorts of implied casts to text types
stopped working without explicit type casting. Is it possible you've got
some pre 8.3 stored procedure code installed into the 9.3 database somehow?

How did the slony code get installed ? I'm not sure you can reliably deploy
the slony server components into a database via a pg_dump, might that have
happened. I think you might need to install slony separately from your
database restore, load your dataset and then rebuild the slony replication
sets and resync your slaves from scratch.

If you don't absolutely have to go with slony for userspace replication, I'd
suggest looking into skytools londiste as a fairly drop-in replacement. It's
a little bit more robust than slony, works on basically the same principles,
and the python user tools are nice and simple to use IMO. (You might also be
able to use 9.3 streaming replication instead of trigger-based replication,
if your replication requirement is to slave your entire dataset)

Sorry if I'm failing to address your actual question usefully, I don't have
a slony installation to hand to inspect. If I did, I'd be tempted to examine
the source of those sprocs and hand-reproduce the error by calling them
directly with similar arguments.


Regards,
Colin M. Strickland, cms, 'that guy'.

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4335 / Virus Database: 3705/7092 - Release Date: 02/14/14
Internal Virus Database is out of date.




------------------------------

Message: 3
Date: Mon, 24 Feb 2014 22:25:55 +0000
From: "Colin M. Strickland" <cms@beatworm.co.uk>
To: "Martin Moore" <martinm@it-helps.co.uk>, "Bristol and Bath Linux
User Group" <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Slony probs
Message-ID: <42CDB4DB-43D4-42FA-AF92-4A4C3607588C@beatworm.co.uk>
Content-Type: text/plain; format=flowed

On 24 Feb 2014, at 22:06, Martin Moore wrote:

> I'll check out skytools londiste - I only want some tables replicated,
> so
> can't use the built-in stuff.

Londiste is ideal for this use, (as is slony of course). It's more
lightweight, and I found it more easy to troubleshoot. I replaced the
slave db servers at last.fm replicating a couple of 100GB of catalogue
metadata via slony-1 on pg 8.3 with londiste and pg 9.1 a year or so
ago, and found the migration process fairly painless.

The most significant difference was that the londiste slaves don't
enforce any kind of read-only state on the replica tables, so I had to
manage that with user access control (I used pgbouncer to map any
incoming tcp/ip database connection down to a user with no write access)

Rather than loading scripts into the slightly cranky slonik command
parser, you just interact with the replication agent using command line
tools from the shell - "londiste subscriber add tablename" etc.

--
Regards,
Colin M. Strickland, cms, 'that guy'.



------------------------------

Message: 4
Date: Tue, 25 Feb 2014 00:35:10 +0000
From: Allen Coates <linux@cidercounty.org.uk>
To: andrew@1dtv.com, Bristol and Bath Linux User Group
<bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Opamp - somewhat off topic
Message-ID: <530BE53E.70404@cidercounty.org.uk>
Content-Type: text/plain; charset=ISO-8859-1

The open-loop gain of an opamp is (theoretically) infinite - in practice
tens of thousands. You set the stage gain using feedback resistors.

If you amplify an analogue signal 400 times, I have a feeling you would
encounter problems with input noise.

It may be better to use the opamp as a comparator, where the output is
logic zero if the input is below an (adjustable) threshold level, and
logic one if it is above. Two such comparators would give you a clear
Low/Acceptable/High indication.

Hope this helps

Allen C




Andrew wrote:
> Greetings luggers
>
> Still progressing slowly on the project to get a raspberry pi working to
> fill ink cartridges.
>
> We are using a load cell to measure the amount of ink. It gives an
> output of about 5 mV. As stated by a helper "The input range on the
> Custard Pi 3 is from 0 to 2.5V. So to get the best accuracy from this
> load cell, we need an amplification of around 400 using an opamp."
>
> Does anyone know if I can get this opamp off the shelf, or whether it
> would have to be custom made.
>
> Thanks
>
> Andrew
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol




------------------------------

Message: 5
Date: Tue, 25 Feb 2014 11:35:41 +0100
From: Dave SMITH <Dave.Smith@st.com>
To: <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Opamp - somewhat off topic
Message-ID: <530C71FD.2090303@st.com>
Content-Type: text/plain; charset="ISO-8859-1"

On 25/02/2014 01:35, Allen Coates wrote:
> The open-loop gain of an opamp is (theoretically) infinite - in practice
> tens of thousands. You set the stage gain using feedback resistors.
>
> If you amplify an analogue signal 400 times, I have a feeling you would
> encounter problems with input noise.
>
> It may be better to use the opamp as a comparator, where the output is
> logic zero if the input is below an (adjustable) threshold level, and
> logic one if it is above. Two such comparators would give you a clear
> Low/Acceptable/High indication.

Good point, and you could then feed the result into a digital IO rather
than needing an analogue input.

I'm not sure I'd do a comparator at such low voltages, though - after
all, the obvious way to generate the threshold voltage would be through
a resistive voltage divider, but even if you use resistors with 1%
tolerance (about the limit of what is widely available), you're still
going to end up with a threshold that could vary by as much as 1000%.

To do the design "right", I think I'd have a first OpAmp stage with a
gain of somewhere around 20 (giving you a voltage swing of about 100
mV), and then feed that into a comparator.

To make things even better, you could even use a voltage reference IC as
the input to the voltage divider, so that you get a nice stable supply
that's not wandering around as the Pi power consumption changes.
Reference ICs generating a 1.2 V output are cheap (about 30p from RS)
and readily available, and you'd only need one across all your channels.




------------------------------

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 539, Issue 7
***************************************

Tidak ada komentar:

Posting Komentar