a Raspberry Pi camera after a season outdoors in the British weather

The old pig camera is due for a rebuild. I went with the Pice outdoor case for the new one, but  it’s interesting to see how the old one stood up to the weather. It was still operating when I decommissioned it because I needed to scavenge some of the network parts for the new one. In particular I now use a central WiFi/Mobile node to cover the whole farm, and use Wifi to upload the pictures for each camera via that node.

The original one ran the Mifi node and the Pi all the time, which was hard on battery power. Hence the rebuild, but if the case held up over a season I may as well use it rather than splash out for a new Pice…. The original case was larger than it needed to be, but I can now use this space to put the light sensor and 12V to 5V DC-DC converter inside it.

So how did it stand up to the ravages of the elements. When it was new it looked like this

best not let the IEE see that else they'll revoke C.Eng for disgraceful and outrageous bodgery of the first order ;)

and the innards looked like this

the Pi gets big fast when you hang enough onto it to make it useful
the Pi gets big fast when you hang enough onto it to make it useful

So from the outside it now looks like this

Raspberry Pi camera after a year in the open
Raspberry Pi camera after a season in the open. The messy carving of the rain-shield started out that way

Which isn’t bad. It vindicates one of the things i did, which was to use plastic screws for mounting. Unfortunately the camera needed M2 screws which were steel, and these rusted. The sun bleached the tape, but the box itself stood up to the light well.

The cheap Chinese DIN socket is starting to rust

1410_din_DSCN2527

I had fitted this on the underneath of the case. There are two philosophies when it comes to trying to run electronics outside. One is to go IP65 all the way and keep water out, which means waterproof enclosures, Dri-Plugs for power etc – you’re looking at about £20 to get the power through the case and maybe another £20 for the case itself. Farm hacks don’t really need that sort of ruggedness, which brings me ot the other philosophy

Accept water is going to get in. Mount all connectors on the bottom so it can drain out. I actually picked this up from the PICE guys – they mount the raspberry Pi on the lid of the case, so water could be standing on the bottom half and it would be okay.

No evidence of water, no creepy-crawlies - great
No evidence of water, no creepy-crawlies – great

As it was no water seems to have penetrated, no creepy-crawlies seem to have got in. The latter are a pain with electronics outside- they seem to be attracted to the heat, or maybe the power itself. It certainly helps to lift the device into the air, or simply put it on a stick a metre or so high, compared with ground mounting. But this looks clean, there’s a little bit of evidence ingress on the seam, and the PVC tape degraded in the UV so this may be worth some thought.  I will re-use this box, mounting the microcontroller timer and the light sensor on a board set into the rails, so I don’t have to drill the box for mounting.

However, one thing has been impaired, and that is the lens of the camera, which gives a hazy effect – it was clear and not foggy when this picture was taken

Flare on the camera lens after a year in the open
Flare on the camera lens after a season in the open

Normally a CCTV camera is behind a piece of glass to keep the elements out and now i know why. Cleaning the lens with IPA didn’t help. I am tempted to glue a piece of microscope coverslide over the tiny lens in future this would have the optical quality and would be cleanable/replaceable. Continue reading “a Raspberry Pi camera after a season outdoors in the British weather”

Fixing a Maplin EAP450 Car amplifier

This amplifier is used for parties at The Oak Tree where we have no power on site – a 12V leisure battery is good for about 7 hours. I’d noticed one of the pots getting scratchy so one of the four channels was low. This is a four-channel amplifier, and I use it bridged 2×2 as my speakers are 8 ohm. The amp works but I’m losing power, experience tells me this sort of fault doesn’t fix itself.

The go-to site for car audio tech is Basic Car Audio Electronics so if you’ve blown your amplifier and are looking to fix it then that’s a good place to start. The tl;dr version is it’s probably not worth your while, get a new one. The trouble with blowing the amp is not only do you have to find and change the blown part, but also establish the rest of the parts are okay. I’m just fixing a passive part in an otherwise normally functioning amplifier. It’s probably still not worth my time but it’s criminal to junk the amp for the sake of £2 worth of parts.

