Wednesday, 4 December 2019

Raspberry Pi to replace DVR

As our Humax 9150T DVRs are exhibiting some funny characterisitics, I thought that I would see what I could do with my Raspberry Pi. At the DLUG computer club the other night, Kodi was suggested as probably the best software for this. https://kodi.wiki/view/HOW-TO:Install_Kodi_on_Raspberry_Pi

Ia getting together the bits. I was going to use my 160GB Sata Hard disk, but I don't have a USB converter for it.  I am going to use a 40GB IDE disk with my IDE to USB converter. I have my freecom DVB TV stick if that can be used, and the R-Pi bodel B is available, or maybe the Pi-zeroW. I have a seven port USB hub which may be up to the job - That we will see.

Step one - download the software and get it working.
Initially it wouldn't connect by Ethernet, so I started it on WiFi and it connected. I have updated and upgraded the Raspian Buster system, and now am installing Kodi.

Have attached 40G IDE disk via USB, and restarted R-Pi.

From Kodi Wiki page, I cannot find if I can run Kodi via SSH. It seems to want a big screen and a remote control for all operations.

It's not simple - I can't be bothered.




Sunday, 15 September 2019

Upgrading an Android OS

My Argos Bush android tablet is running Android 6.0  which is Build Number MRA58K@ARCHOS.20160617.013735.Catalpa.

I have recently tried to install a couple of Apps and been told that they were not compatible with my tablet.

Can I rebuild a later Android OS for my tablet?                                                   15/9/2019

The Archos site is no use: https://www.archos.com/gb/support/downloads.html?type=tab

https://www.androidauthority.com/build-custom-android-rom-720453/
The two things that I would need help obtaining:
Grab the source – This is an easy step, however it takes a long time. For me it took over 24 hours. Such a large download only happens once, further syncing with the main source tree will be incremental.
Obtain proprietary binaries – The binary drivers should be unpacked in your working directory.


https://www.youtube.com/watch?v=99LUjX63LhU

https://www.youtube.com/watch?v=1pAr5VzpxyY

17/9/19 emailed Archos:
This Android Tablet is running Android 6.0 and I am now finding Apps that won't run on it. How can I upgrade it to a higher version of Android?
I am happy to try and build the OS myself if given the source and binaries neede, and possibly some instruction.

This would lead to the question - How to export/backup the current OS before attempting any updates, in case of failure.

Thank You, Peter Merchant

21/9/19 No response from them yet, but look what I found:
https://source.android.com/
This will be quite a learning experience

2/10/19 Suggestion from LUG www.xda-developers.com  which is on topic but only seems to cater for popular devices.



Saturday, 14 September 2019

Build your own Electric car

If I wanted to build my own car, real not toy,  where would I start?
What components would I need? I would probably like to start with an old mini, because it is small and light.

Recently I have seen this  new motor design:
https://www.youtube.com/watch?v=8gO60bt6rqk&feature=youtu.be

But in the past I saw a mini with individual motors in each wheel which I liked.
https://www.treehugger.com/cars/electric-mini-0-60-in-4-seconds-it-has-motors-in-its-wheels.html
It might have used these:
https://www.proteanelectric.com/


You need power for the motors, and a power control system,. You also need all sorts of computers to feed information to the driver, look after safety details, and react to the driver to perform operations on the car, such as signalling. Do these computers need a seperate power source?

As with anything you also need a braking system.

More thoughts to be posted as they arrive, and then I'll sort them and rewrite this.

Other people have already done this:
https://www.instructables.com/id/Build-your-own-Electric-Car/

https://www.designboom.com/technology/low-cost-diy-electric-car-made-from-recycled-parts-380-mile-range-06-17-2017/

25/10/2019 On BBC. It mentions Protean (above)
https://www.bbc.co.uk/news/business-49958457






Saturday, 31 August 2019

Preparing SD cards for Raspberry Pi

Step by Step instructions on how I do it.

First use Etcher to download the program to the SD card.  Today this is Raspbian Buster.

Use the browser to connect to the Boot partition of the SD card and create an empty file called 'ssh'

