Home Julian Rogers Home The Author

Most recent at the top, oldest at the bottom.

26.11.16 Death of Castro

Fidel may have been a despot but at least he prevented Cuba from becoming a colony of the US run by the Mafia. Of course, sadly the chances of this being the country's ultimate fate are significant.

Graffito we spotted in Havana earlier this year.

So, so long Fidel!

It's nice to be not like Cuba

Cos' if we jolly well were-a

West Penwith might be annexed by the Russians and used as a prison camp by the KGB

(sorry FSB).

E.J. Rodge (17 1/2) (with apologies to E.J. Thribb also 17 1/2 by a strange coincidence)

Blog #2

Context: I noticed a clockwork mouse (seeming) to look wistfully out of the window and one thing led to another…

A Tale of Clockwork Mice and Men

Having been dedicated to using the Arduino for quite a few years to control things in the real world (or at least in my version of it!) I recently I have undergone a bit of an epiphany with regard to the Raspberry Pi. I bought a couple of the original model 'B's a few years back with memories of the glories of the BBC 'B' (which was very useful for controlling things) still seemingly fresh in my memory. However, I struggled to find much to do with them that interested me. You could do basic office stuff but why would you want to? They were too slow to surf the Web and there was no Flash etc. I used One Pi as a media streamer using XBMC (now Kodi) and that was a bit of a waste of time with constant upgrades and iPlayer and Channel 4 player not working properly. I then bought a Pi 2 (just before the Pi 3 came out!) with a camera hoping to use it with Skype but no luck there either. It was obviously good for educational purposes and general programming fun in a Linux environment. I would probably have been very grateful had it been available when I was teaching in a secondary school.

More recently things changed when I started writing programs in Python to control an Arduino which was acting as a central heating programmer. The Python was running on my PC and working over wifi using UDP (because it was simple to do!). The aim was to be able to remotely advance and change on/off times using a Tkinter GUI. Tkinter runs under Python and is visually a bit clunky but for a strictly know-only-as-much-as-you-need-to-know-to-get-the-job-done kind of person, it really fits the bill if you need to construct a control panel for a project.

This started to work really well and I wondered whether the code would work on a Raspberry Pi which it did unchanged other than a few issues around window dimensions.

I next bought a couple of Raspberry Pi 'official' touch screens and my Python/Tkinter GUIs worked perfectly on them too. So my 'internet of things' model became a network of Arduinos (or Adafruit Feathers) monitored and controlled by Raspberry Pis fitted with touch screens situated in whichever room where it seemed the ability to monitor and control things was needed.