I did get a meter on one section of the pot and established that it is intermittent and ratty. So I didn’t need the schematic. It’s nice to have, though, but knowing Maplin I figure it’s probably not worth calling them up and asking them to send a PDF or a dead-tree version through the post. I’m still sore about the way they washed their hands of a portable TV that failed after 15 months. On investigation it has clearly not worked right and been incompetently hand-repaired at the factory leading to the screen failure.

Inspection of the circuit board and a bit of Googling turns up some leads. I observe the circuit board is marked APA-450 Rev 2 and Googling APA-450 tells me that Clarion used to make one of these, and the control panel looks suspiciously similar. So now I know what a Maplin EAP450 is – presumably they bought the rights to rebadge this discontinued Clarion amp in a different housing. Or perhaps there’s some noname Chinese company in Shenzhen hawking their production line to whoever will pay 🙂

I got the service manual and schematic from those nice guys at Elektrotanya and established that the part numbers tally with the board.

plan A – changing the pot

Ebay was my friend in sourcing the pot, as it happens also from China. One of the great things about Ebay is the variety – it’s important to get the length of the splined shaft right so it doesn’t stick out too far and this is a slightly oddball length. A 6mm spline shaft is close enough.

Pots showing diferent pitch
Pots showing different pitch

 

I got that right, but I was caught out by the pitch of the pins being smaller than normal. I’d already dismantled the amp before I spotted that. D’oh.

Take a photo before you dismantle the amp

You can’t have too many decent photos of the gear before you take it apart . Once I had taken out the screws I got to see the PCB – it’s clearly not the finest reflow job I’ve ever seen

Maplin EAP-450 circuit board
Maplin EAP-450 circuit board

 

plan B – fix the original pot

Time for Plan B – dismantle the offending wafer of the pot.

 

Closeup of wafer
Closeup of wafer

By carefully bending the tabs I could get the wafer out and look for the problem – there’s a faint patch of shiny something not right at the top left of this, which I cleaned off with some isopropyl alcohol. Plan C was going to be replace this pot and the other one with two fixed resistors per wafer. There’s no real need for this sort of control on a power amp. Ideally I want to line the amp up for full-scale output at +4dBu – there’s far too much gain and it needs pulling well back. the line level input sensitivity is specified as 200mV to 6V

final test – success

 

output at full scale
output at full scale

This is the amplifier at just over 40V p-p showing the two bridge amplifier outputs which are out of phase (I am too cheap to get the probes to set the read out right, so it shows 1/10 of the real sensitivity)

clipping simultaneously
clipping simultaneously

 

and the final trace shows both bridged sides going into clipping at the same time.

Apple crusher crunching sound

There’s a satisfying noise to be had from this apple crusher – the first stages of making cider

The crunch has some of the biting into an apple sound. The ripping apart sound is ever so slightly ghoulish, one for Halloween…

After this was recorded a bunch of people joined in with their kids. Kids aren’t usually conducive to easy recording, though they did a grand job turning the handle, so I switched to using a stereo contact mic on the mechanism. My contact mic has a strong magnet on it so it’ easy to get noises from ferrous metal objects.

I had to EQ out the 3kHz resonance of the mic, but the result is less satisfying than the regular recording to my ears. Continue reading “Apple crusher crunching sound”

Bird recording in the field with a GPS and audio recorder

