Julian Rogers' Blog
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 Raspberry Pi vs. Arduino