Thursday, 31 August 2017

Economies of Scale

As a person who voted to leave the EU, I thought that I should get some of my thoughts  about why I voted this way into print.

Great Britain has always benefited from being an island nation. If we had been connected to the mainland in 1940 we would have been overrun and the world would be a different place.

But we now belong to an organisation that is mainly the countries of the mainland, and it is so large that it has lost the benefit of economies of scale in so many ways. It is not homogeneous enough in so may ways to work well. Do we need an EU armed force? But only a few countries would want to contribute to a navy.  It could be argued that we have a major possible opponent in Russia, but as in past wars, the armies of each country could work together if needed. Could a large armed force be easily controlled? Each country knows its own terrain best.

One of the major drawbacks  to the EU is the finances. They have not been able to do an annual reconciliation for many years, so when we in Britain ask for the bill for leaving, The EU is unable to calculate it.    Can GB calculate  what we think it should be? Yes, because we have a chancellor who looks after the financial departments of government and could, with a bit of push and shove, get the figures out of HMRC and others. Britain is slimming down many government departments, and making them more efficient. We now need to simplify our tax system.

The EU machinery is very top heavy because of the need to have representatives of each country in every department. I cannot imagine an EU with a single tax system for every person. This would be impossible to manage. That is why it has to be devolved. but to be properly devolved each country's tax system should be the same.

Is GB the right size for a good economy of scale? Suppose that GB were to break down. Could Scotland, Wales, England, Northern Ireland each build up their infrastructure to cope successfully? That's more people working for the government. And border controls?

If things were to break down even further to the concept of city states, such as Manchester and London being completely independent states then I think the whole concept of government will have broken down. Each would have it's own tax regime, administration, military and policing and external Foreign relations. Medical science would come to a halt, unless there was a medical science body that would help cross fertilisation of ideas, But where would it be based? None of these city-states would be big enough to negotiate business contracts with companies that are larger than they are. You start to wonder what proportion of the people of the British Isles would be involved in Government.

So I see Great Britain  being the appropriate size to be independent of the EU and able to manage it's own business.

Tuesday, 15 August 2017

Playing with Linux Operating Systems

Because I have been a bit restricted in what I can do lately, I dug out my play computer and tried a few Linux OS's on it. Here is a bit of a report.

The computer is an ASUS P5K with 4GB of RAM, 153GB IDE hard disk with an IDE-SATA converter and a 15 inch monitor. It has a Wifi card that sits on the motherboard.

Initially the computer had a SATA hard disk with Zorin 11 on it. This had installed easily and worked fine. It is a 'simple' OS that is sort of an XP replacement.

I overwrote this with Parrot linux 3.7 as it was in one of the recommended lists. It had the old text based installer and went in without problems, and updated easily over the wifi.

I then changed this disk for the IDE with converter and installed KDE Neon 5.8.5 that I had downloaded back in January. This installed easily enough but I had a bit of trouble getting it to stay connected to the wifi. It wanted about 270 updates, and when you  hit the 'update all' button it overlayed a screen of all the files that were going to be updated, but it was a long list and you couldn't scroll down or see any way of removing it. Hitting the enter key did it. I had to try and update about 4 times over the wifi, because it kept stopping when the wifi failed and I was unable to restart it.  In the end I carted it indoors and wired the Ethernet in. It eventually updated. One of the features was that the machine refused to respond to the power down instructions. The only way I found to stop it was the power button.

Not happy so I installed Kali Linux 2016-1 over it. Once again a text based installer, it took it's time installing, but got there. It didn't mind that I went out for coffee, just kept working, not like the Neon.  it's quite fast, but the only login on it is root. I haven't found an office suite on it yet, but it is a dedicated security toolkit distro based on Backtrack and Helix.

Ah, well, if you're bored then you might be interested in trying
https://manjaro.org/  I haven't, but it's an Arch Linux derivative
with... a GUI installer!  The download page looks to have KDE flavour. -Ralph
That kept me from being bored. I downloaded the KDE version, and every time I booted it, my screen displayed a message " out of range " which implies that it cannot adjust the resolution to that of this ancient Toshiba 15".  This is a condition that I have seen years ago when a computer could not set the screen size. I  think that it is 'working' because every time I hit a key the CD runs up.  I booted into SolyDK and that worked OK, as does everything else.

I have a cheep IDE-to-SATA converter on the hard disk drive and it is giving me grief too as I keep swapping drives.

I used to be a great fan of Mandrake about 12-15 years ago, but didn't like Mandriva. I'll have to give the latest incarnation another try.