After a long break, I looked at getting back to using Birdtrack. When I used it before, I used an audio recorder and a GPS, taking a waypoint with the GPS and identifying the bird and waypoint in the audio note. The advantage of this is I could automate taking in the position data, and just transcribe the bird and count.The obvious way to do that now is to use something like the Birdtrack app. Trouble is this wouldn’t run on my device. That wasn’t the main problem, to be honest, it’s easy enough to solve by chasing the upgrade cycle. There’s a deeper problem – it’s not what I want to get out into the field to do, to spend more time peering at an illuminated screen. Not only would Eckhart Tolle disapprove, but you also have to take your eye off the birds. Don’t get me wrong, the BTO have probably done a great job with the app, and if that’s how you want to list birds that’s great, each to their own. It’s just doesn’t do that much for me. But it’s a continuum – after all, what is the real point of recording what you see anyway, particularly as I’m not particularly good with ID so have to pass on a lot?easygpsSurveying an area repeatedly does mean I get to build up a spatial map of territories and get to know some of the birds by the foibles of their song. Now this is made easier I will see if a picture of territories does build up over time in the breeding season. GPS audio mapping isn’t a new idea, I came across it from the OpenMap community, who had largely solved this problem with audio mapping. They simply leave the recorder on capturing a stream of consciousness, because they want to capture data about the whole environment, that’s what a map is. It makes the synchornisation problem easier, as they set a datum at the start of the run, doing the same job as the clapperboard in shooting a movie. The GPS track is a log of where you go, with the sections individually timestamped, which I hadn’t realised. So start the recording at a datum point, and you know that the audio runs in sychronism with the GPS. Modern digital field recorders are crystal controlled to about 100ppm – about 4 seconds off in 10 hours.Now I don’t really want to spend as much time writing up a trip as doing it, so I took a leaf from their book and used a Perl script to parse the GPX data tracklog, find the nearest section to the audio clip timestamp and create a waypoint there, with a link to the audio file in the same directory. Rather than making one massive recording, I can simply make short audio notes when I see the bird, and the Perl script will tally the record time and sort out where I am. It’s easier to find a record and there is much less audio data to process.

Due to the vagaries of real-life devices you have to be able to put in an offset to take out summertime and any slight differences, but an error of 1 minute at walking speed isn’t so bad for bird logging. At a steady 3mph it’s about 80m uncertainty, but in practice you tend to slow down when observing birds, improving the accuracy. File timestamps do go down to the second, but keeping the clocks within a minute is a big ask. The GPS timestamp is always very accurate because it is set to an atomic clock, so it’s down to setting the recorder properly. Or identifying the skew properly at the combining stage.

As an added bonus, this can work on my field recordings too, I can just save the GPX file and I know where they were made too. Using something like GPS Visualiser I can see where everything is on a Google map.

For bird logs, I need to open the audio and edit the waypoint names to the BTO two letter short codes of the sightings, comma separated if there are several at one point. A second run through another script expands these into the long names and creates an Excel file suitable for uploading to Birdtrack.

Echoes of South Kensington Station

South Kensington Tube station is the gateway to some of London’s famous museums – the Natural History museum, the Victoria and Albert and the Science Museum. To save people getting wet or wrangling the traffic along Exhibition Road, there is a long pedestrian walkway from the station to the museums.

It has a fabulous acoustic, one that’s enjoyed by small children, buskers and field recordists alike! I went to university at Imperial College and used this tunnel often. Even now, the soundmark takes me back to student times…

Here’s the sound of a busker using the acoustic well, and some kids enjoying the tunnel later on

Robins at Alderman Canal

There is a little nature reserve by the canal near the football ground, an oasis of calm. The water is sluggish with green on top apart from where the water seems to well up from the river bed in these gently roiling clear pools. I don’t think the water makes any sound here, there is some background traffic noise which would mask it.

The nature reserve was improved by the Access to Nature project in 2012. It’s easy to be cynical about some of these projects but this one seems to have worked really well, and there was a lot more birdsong in this part of path by the canal than in the unimproved bits.

10 Reasons for getting out of the Cloud

The Cloud is convenient, it’s easy to set up, it’s often free. What’s not to like? Well, after I’ve been on cloud services for a while, I’m getting sick of some of the serious issues associated with investing time and effort on platforms run by other people for their agenda. Which is why I am on my own damn site, paid for by me, under my control. Since I toted this as a listicle, here are 10 reasons to avoid Cloud services.