Then came the epiphany. I discovered VNC and realised I could use a Raspberry Pi to do the controlling stuff though its GPIO ports under the command of its own individual Python program. This could be viewed and controlled by almost anything on the network running a VNC viewer – a PC an Android phone or tablet. (For some reason, I haven't been able to run a VNC viewer on a Raspberry Pi as I can't seem to download the Debian client version of the software yet but I'm sure it can be done.) So the conclusion for me could be to cut out the middle man i.e. the Arduino for my tasks such as controlling things round the home.

I haven't used one yet but I have no doubt that the Pi Zero will work just as well and at £4.00 (even though it will need a few extras to make it work) it seriously undercuts an Arduino or an Adafruit Feather (which both need SD slots and real time clocks amongst other things as extras).

I used to think of the Arduino as being best for relatively simple jobs and the RPi best for more complex jobs. Now it could be the RPi is best for both complex and simple jobs.


Blog #2

Under construction


Blog #3

RPi vs. Arduino


Light and small enough to hang from a belt or jeans pocket!

Drill with brush-less motor, less is more?

Left: brushes, right: fewer brushes and much less bulk.

Digression: I have used an Erbauer drill for about the last two and a half years and worked it pretty hard. Recently, however, the drill got stuck in hammer mode which makes it pretty useless for ordinary drilling and screwing. I made a small attempt to dismantle the thing. I took out the four screws on the front housing and the left hand thread screw locking the chuck in place but nothing seemed to easily come apart so I gave up. I've had a number of drills over the years, I can remember a Bosch, a Makita and two AEGs and all these have failed not because of mechanical breakdown but because the (NiCad) batteries stopped taking a charge.

In spite of the Erbauer being the only one to have a mechanical problem, the price of a new Erbauer  (which also had excellent reviews) was too good to miss. For the first time, I decided to try a drill with a brushless motor.

A brushless DC motor has no commutator and brushes so frictional losses are reduced and also reliability. Brushes gradually burn away and eventually will need to be replaced (if the rest of the drill hasn't dropped to pieces in the meantime!) Because there is no commutator, the motor is shorter also the rotor has no windings, it comprises permanent magnets, so it is lighter which means it has less inertia and gets up to speed quicker. The magnetic windings are on the stationary part of the motor (the stator) surrounding the rotor so heat is easier to get rid of. Electronics drive the coils in the stator in such a way that the electro-magnetic poles attract the poles in the rotor in the correct order to attract and repel the rotor so that it turns. From this point of view, the principle is similar to the stepper motor (but the configuration is designed to rotate in steps). Sensors monitor the rotation of the rotor so that the electronics “knows” when to apply current to the windings. A feedback mechanism in the electronics varies the current as required to maintain speed as the load varies. I assume control is by microprocessor so how it does this is determined by software.

Some reviews state that brushed motors always draw the same current no matter what the load so power (and thus battery charge) is wasted when the load is light. This is just not true. No-load current is small but increases as load increases and the motor speed reduces. As the motor runs, it also acts as a generator of a voltage which opposes the supply voltage (this is known as back emf). With no load, the motor speeds up until the back emf cancels out the supply voltage all but enough allow enough current to overcome frictional and other losses. With a load, the speed drops, the back emf falls and less voltage is cancelled out so more current flows producing the current needed to deliver the torque required.

Brushed motors also use digital control. Speed is varied by pulse-width modulation of the supply and although not essential, it is easy to use microprocessor to control this (some projects on this site use this, for example...)

I suspect the main advantages of the brush-less motor are compactness and reduced inertia (meaning it will speed up quicker).

Rant: In the Dyson vacuum cleaner, virtue is made of its brush-less “digital motor”. Surely motors are analogue. (Dyson products irritate me. I consider them an over-priced triumph of hype over substance. A bit like Apple products. Lets just say I’ve had some issues with both these product ranges over the years.)

Headline: This brush-less Erbauer drill is so light you wonder if it is just a toy. However, it has more than enough power to sink a 100 x 6 mm wood screw. There is also something about the torque delivery when you press the trigger which seems to keep the bit in the screw without jumping out (or perhaps it’s the new screwdriver bit!) I notice the batteries are 2.0 rather than 3.3 Ah. Perhaps the increased efficiency of the brush-less motor makes up for this? (I have my doubts but it’s difficult to tell.) Anyway the battery capacity is adequate given there are two of them. I miss the spirit level which was on the old drill but overall, I am very pleased!

Scroll down for original Raspberry Pi vs. Arduino

ERBAUER (Screwfix) vs. ALDI. What?

Well, getting on for 2 ½ years since my piece below, I can reveal that for some time now (but just beyond the warranty period!) My Erbauer (Screwfix) drill has been giving me trouble. Sometimes, you press the trigger, nothing! Then if you manually rotate the chuck a little everything is ok till the next time! (My original Erbauer is still stuck in hammer mode but still useable for that purpose and being more massive than the brushless, it is more effective at hammering (one of Newton’s laws?)

Now there is a challenger! A drill from Aldi! It is not brushless and comes with only one battery but it cost only round about thirty quid. I tend to use the Aldi for drilling and the Erbauer for screw-drivering. Time will tell as to how long the Aldi one will last.

Generally, I’m not too impressed with Erbauer quality. The name sounds good (a bit German) but my experience now is not all that positive.

The picture right is of an Erbauer saw which just stopped working, again, just after the warranty expired. I hadn’t used it much - still on its first blade. I suspect the electronics involved in the soft start. I spent about five minutes looking at how I might dismantle it and perhaps bypass the electronics, however, it was not made to come apart easily so I gave up! I now have another so we’ll see how that behaves.

Raspberry Pi vs. Arduino - further thoughts

In the text below, I was swinging towards using the Raspberry Pi for all sorts of remote control, timers etc. While it is true that this can be very convenient (and cheap) using Python on the Pi and controlling it remotely by means of VNC my experience has been that you cannot rely on the Pi not crashing over the long term. Also getting a Pyhon program to run on reboot (such as after a power cut) is not trivial. Whereas, it is the Arduino’s stock in trade to always run its program on powerup.

So back to the Pi/Arduino combo. I have two examples, one linked by UDP (and GPIO) and one by serial (and GPIO). The former allows the Arduino’s serial output to be easily viewed using the IDE’s Serial Monitor on the Pi’s desktop (via VNC). The latter does not if you use serial over the programming port to talk to the Pi. There are more considerations which I won’t go into but my point about reliability stands, I think