Now plug the SD card into the R-Pi and power it on. Connect via Ethernet. Use a utility like fing on a tablet to determine the IP address.

We need to configure networking. I have three files on my PC that are copies of the networking files from the R-Pi that are set up the way that I like them. I use a fixed wireless and a fixed Wired ethernet address on my devices.

The IP address found by fing is 192.168.1.22.  In a terminal, use ssh to connect to the R-Pi.
ssh  -l pi 192.168.1.22.  I always have to reset keygen when I am operating on a different IP address here.

cd ..
cd ..
cd etc
sudo nano dhcpcd.conf  and toward the end of the file add the lines:
# Example static IP configuration:
interface eth0
static ip_address=192.168.1.9/27
static routers=192.168.1.1
static domain_name_servers=192.168.011 8.8.8.8

interface wlan0
static ip_address=192.168.1.8/27
static routers=192.168.1.1
static domain_name_servers=192.168.1.1  8.8.8.8

This may vary depending on your network and Sub-network mask. 

Comment out the line "slaac private"
CTRL o to write file and CTRL x to exit

cd wpa_supplicant
sudo nano wpa_supplicant.conf
change this file to be:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB

network={
ssid="bmth-wireless"
psk="3C0M5PGM"
# proto=RSN
key_mgmt=WPA-PSK
# pairwise=TKIP
# auth_alg=OPEN
}

Save and exit
Don't forget to change the ESSID and PSK to your own values.

I had to change the properties of this file so that it was accessible.
sudo chmod 777 wpa_supplicant.conf.

Now other  Raspberry pi preparations and setup
Use sudo raspi-config to expand the file system (Under advanced settings).
sudo apt-get update

At this point I reboot to get the new IP addresses. You will need to ssh in again.

sudo apt-get install python3-flask.
mkdir rc-car
cd rc-car
mkdir templates
save app.py in the rc-car directory
save index.html in the templates directory


sudo apt install python3-gpiozero

Use filezilla and transfer files to the Pi  or copy and paste contents of files using nano.

Need a script file to start Flask. It is in the /pi directory    go-car.scr
It is:
export FLASK_APP=/home/pi/rc-car/app.py
flask run –host=192.168.1.8

sudo chmod 777 go-car.scr   to make it executable. 

Also edit /etc/rc.local and add these two lines to it.

Setting up Ad-Hoc networking:
sudo apt-get install dnsmasq hostapd    --> done


stopped dnsmasq and hostapd, and rebooted. 

got as far as installing and shutdown instead of reboot.
Changed wireless SSID to 'rc-car' and WPA to 'Ashmeads'
IP range is dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
Edit /etc/dnsmasq.conf to contain
interface=wlan0
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
If Wireless doesn't work, it is because the firmware is not installed:

sudo apt-get install firmware-zd1211










Sunday, 18 August 2019

8mm Film digitising

For a long time I have wanted to see what was on the two 8mm films that I have. On friday 16th August I bought a Bell and Howell 635 Moviemaster projector at the market. I haev brought it home and lubricated it, and got it working. I lost the cheat sheet showing how to thread the film when I packed it up at the market, but I have found it here:
http://www.acexie.com/bell-howell-model-635-projector/

I have picked up the manual from here though:
https://memoriesofrxmp.info/wp-content/uploads/2017/09/Product-Brochure-BH-635.pdf

It is now downloaded.

Now I think that I have heard that you have to sync the frames palying with the frames being recorded on the digital camera. That's the enxt investigateion.

Friday, 19 July 2019

Reading MRI scans

I found some old MRI scans on a memory stick and thought that I would see if I could read them. It seems that they are in Dicom format but the files are named a00001 etc.

A little research led me to  a reader called Amide [insert hyperlink here] but it didn't work. I discovered that it needed a utility(?) called xmedcon. Both were available in the Kubuntu  repositories. I used a different hard disk because I didn't want it affecting my main disc. I have emailed the creator via sourceforge to see if I can get any help.