Cloud: All Your Base (data, work, time, thoughts) Belong to Us
Cloud: All Your Base (data, work, time, thoughts) Belong to Us
  1. All your data belong to us. Facebook is the poster child for this, but it’s the age old problem, if you aren’t paying for the product then you are the product. This is the biggest issue with cloud services – the surveillance and advertising model is the original sin of the Web.
  2. It’s easy to set up but surprisingly hard to maintain. In one short period Pachube became Cosm which became Xively, and I get to change my code and learn new, poorly documented APIs
  3. Cloud providers come and go. They’re just plain unreliable. I’ve been hit by several – UK Intuit’s Quicken XG, Google Reader, the Vox blogging platform, Pachube, Flickr ratcheting down functionality before Marissa Meyer sorted it out
  4. Cloud is for the moment, not for the long-term. If it’s all done and dusted in a year or less, cloud is great. Crowdfunding, broadcasting an event, running a survey, printing a book – great. Building relationships, building a brand (musicians on Myspace, f’rinstance), lifelogging or even expecting to pass your baby snaps to the parents of your grandchildren in 50 years? Don’t expect the Cloud to do it. Will there even be a Dropbox or Flickr in the 2060s?
  5. The wrong sorts sticking their nose in your business, From Gmail reading your mail (and mine too, because I don’t use it but know people who do) and narrowcasting ads to you all the way to all the Snowden stuff. How the heck do people sleep at night using Mint, for instance – and what is it with Intuit and bad ideas?
  6. The hostage to fortune business – when free becomes paid and you’ve invested a lot of work in the platform. All the work you get to do again, even if you can get hold of your data.
  7. The freemium/in app purchase issue. Apps seem to be classics here – they start off useful in the free version but after a while they are either upgraded to exclude the useful feature you were using or simply don’t support your version of iOS, which seems to be how Apple enforce hardware upgrades!
  8. Data loss or theft. If Jennifer Lawrence’s pics weren’t on iCloud then brute force hacks or no, you have to get up close and personal to nick them from her phone. Sure, it’s convenient to have your Stuff available everywhere, but some things should be hard to get to 😉
  9. You don’t get to control your stuff – how long it is up, who it is sold to, how it is used. That’s how all the papers get a free photo of any miscreant nowadays – they used to have to send a runner to pap them at the courthouse, but it’s so much easier to get it off Facebook. Presumably a nice little earner for the company, too. The credit often says ©Facebook
  10. Upgrades that break stuff. Sure, you get these all the time without the Cloud, though the likes of Debian and MS seems to get this to work most of the time. Sun Tzu says make the battle at a time and place of your choosing – you can upgrade when your system is quiet, or at least when you are ready to fight the consequences.

One Ring to bind the all – the one that sums it up:

Facebook - for the moment, not for ever

One word. Facebook. It embodies both what is great about the Cloud and what is so evil about it – all at the same time. It does the ephemerality of Cloud so well, Facebook couldn’t even exist without the cloud, it’s the quintessential cloud app. It could take the Mission Impossible approach to your messages after a month or so:

Facebook needs this
Facebook needs this

but then stashes everything you say to use it against you in the future with Minority Report advertising.

The cloud rolls up form, function and purpose. And very often my purpose is at odds with that of the Cloud provider. The Internet is a means of communication and publishing. I put up my first web page about 20 years ago. It isn’t there any more, but if it had been important to me I could have seen to it that it’s still there. If it’s important to me then I can make sure this is still here at this URL in 2034, Although I can’t even take back something said on the Internet, if I want it not to be available here in a year’s time I can fix that too. Whereas if it’s on somebody’s else’s information space or real estate I can’t. Nothing I could have done would have preserved my Vox blog, or the information I imported to Quicken XG1

So I’ll use the cloud – but for things that don’t matter or that have no requirement for longevity. Cloud is about fire and forget – Twitter is a fantastic cloud application because a tweet has no value after a few days. Dropbox is fabulous to share files with a pal, or even temporary backup files as long as I don’t mind various governments taking a look. I won’t use the Cloud for anything strategic. That means anything I want to be there for more than a year, anything to do with personal finances, and anything I’d like to depend upon or look back on in ten years time or more.

