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?