Then I had another look and found a list prepared by https://people.cas.sc.edu/rorden/dicom/index.html
and downloaded his program MRIcron. this won't work directly on Dicom files but needs to convert tehm, via a program called mricroGL. This brings up a form to specify the source and destination directories and some buttons for the format, but no 'button' to make it do it. Something I pressed did it, and now I have imported it and can see the MRI results.


It identifies each 'picture' by a number between -127 and 90, but jumps about 6 between each view.
I have it running and am looking at one of the three possible viewing modes [Axial], and I see a large round tube beside the spine. This site identifies it: https://www.kenhub.com/en/library/anatomy/blood-supply-of-the-spinal-cord




Thursday, 11 July 2019

RC Car Number 3

This car has thrown a curve ball. The Receiver IC is a SM6135W and it has the same pinouts as the IC in Car 2, so I would expect the car to behave the same. But it doesn't. This is using the Flask software with the Raspberry Pi 3W configured as an Access Point.
In Car 3  Forward makes the wheels turn Left, and Backwards turns Right, And the Left/Right buttons make the car go backwards or forward for a very short time.

But the IC has the same pinouts as shown here:

Here is a picture of the driver board, with the receiver IC replaced by an IC socket



The Blue and White wires drive the steering motor, and the Yellow and Grey wires drive the main motor.  The Red and Black wires are the power. On the second picture, above the grey wire is a block of 6 pinouts that the blue wire connects to and a sort of Z shaped set of pinouts where the white wire connects.


I am going to replace it with a HW-95 driver board to see if it works properly.



This has a +5 connection and a +12 connection. I don't know which to use yet. 


A comprehensive video is here: 
and another


If I can get it working basically, I might then try to use PWM to drive the motors.

2019-07-13 I have it working, but of course it is efectively an eviscerated car with the L298 motor controller driven by the Raspberry Pi. The car batteries 6x 1.5 AA cells are connected to the +5v input on the controller and the car crawls very slowly and doesn't have enough power to back up the very smallest of slopes (Driveway).

At least crawling this slowly it doesn't get away from me. Another 'feature' is that the steering wheels do not have an automatic return to zero as car #2 did. 

I'll move these batteries to the +12 terminal and see if it makes a difference. RESULT: It makes a terrific  difference. The car runs like it should. The next problem is what to do after it has run into something and ceases to respond. The first time this happened the power cord had pulled out of the R-Pi. I don't know what happened the next time. 

2019-07-28 Here is the proof: https://www.youtube.com/watch?v=jsj-cnHkr_k&t=9s

Next is to replace the original card, but swap the steering and motive motor wires. I have a record of where they were connected on the board. 


2020-01-14 New thoughts. 
I have just watched a video about driving multiple Servos from a Raspberry Pi:  https://www.youtube.com/watch?v=xHDT4CwjUQE
and then one about autonomous vehicles - farming implements, so it caused me to look at Autonomous vehicles driven using a Raspberry Pi so I found this: 

This one uses a Servo Shield(Hat). My thoughts turned to controlling the steering using a Servo. I wish that I had not dumped Car #2 as I could have used that. It's steering was never any good. 

Watch this space?

2020-06-08 
Been a while. 

It should be noted that this is using uSD card #7. 

I have put the original driver board back in, and created brackets to hold the R-Pi ZeroW in place. It runs well, but is slow to respond. In the field with grass tufts it didn't seem to have power to get over them.  Maybe I need to get an adjustable ramp and see how steep it can go?  One thought here is that the outputs of the GPIO are  +3 volts approx where the original receiver chip was a +9 volt system. If I had a buffer to give a greater output voltage to the driver board would it have more power, or just go faster.  This is not an easy thing to implement.  Documentation is confusing but suggests that IC is +5v and output is 3v, so is OK. 

I discovered that the steering return to home mechanism was gone, so I created one with a paper clip and it seems to work. However the steering software only turns it for one second. I am going to increase this to two seconds. 

Going up the road it is sensitive to camber and doesn't react well to being asked to steer up the camber. 

The steering has now been changed to two seconds and then it has a stop command so the steering returns to zero position. Maybe I should adjust the software to have a center steering button and no time set?