The journey starts with the first step – bringing my own audio home, so 2014 scarpering Swifts is now native mp3 audio, not embedded from Audioboo(m) any more.

In all fairness to The Cloud, that means I take a fair few hits for freedom. I get to worry about my own backups and maintenance, and I lose out having everything available everywhere.


  1. I only used it for a week before the awful reality sank in that I was renting the use of the program, not owning it. If I want to run Quicken 2004 in 20 years time, I can run a XP machine disconnected from the Internet and still use it. 

Raspberry Pi Soundcard From Logitech Headset

The Raspberry Pi has no audio input, and I had a pair of Logitech USB headphones that had gone faulty – the earth on the headset was a dis. The USB part seemed to work, but headphones live on borrowed time, connectors and wiring tend to go, and everything is sealed, So I wondered if I could reuse the circuit board as a Pi soundcard. Stereo output but mono on record, of course, but still useful. It’s all part of experimenting to make a low-cost audio field recorder that can start by itself. Nothing is designed to be repairable here, so the plastic USB module case was pinged apart with a flat-bladed screwdriver. Initially I wondered if the black stuff was a blown capacitor, but it was on both sides of the board so I figured it was probably glue from the connector, which was confirmed when I unsoldered the connectors, it came off like a gluey film.

Logitech A-0365A USB headphones control board
Logitech A-0365A USB headphones control board

Headphone cable uses fine strands of individually enamel insulated wires wrapped around a synthetic fibre core. The good thing about this is your headphone cable breaks later than if you used normal multi-strand audio cable, given all the flexing it has to take. The bad thing about it is it’s the devil’s own job to solder, because as you heat the strand the synthetic coating melts, robbing you of heat and re-insulating the enamel you’ve burned off. So I unsoldered the existing cable and threw it out, and soldered a stereo jack plug for the headphones and a phono line socket for the microphone. I then extracted the original microphone capsule from the headset and soldered it to a phono socket just to test this out in the original circuit conditions. Continue reading “Raspberry Pi Soundcard From Logitech Headset”

Flat Screen UIs make Fumbling Fools of us all

Did the music for a wedding using my PA today. The bride and groom were lovely, friends of ours and at was a great day. A wedding is an odd PA/DJ sort of job, It’s not the same as a party, or even running a mixtape for a party. Most of it can be scheduled up front – to the extent that there are firms that hire out a no-DJ wedding system

The job was made easier for me as the bride had made her selection of classical music, with a section for the getting seated bit and a long stretch for the after the event part. So far so good. The venue was the lovely Christchurch Mansion in the main park in Ipswich, and the weather smiled on the happy couple for the event and afterwards

So all I have to do is run the playlist. Because this is classical music the sequences are long, and you don’t have to do the DJ crossfading thing between tracks. Easy-Peasy, right?

Wrong

Some parts of a wedding are a stage show. Stuff needs to happen in time. Usually there’s the entrance of the Bride, and the signing of the register. Both of these are a performance, and timing is crucial. Whatever you do as the music operator you do not want to screw this up the entrance of of bride, in short you need to know that your music is gonna start on time, every time, and you are going to fade it out at the right point. The bride selected Pachelbel for this

The registrar also has to say various things at various points, and they don’t want the music to be running while they’re talking. With classical, pulling the music is easy as a fade down – it’s a bit more of a drag if you have to fade a pop song just as they are getting into the main part, you probably have to rehearse timings, but this wasn’t a problem I had.

Making the right thing happen, on time, on cue is not easy with an i-anythingwithatouchscreen.. It might be easier with a Nano or something with an old-skool gonzo keypad and LCD, but a touchscreen is a vile UI for this job. Not only is there a little bit too much latency between the press on the screen and something happening, but it’s far too easy to screw up and then you have to pad your way through a series of menu choices to say no that isn’t what you want, you want this to happen instead. Continue reading “Flat Screen UIs make Fumbling Fools of us all”