I tried Mageia, but could only find the XFCE version. I liked it because of the ease of installation and guidance, but on booting it always brought up a terminal window and needed a root login before proceeding to the GUI login. And it was dreadfully slow.  It says my screen is a 15"  Toshiba  with 1024x768 resolution.  I think someday I'll have to try it again as it doesn't seem right.

And at the end of it I decided that my IDE-toSata converter had a poor solder connection on the SATA connector so have had a go at fixing that.

Have given up/finished. Have now four HD's with PArrot, Kali, Mageia and Zorin that I can plug and play via the SATA cable.

Wednesday, 7 June 2017

Don't vote Labour

The current state is that unemployment is the lowest that it has been since 1971, and there are more people in work.  https://www.ons.gov.uk/employmentandlabourmarket/peoplenotinwork/unemployment

This means more people paying income tax, and more revenue for the government. This means, if we don't spend it on other things, we can borrow less from the IMF, perhaps even get with some austerity to the point where we don't borrow any and can pay some back. This would reduce our Interest payments which are currently more than the Defence and Foreign Aid budgets. Following on from this, the more that we can reduce out interest payments, the more money we will have to spend (or pay down the capital).  We need a good government to do this.

Labour has grandiose plans and will carry on borrowing, which will increase our interest payments, therefore requiring us to borrow more to maintain the status quo, until the interest payments get SO large I don't want to think about the consequences. Remember that the previous labour government left a note: https://www.theguardian.com/commentisfree/2015/may/09/liam-byrne-apology-letter-there-is-no-money-labour-general-election


Friday, 2 June 2017

Home Made Anemometer

For quite a long time I have wanted an anemometer to add to our weather station, but they all cost money, and the other day I read about  a project that used bearings from a disk drive on a low friction project.  I was wondering whether I could use the motor as a generator, but I read different things about disk drive motors. Sometimes it is said that they are dc drives, and sometimes stepper motors with three coils in a star configuration (four contacts). The unit that I have stripped down only has three contacts so I am wondering if the coils are in a delta configuration, and if that is the case , can I use a pulse from one coil to measure the rpm?

Does anybody know anything about disc drives?  The other suggestion I have seen is to use a bike speedometer hall effect sensor to capture the rpm.

I have glued 'cups' to the disk and it turns freely, I also need to find a place where the wind is constant around here.

Then I'll feed it into a R-Pi and make the output readable.

Suggestion 1 from DLUG: We used a 60 tooth wheel which makes calculation easy as it can be seconds or minutes (RPS, RPM).  Could use opto-coupler or hall effect chips.

Suggestion 2: I'd use an "Opto Interrupter", or "Beam Breaker" rather than an Opto-Coupler, this would apply to both projects. In the case of the anemometer, I'd fix an IR Receiver above the spinning cup shafts and and IR LED below them and count the number of times the beam is broken, dividing In the by the number of cup shafts if you want RPM.

