chemicaloliver

experimentation, criticism and geekyness

Where to buy electronic components, arduinos and sheevaplugs in the UK?

Often when I buy an electronics book, or more recently a physical computing book, there is a section detailing where to purchase components, however they’re almost exclusively in the US and details of UK electronics retailers are difficult to come by for beginners and even more experienced people. In this post I intend to detail some of the electronics component retails who I like which sell a range of components from basic resistors and wire to expensive test equipment and embedded computers.

General Component Retailers

These are the retailers I most commonly order parts from and like, there are many others who may also be good but these are my favourites, as they stock the basics they’re used more than any other category here.

Bitsbox

Bitsbox is a small retailer with a large following, it sells mainly simple components: capacitors, resistors, basic connectors, basic tools all for very reasonable prices when ordering in small quantities, something which is not common among many bigger suppliers. Also standard postage is only 1.50 on any order. I’ve bought here many times and always had a great experience, quick dispatch and good communication.

Farnell

Farnell is about the most furthest away from Bitsbox it’s possible to get in size and product selection,  it stocks hundreds of thousands, maybe millions of products from the mundane basics to the high end exotica and offers free next day delivery on any order. If you need something, almost anything in electronics quickly this is where to go. They are also the only retailer I’ve found in the UK which stock Texas Instruments components. Service is another area in which farnell is great. Prices can be high on some items but not unreasonable, my recent Agilent multimeter was 20% cheaper than any other UK retailer. Beware of items marked in stock in US which attract a 15 pound postage fee.

A point worthy of note is that if you want you can pick up orders from the trade counter at their international distribution centre in Leeds, West Yorkshire, something I’ve done a few times. You have to phone to order this way but the order can be collected after 2hrs and is within walking distance of Leeds Station and also is easy to drive to/park at. This makes them my 2nd favourite retailer on this list after NewIT (below).

Continue reading Where to buy electronic components, arduinos and sheevaplugs in the UK?…

MQTT, Mosquitto and PHP

As mentioned in my previous post I use a sheevaplug as a LAMP server and also run the MQTT server Mosquitto. In this post I shall not detail the finer points of MQTT and pub sub messaging, they are well described in this presentation by @andysc if you’re not familiar. I intend to cover the more obscure topic of using PHP to write a simple MQTT client which can both publish and subscribe, getting input from an arduino into PHP and subsequently publishing it to Pachube. Currently I use MQTT to monitor temperature, bandwidth usage and cpu usage however this is set to expand in the future.

PHP and MQTT

Currently the majority of MQTT users seem to use clients written in Perl, which is fine for those over a certain age where Perl is common knowledge, but when standing next to some more recent scripting languages like PHP and python it’s a bit archaic! Conveniently IBM have provided the SAM PHP library which includes the capabilities to send and receive MQTT messages and is quite simple to use both from the CLI or as part of a web application. However it includes support for other IBM protocols which isn’t required for basic MQTT communication so the complicated compilation and installation is not really required here, just the php files, thus the folder can be placed in the same folder as the project using it and included with a standard php include:

require('<PHP-SAM folder name>/php_sam.php');

Continue reading MQTT, Mosquitto and PHP…

Sheevaplug – An ideal home server

The sheevaplug, a marvel development platform based on a 1.2GHz has risen out of obscurity in recent times as a silent, very low power computer. It’s uses have been stretched way beyond the intended use into cars and even as a full on desktop computer, despite it’s lack of connectivity.

The basic hardware consists of:

  • Marvell Kirkwood 6281 CPU at 1.2 GHz with 256 KB L2 cache
  • 512 MB RAM
  • 512 MB flash
  • Gigabit Ethernet
  • 1x USB and 1x SD
  • mini-USB with serial console and JTAG

The system is fanless and there are no moving parts, so it is silent apart from a strange extremely high pitched ringing sound which is on the edge of being audible.

In this post I’m going to describe what made me choose the sheevaplug, what I have added to default system and why I love the sheevaplug.

Continue reading Sheevaplug – An ideal home server…

How the TI ez430 Chronos watch could be better (Updated)

Without a doubt TI have produced a cult product in the chronos watch and it seems to be marketed to both get people using their msp430 chips and on a smaller scale produce cool projects with the watch. They have done well in providing the code for the watch and the the included hardware works well (albeit lacking much Linux compatibility). However I feel they’ve been slightly too clever in the hardware design and thus prevented some cool uses of the product. This post comes in response to some views recently posted on hackaday.

A recent hackaday post suggested using the supplied receiver could be modified to be used with an MCU, however this is unlikely unless the MCU acts as a USB host for a CDC device. Also the currently available watches use 868MHz which is a band in which cheap transceivers are not available (or at least that I can find), when the 433Mhz version is released in march interfacing the watch with an MCU may become a trivial task with cheap hardware.
Continue reading How the TI ez430 Chronos watch could be better (Updated)…

Controlling lights with TI ez430 chronos, home easy, arduino and processing

Now that the protocol for basic communication with the TI chronos ez430 has been worked out (see previous posts) I needed to work on something useful. So I set out to try and control my wireless light switch with the watch. Sadly the RF receiver supplied with the chronos does not use a protocol which is likely to ever be compatible with the arduino so this example requires a computer.

The Hardware

Recently I’ve acquired a Home Easy HE217 remote light switch which consists of a unit placed between the light bulb and ceiling rose and a wireless switch to switch the light on and off from anywhere within about 10m. I purchased this with some form of hackery in mind but this is the first real attempt to do anything useful outside of the functionality of the supplied package. The system uses RF at 433MHz and a simple authentication protocol, which is conveniently documented at the Home Easy Hacking Wiki.

Home Easy HE217
Continue reading Controlling lights with TI ez430 chronos, home easy, arduino and processing…

Simple caching of twitter timelines using PHP

Whilst building this site I decided I wanted to put my recent tweets on the main page, which using cURL and php is a pretty simple task, however the twitter API restricts users to 100 requests per hour and if the limit is exceeded subsequent attempts are blocked until the end of the hour. To get around this I searched around for a library to do the work for me and found many but all seemed to provide overly complex functionality.

This lead me to write my own simple library which gets the most recent tweets from a specified account and caches them to a text file on the server and allows the user to place them in a webage as a simply formatted unordered list of links to the posts. The code for the library and an example are shown below.
Continue reading Simple caching of twitter timelines using PHP…

Receiving TI ez430 Chronos Button Presses in Processing (and Python)

Another currently badly documented feature of the chronos is the facility to get button presses from the watch when in Powerpoint (PPT) mode, so again after a code example from Sean Brewer (available below) I’ve produced a processing version.

The process of acquiring the data, the same request string is sent however in PPT mode the return is different, the third byte determining which button has been pressed in the case of my watch the buttons return the values below:
Continue reading Receiving TI ez430 Chronos Button Presses in Processing (and Python)…

Graphing ti ez430 Chronos watch data in Processing

Thanks to a helpful comment on my previous post Graphing ti ez430 Chronos watch data in Linux Sean Brewer posted the help I’d been looking for to get the chronos working with processing.

Following on from the sample code posted by Sean (pastebin or my mirror) I have made the code into a more conventional processing style and added simple graphing functionality in processing to allow the simultaneous graphing of xyz data and my updated code can be found below.
Continue reading Graphing ti ez430 Chronos watch data in Processing…