Monday, 13 March 2017

Another Robot Arm!

I recently 3D printed a new bigger and better all singing all dancing Robot arm!  I got the plans off the most excellent thingiverse site and set the printing going.  17 hours later I was rewarded with the parts which for the most part fitted perfectly.

daGHIZmo's Robot Arm Mk 2

Credit should go to daGHIZmo for the mechanical design which is excellent.  I found the robot a little hard to put together but I'm not the best at this sort of frustrates me sometimes!

Here is the robot in it's full glory:

The 3D Printed Arm!
In order to control the robot we will need to drive several high current servo motors.  I tried to use my original servo driver shield designed in this post: 

I found that the current required by the motors was not nearly available.  When I designed that shield it was only meant to drive low power servos and not the high torque stuff required here.  I also didn't have a great deal of experience in driving servo motors...I hadn't done it for a very long time and truth be told I don't think I have ever done it properly.  So in order to use this robot I'm going to have to design a better circuit.

The main issue I'm seeing is that the servo motors are not working because the current draw is too high.  I suspect that the 5 Volt regulated arduino supply cannot source the instantaneous current needed to make the servos start moving - once inertia has been overcome the motors are driven quite well...Solution - More POWER!

If we provide an alternative high current 5 volt supply to the servo motors they will work as intended and it will still be possible to power the arduino and everything else required.  I also would like to apply some filtering to the servo motor drive connections as I suspect the DC motors used inside the servos are quite poor due to motor brush noise.

Here is the circuit diagram for the Servo Section:

Servo Connections and Filtering
Connectors for Distance sensors and Bluetooth Module and Control Potentiometers

Arduino Mega Connections
 Now to lay out the PCB.  Hopefully this will all fit!
The Top Layer with dimensions
The bottom layer with dimensions
I am a little worried that the external 5 Vdc track to the servo motors is not thick enough to carry the current so I may augment that track with extra wire soldered on.

To make sure every component fits on the board - here is the 3D render:
3D model - Top Layer

ISO of the 3D model
I have ordered the boards from Elecrow - It costs £10.40 including shipping which I think is excellent.  As soon as it arrives I'll populate the board and probably write up another post showing the robot arm in action.

That is all for now - Langster!

Friday, 10 March 2017

Multifunctional Medical Training Device

A blog reader has asked me to help them design and build a medical training device.  The reader is a medical doctor specialising in Pulmonary treatment and training - In the course of their work they measure how much air flow goes in and out of a person's lungs and how that is affected.  The device to be built needs to measure the following things to a reasonable accuracy:
  • Air pressure
  • Air flow
  • Thoracic and Abdominal movement (Using EMG - electromyography)
It would be nice if the device was as accurate as possible, battery powered and wireless as much as possible to make it easy to use and less invasive to the patient.

I'm going to help them by designing something that does all of the above using the arduino microcontroller as the main processor.  The circuit will also have a bluetooth module or ESP8266 wifi module to provide serial communications to an external PC or mobile phone application to display the results.

In order to start the design work we need to assess the instrumentation requirements.  To that end we need to investigate how much air flow and pressure is present in a normal setting and the extreme needed to be measured. From that it should be possible to estimate the requirements for the sensing elements of the device.

The above websites discuss how a medical practitioner performs the above measurements and the associated results expected.  Unhelpfully for an engineer designing equipment the measurement units provided are not clear.  Apparently the results of the testing are quoted as the volume of air inhaled and exhaled in Litres / minute.  So we need a sensor that can measure flow in litres / second or milli-litres per second.  There is no mention of air pressure in those measurements and having had some feedback from the blog reader the pressure measurement is for measuring the pressure from an external ventilator device. The flow probably relates to how much air is ingested into the lungs and the exhaled volume should be slightly lower which indicates how much oxygen was received by the lungs and how much carbon dioxide was produced as part of the operation, We could of course provide sensors for those gases as well. The air pressure would relate to how much a person's diaphragm and chest movement affect the volume of air was inhaled and exhaled and finally this can be corroborated with the EMG measurement.  I don't have much experience with EMG - I made an ECG heart rate monitor many years ago but have mostly forgotten all about it.  EMG is a similar measurement technique.

I am not a pulmonary medical expert so this is conjecture at the moment.  With further discussion I suspect the brief can be expanded upon as required.  For now I will discuss how I intend to implement the device.

The test subject will wear a mask covering the nose and mouth and with tubes attached to the mask which allow the user to breath in and out normally.  Those tubes will be connected to the pressure and flow sensor which in turn will send electronic signal data to an analogue to digital converter which will then pass digital information to a microcontroller (the arduino).  The data received can then be sent out serially and also via Bluetooth or WiFi to an external computer for further processing and graphical display. 

I have no budget for this project so I'm free to choose as I please (I'm paying, so whilst I can choose whatever I like, I'm not a rich person so I'm going to try and cut cost where I can).

The sensors I'm going to use are:

MPS20N0040D-D - I've used it before and I have a pre-designed breakout board (Massive Grin)

MPXV7002DP - I've not used this one before but its easily available with a breakout board and is fairly in-expensive.  I bought mine from ebay for £20
3 Terminal ECG pads and wires - available from Ebay in China at £5.99 for the wires and £5.91 for the pads.

All of these items are available from any good auction website if one looks hard enough:

Ebay - Air Flow Pressure Senor

Ebay - ECG Leads

Ebay - ECG Pads

I'm not sure how physically large the circuit will end up being so I'm not going to specify and enclosure at the moment - Once I have an idea of size I will choose something suitable or design an enclosure that can be 3D printed.

I am currently waiting for parts to arrive from China, once they do I will develop and test the first part of the circuit.

That's all for now - Take care always