A useful place to salvage opto switches and LED sources are old ball driven (not the "laser" sensor variety" computer mice. Pickup from the ball is usually via a spindle with an interrupter disk and then a quadrature detector, use one channel for a directionless speed. You'll also find similar on the scroll wheel of modern mice.

Extra points for just hacking the anemometer vane direct into the mouse scroll wheel. Then wind speed is just how fast the second scroll input to your PC is spinning.

----
Thinking back to my history with bar coding, and having an old ball mouse available, I made my own bars on the bottom of the disk.


I divided a circle into segments until I felt that I had enough (32) that I could darken in easily.


I cut out the bits marked with a blue felt tip pen.


I was going to use Pritt glue to glue the template on to the disk, but then thought that I might not be able to remove it, so cut out a bit more of the centre and used masking tape. I then used the automotive touch up paint to paint in the removed squares.


Remove the paper and this is what we have. It was a difficult picture to get because of the reflections from the silver surface.

Turn it over, the 'bars' are on the underside, protected from the elements, and here are the cups. They are made from a piece of plastic pipe  cut into thirds, and stuck with contact cement on to the disk.

Now I need to take the mouse circuitry and mount it below the disk. In it's mouse configuration it shines through the wheel, I need it here in a reflective mode. I have also discovered that the phototransistor on the mouse is two transistors with a common collector.

end for now.
My intention is to feed into a Raspberry Pi and then use WebIOPi to display the results on the tablet.



Thursday, 18 May 2017

Two computers

Lets call these computers Downstairs and Upstairs. Downstairs is Windows XP and Upstairs is Kubuntu 16.04. It all starts when XP on Downstairs dies. I back it up and install Kubuntu 16.04, restore the data, and have to adjust the sizes of things because Kubuntu makes the most of the resolution available, and XP was reduced for the main user.  Reducing the resolution of Kubuntu gives an odd stretched display so I just expanded the sizes of the rows in the spreadsheets and increased the fonts.

This works fine for a week or two and then fails to start. The Motherboard has died. It was bought about 2005, so it has had a reasonable life. Got to keep this computer going, so bring Upstairs down and swap Hard Disks. So this computer is now U-D (Upstairs become Downstairs). The computer now known as D-U I put a motherboard I was given from Ben Campbell  into. This is an very fast Multi-core Mobo with 12 GB or RAM and it works very well. Only downside is that I lose my Windows 10 running  in VMware, but that could have been because of an upgrade to VMware.  Both computers are now working happily.

U-D is a bit noisy so I move it around a bit and then the monitor goes funny - into lower resolution or turning green. First thoughts are that it is the monitor cable so I swap that out, but it is not the solution. I then discover that the connector is loose on the Motherboard. Move the computers around again and swap hard disks, so D-U is now D-U-D and U-D comes back upstairs to be U-D-U. I put in a spare Video card and get that working so it is not using the video out on the motherboard.

All back working, but I have got my old computer back upstairs U-D-U and D-U-D is a super-duper 'gaming' computer that is only used for email and spreadsheets. In retrospect what I should have done is just put this video card in U-D  and left it downstairs.

Tuesday, 31 January 2017

Trident Guidance System

So the military cannot fire a trident Missile from a submarine towards a target satisfactorily.

I wonder if it is possible to write a guidance program using a Raspberry Pi. The inputs would have to be the current GPS Location (2 fields) and the target GPS Location plus altitude (3 Fields).

I suppose, not being an expert, that from these input values the program would have to calculate the distance to the target allowing for curvature of the earth, and therefore how high the missile would have to go - the apogee.

Another thing that would be needed is a compass to determine the direction of flight.  This possibly can be determined by calculations on two successive GPS readings?  And knowing the orientation of the Missile. How would you know this? That way you would know which side rockets to fire or rudders to control to point it in the right direction.

How many inputs/outputs would you need? If it's anything like my RC-Car then two outputs for each of the north/south rudders and two for each of the east/west rudders, and appropriate inputs to give feedback on the positions of these rudders. Then there is the throttle control for the rocket motors, however that works.

A good start.



Tuesday, 17 January 2017

Raspberry Pi Differences

The Problem that instigated this investigation was that I bought two Aqprox Wireless-N Nano USB Wireless adapters and could not get one to work on my test-rig Raspberry Pi. After doing all the usual swapping around, the conclusion was that there were differences in the R-Pi's that the adapter would not work on one, but was quite happy on the other.

As found from: http://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/



pi@raspberrypi:~ $ cat /proc/cpuinfo               *** Model B  Revision 2
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 2.00
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2708
Revision        : 000f
Serial          : 000000002dab1189
pi@raspberrypi:~ $

works with Ralink Ok

Last login: Mon Jan 16 09:17:15 2017               *** Model B revision 1
pi@raspberrypi:~ $ cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 697.95
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2708
Revision        : 0002
Serial          : 000000004cb2f7c8
pi@raspberrypi:~ $

Fails with Ralink  ??? why?


http://elinux.org/RPi_HardwareHistory

www.element14.com/community/docs/DOC-78141/l/identifying-your-model-of-raspberry-pi
- Sorry, that's member only access.

http://www.raspberrypi-spy.co.uk/2012/09/raspberry-pi-board-revisions/

and for completeness:
en.wikipedia.org/wiki/Raspberry_Pi


From the elinux web site I ascertained that the unit that didn't work was a Model B Revision 1. It does not have any mounting holes. The one that does work is a Model B revision 2.  So I will label the procinfo outputs above.

Further research needed to determine why it doesn't work, but meanwhile I'll have to use the Zyxel wireless dongle

2017-01-18 Response from R-Pi forum:
The RPi B rev 1 has polyfuses in the power circuits of each USB port. The fuses limit the power too much for WIFI and so only low current devices such as keyboard and mouse will work. The fuses were removed in rev2 and power is directly connected to the 5V supply.
On my rev1 boards I removed the fuses and soldered wires across the pads to make them more like the Rev2 board.

So now we know.