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 thing...it 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:

http://langster1980.blogspot.co.uk/2015/04/mearm.html 

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

Langster!

Sunday, 19 February 2017

How to make a Twin T Notch Filter

Analogue Electronics can be hard!  If an engineer doesn't do much design or calculations all the time the skills can be lost.  I have personally probably forgotten far too much.  Helpfully there are reference materials both online and in books to help remind ourselves what we need to do!

I need to design and implement a band stop filter.  This because I need to make some circuit measurements and the 13.56 MHz signal (inherent to the circuit being measured) is swamping the input stage of a spectrum analyser.  I would like to be able to measure all the signal above 30 MHz without it being affected by out of band noise.  This is a common problem when using sensitive electronic instrumentation...what appears on screen is not always correct due to unknown out of band noise.

A Twin T Notch Filter Circuit
The go to circuit of choice in these situations is known as the Twin T Notch filter.  It's a great filter circuit that is easy to implement because of its low component count.  The websites below discuss the theory behind band stop filters and Twin T Notch filters:

https://en.wikipedia.org/wiki/Band-stop_filter

http://mysite.du.edu/~etuttle/electron/elect15.htm

http://www.radio-electronics.com/info/circuits/rc_notch_filter/twin_t_notch_filter.php

https://www.allaboutcircuits.com/textbook/alternating-current/chpt-8/band-stop-filters/

The quick way to design such a filter is to set the required parameters and then use the formula given. The parameters for my filter are:
  • Must use preferred component values
  • Must not filter signals above 30 MHz
  • Must have at least 30 dB of rejection at 13.56 MHz
The formula for calculating the component values is:

Now we can either plug some numbers into the formula above and try and get close to where we want to be or we can use an online calculator tool.  I am all for quickness and see little point in doing mathematics when I don't have to!  Here is a very useful site for calculating Notch filter component values:

http://sim.okawa-denshi.jp/en/TwinTCRtool.php

Credit should definitely be given to the engineers and Okawa-Denshi Electronics Design in Japan!

The useful thing about simulators is the component values can be selected based upon those available and not some pie in the sky value...some less helpful calculators prescribe using component values which either do not exist in the real world or require the skill of a police detective to obtain!

I also have found that when using online circuit calculators it is important to fix at least one of the component values before you start calculating things.  I entered 13.56 MHz as the centre frequency for the filter and set the value of C1 to 10 pF and C2 and C3 to 4.7 pF as these are real world (preferred) values in the E6 series.

Useful site for preferred values:

http://www.matrixtsl.com/courses/ecc/index.php?n=Capacitors.PreferredValuesCapacitors 

The online calculator did it's thing and provided the circuit below:
The Centre frequencies were:
  • Flow = 13.555950 MHz
  • FHigh = 13.679649 MHz
The frequency response of filters is often shown as a special type of graph known as a Bode plot. This is shown below:


I have no doubt that if properly constructed this circuit would provide the filter response I'm looking for - It has 40 dB of rejection at 13.56 MHz, it doesn't filter the signal for frequencies above 30 MHz but the resistor values whilst available are not values I have readily to hand.  Because of that I'm going to tweak the capacitor values and run the calculator again.

I have changed the values of C2 and C3 to 22 pF which follows the rule that C2 and C3 must be roughly double C1....Here is the circuit that the calculator came up with:
Again...this circuit would probably work but I'm still not happy with the resistor values.  They are hard to obtain.  I'm going to increase the values of the capacitors again and see what happens.  The values I have chosen are C1 = 15 pF, C2 and C3 = 82 pF
The resistor values are now much more common and available.  Lets hope the filter response is good enough.

The Centre frequencies were:
  • Flow = 13.496806 MHz
  • FHigh = 13.654780 MHz
The corresponding Bode plot:

From the numbers given and by interpreting the Bode plot this circuit meets my requirements. If I wanted I could fit a 22 pF capacitor in the C1 position and a similar result will be obtained.  That will also change the resistor values as well:

I'm liking these values the most as I am certain I have all of these components available.  I wasn't sure if I have a 15 pF capacitor. It's not a value I use much - easily obtained from any good component vendor but always best to use what you have!

The resistor values are now much more common and available.  Lets hope the filter response is good enough.

The Centre frequencies were:
  • Flow = 13.374485 MHz
  • FHigh = 13.587897 MHz
The corresponding Bode plot:

Now that we have our component values we need to calculate the power requirements.  In this case I want to be able to put as much electrical power through the filter as possible.  The signal strength of the 13.56 MHz signal in my case will be at least 20 Watts.  Therefore each component must be capable of withstanding that power level without being burnt out.

I happen to know that the 13.56 MHz signal will be coming from a signal generator and amplifier at +30 dBm.  If we convert +30 dBm into Watts we find that it is 1 Watt.  So all components need to be rated for one Watt or better. Just for fun here is the formula:

dBm = 10 * Log10 * 1 * 10^-3 (Watts)

We need to rearrange to get Watts:

10^-3 (Watts) =10^(dBm/10)) 

If we now plug the values in we get:

10^-3 (Watts) =10^(30/10))

Which is equal to 1000 * 10^-3 Watts or 1000 milli-Watts which is 1 Watt 

So all of the resistors need to be 1 Watt rated or better.  I'm going to need a small enclosure with connectors for this circuit and that means I'm probably going to need a printed circuit board.

I have used these diecast boxes in the past for this purpose - they are useful because they come with BNC connectors already fitted:
They are made by Pomona Electronics and are available from most good electronics vendors like RS components and Farnell Electronics.  My only complaint is the cost - £28.04 - yikes!

The datasheet for the box is here:

http://www.farnell.com/datasheets/63791.pdf?_ga=1.89445531.125022660.1487507564

The dimensions of the Box are below:

Rather unhelpfully the inner dimensions are not provided - I hate it when that happens. However it isn't too much of a concern, reasonable estimations can be made.

If the printed circuit board is 36 mm x 33 mm and when populated is less than 25 mm high it will fit the above box well enough.

Here is how the layout came out:

I have chosen to use surface mount components throughout and 2512 size resistors so that the power requirements are met.  The board should easily fit inside the enclosure chosen.  The dimensions shown are in mm - for those that might be interested.

Just for fun here is how the PCB will look when populated:

ISO view of the Notch Filter PCB
The top side of the Notch Filter PCB
The side view of the Notch Filter PCB
Just for fun and because I wanted to practice my 3D drawing and modelling skills I have drawn up the Pomona 3231 Box.  It is available for download at the 3D warehouse if people are interested. Here is the PCB inside the box:

Top view of the PCB in the 3231 Pomona Box

ISO view of the PCB in the 3231 Pomona Box
Finally all that is left to do on this is create a bill of materials and calculate the total cost for this Filter.  I normally buy my components from Farnell Electronics but anywhere would do.

Component Value Quantity Footprint Part Number Cost (£) Notes







Resistor 390 Ohms 5 2512 2476478 0.604 3 Watt resistor from Farnell
Resistor 27 Ohms 5 2512 2476450 0.604 3 Watt resistor from Farnell
Capacitor 82 pF 10 0603 722078 0.015 C0G from Farnell
Capacitor 22 pF 10 0805 1759489 0.0323 C0G from Farnell
PCB N/A 10 N/A N/A 14.04 10 PCBS from Elecrow
Pomona 3231 Case N/A 1 N/A 1234948 28.04 From Farnell

Unfortunately I could not get an 0805 82 pF capacitor which is annoying but I can fit an 0603 part. The total cost for the above is £43.34 - That is enough components and PCBS to make one complete unit with plenty of spares.  The cost of a single unit alone is £29.70 which I think isn't too bad.  Those pomona cases are very expensive - I might investigate a cheaper solution at some point.

The good news is all of the resistors I found are 3 Watt parts which means the filter will be able to work with high power signals!

The more astute readers may know that it is possible to buy a notch filter from various RF vendors.  I did consider these options and for those that may be interested the following websites have them on sale:



I couldn't find one that specifically sells a 13.56 MHz Band Stop Filter although I suspect such products do exist.  I doubt that I would be able to buy one for less than £30

If I do decide to make one of these I will test it and provide the results and photos.  Hopefully this was of interest to someone - Take care always - Langster!


Saturday, 16 July 2016

Switch De-bouncing in VHDL for the Mimas V2 FPGA Development Board

It's been a while since I blogged about my adventures in relearning VHDL.  I am slowly regaining the knowledge I used to have when I studied at University (That seems a very long time ago now). Slowly and steadily I'm building up the knowledge needed to use an FPGA for something useful.

I intend writing a couple of connected blog posts over the next week or so in order to demonstrate something more involved (and useful).

This post will concentrate on reading input from a momentary switch.  The Mimas V2 board has six momentary switches on the right side of the board below the micro-SD card slot.  Lets write some code which reads in one these switches with de-bounce code.  We can then use this code to implement a counter which we can display on the seven segment display.  The counter and the seven segment display section will be in later posts.  For now lets concentrate on reading in the switch properly.  For now we can display the output onto an LED

Mimas V2 Momentary Switches
Here is the general idea:
  1. Start
  2. User Presses a momentary switch.
  3. The FPGA reads in the button switch.
  4. The button read is de-bounced.
  5. The corresponding LED is illuminated until the button is released.
  6. Go back to step 1.
  7. End.
Lets fire up Xilinx WebISE and start a new project:


I called mine Mimas_switchDebounce - use any name you like!  Click next when ready:


Make sure all the above settings are entered so that the project is setup correctly for the Mimas V2. Click next when you are ready:


Click Finish to return to the main project screen.

Now left click on the project menu and select 'add new source':


In the dialog window that appears select VHDL Module and give it a suitable name - I called mine switchDebounce:


Click 'Next' when you are ready to continue:

We need to define the inputs and outputs for the debounce code.  We need to read in the raw button presses and then we need to display the results on an LED.  This all needs to be synchonised with the 100 MHz clock on the Mimas V2.  


Complete the form with the above settings and then click 'Next' to continue:


Click 'Finish' to return to the main project screen in WebISE:

Xilinx Webise has helpfully automatically generated some code for us....Let's examine the code.

LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; ENTITY switchDebounce IS PORT ( CLK : IN STD_LOGIC; Switch_0 : IN STD_LOGIC; LED_0 : OUT STD_LOGIC ); END switchDebounce; ARCHITECTURE Behavioral OF switchDebounce IS BEGIN END Behavioral;

The entity statement defines the inputs and outputs to the FGPA - three standard logic pins, the switch input, the LED output and the 100 MHz system clock.

The architecture statement is where the 'behaviour' of the code will be defined.  There isn't anything in it yet but there will be!  Lets decide how we are going to achieve things.  There is more than one way of reading in buttons, checking that the button state has changed and then producing a result.

Lets make things easier for ourselves and draw a flow diagram:

This should make writing the code a little easier for us.  Every diamond is an if statement, every rectangle is a part of a process....simples!


From the flow diagram we should be able to write the behavioural section of the code:

ARCHITECTURE Behavioral OF switchDebounce IS
SIGNAL inputFlipFlop : STD_LOGIC_VECTOR(1 DOWNTO 0); CONSTANT countMax : INTEGER := 100000000; SIGNAL count : INTEGER RANGE 0 TO countMax := 0; BEGIN PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN inputFlipFlop <= inputFlipFlop(0) & Switch_0; IF (inputFlipFlop(0) /= inputFlipFlop(1)) THEN count <= 0; ELSIF (count < countMax) THEN count <= count + 1; ELSE LED_0 <= inputFlipFlop(1); END IF; END IF; END PROCESS; END Behavioral;

Lets go though how the above code works:

SIGNAL inputFlipFlop : STD_LOGIC_VECTOR(1 DOWNTO 0); -- input flip flops CONSTANT countMax : INTEGER := 100000000; -- 100 MHz clock, delay is 100 ms and 100 ms = 10,0000000 ns SIGNAL count : INTEGER RANGE 0 TO countMax := 0;

The above lines create internal signals.  The first signal inputFlipFlop is a simple flip flop.  It is used to check if the button has been pressed or released (changed state).  The constant countMax is the delay period that is set to ensure that a button has actually been pressed.  It has been set to 100 ms although any number can be used.  It was calculated from the 100 MHz source clock.  1/100,000,000 = 1 ns and 10,000,000 ns is equivalent to 100 ms.  If a second was needed then the constant should be set to 1000000000 etc.  The signal count is the value of the number of clock pulses that has passed.  It is dynamically set to the maximum delay period set by countMax.

BEGIN PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN inputFlipFlop <= inputFlipFlop(0) & Switch_0; -- read the switch state IF (inputFlipFlop(0) /= inputFlipFlop(1)) THEN -- has flipflop changed state from previous state count <= 0; -- if flipflop has changed then reset count ELSIF (count < countMax) THEN -- if flipflop has changed is count less than countMax count <= count + 1; -- increment count by one ELSE -- count has reached countMax LED_0 <= inputFlipFlop(1); -- set LED_0 to the same state as the flip flop END IF; END IF; END PROCESS; END Behavioral;

The above lines perform the function that is required - the subject of the flow diagram:  
  • If the clock has changed state and is high then check if the flip flop has changed state.  
  • If the flip flop has changed state from it's previous state - This means a button has been pressed and if a button has been pressed then the count needs to be reset.  
  • If the count is less than the delay period then the count must be incremented.  
  • If the count has reached the delay period then the LED state needs to match the flip flop state.   
Here is the entire source code in case it's needed:

LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; ENTITY switchDebounce IS PORT ( CLK : IN STD_LOGIC; Switch_0 : IN STD_LOGIC; LED_0 : OUT STD_LOGIC ); END switchDebounce;

ARCHITECTURE Behavioral OF switchDebounce IS
SIGNAL inputFlipFlop : STD_LOGIC_VECTOR(1 DOWNTO 0); CONSTANT countMax : INTEGER := 100000000; SIGNAL count : INTEGER RANGE 0 TO countMax := 0; BEGIN PROCESS (clk) BEGIN IF (clk'EVENT AND clk = '1') THEN inputFlipFlop <= inputFlipFlop(0) & Switch_0; IF (inputFlipFlop(0) /= inputFlipFlop(1)) THEN count <= 0; ELSIF (count < countMax) THEN count <= count + 1; ELSE LED_0 <= inputFlipFlop(1); END IF; END IF; END PROCESS; END Behavioral;

Save the file just in case - it's always a good idea to save your work!

Now we need to create an implementation constraints file to tell the system which pins are connected to the clock, switch and the LED.

Create an implementation constraints file using the same method used to create the VHDL source code.  Call it something sensible like switchDebounce.  Copy the code below into the file:

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
# This file is a .ucf for Mimas V2                                                                    #
# To use it in your project :                                                                         #
# * Remove or comment the lines corresponding to unused pins in the project                           #
# * Rename the used signals according to the your project                                             #
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#

#*****************************************************************************************************#
#                                            UCF for MIMAS V2 Spartan 6 Development Board             #
#*****************************************************************************************************#

CONFIG VCCAUX = "3.3" ;

   NET "CLK"      LOC = V10 | IOSTANDARD = LVCMOS33 | PERIOD = 100MHz;

#######################################################################################################
#                                              Push Buttons Switches                                  #
####################################################################################################### 
    NET "Switch_0"           LOC = M18   | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = FAST | PULLUP; 

#######################################################################################################
#                                                    LEDs                                             #
####################################################################################################### 
    NET "LED_0"              LOC = P15  | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = FAST ;


Now it's time to 'compile' the code into a bit file and upload it to the Mimas V2:


Click on the green 'implement top module' arrow and wait for the code to compile.  There should not be any errors or warnings.

Now connect up the Mimas V2 board to your computer via a suitable USB cable and then fire up the Mimas V2 configuration tool.  If you are using Linux then use the appropriate python tool - I don't use linux often....only so much time to learn new things at the moment!  Select the appropriate COM port for your board and then navigate to the project...select the newly created bin file and click program!


Once programming is complete you should see something similar to the following:


The more astute among us will notice that the LED starts high and is turned low when a button press is detected.  That is because the switches on the Mimas V2 board are active low....the code logic will need to be inverted in order to take the LED from low to high.  It's a simple enough edit.  We could also remove the seven segment display ghosting if needed...

That's all for now though people - more to come on this - next it's count the button press and display the result on the seven segment!

Hint change the line of code from LED_0 <= inputFlipFlop(1); to LED_0 <= not inputFlipFlop(1);


Wednesday, 15 June 2016

Linux on the Mimas V2

Recently I found out it's possible to run an embedded version of linux on the Mimas V2 FPGA development board.  I'm not the best person at using linux but I did manage to get it working.

It is thanks to a lot of hard work that has been performed the people at J2-Open Processor:

http://j-core.org/

In order to make use of it you will probably need to update your Mimas V2 programmer firmware to work at 115200 baud.  This is so that the serial communications from the Linux core will work at a reasonable rate.

In order to achieve that you will need a micro-SD card capable of storing a small linux image.  Get hold of a micro-sd card and then download vmlinux from the link below:

http://j-core.org/#vmlinux

Copy the file onto the micro-SD card.  Do not try to write it as an image....its not like a raspberry Pi
( I may have made this mistake - thanks for the help Goran! )

Next you will need to update the programming firmware on your Mimas V2 to work at 115200 baud.
The firmware update increases the speed of communication between the PIC microcontroller and the FPGA device to 115200 Baud which is what is needed to upload programs from the arduino IDE.

You will need to download the following things in order to update the firmware:


Hex file to update baud rate to 115200

*Warning* There is currently no firmware to return the Mimas V2 PIC Microcontroller to it's original state and the updated firmware is currently beta only - it does have some issues. These are being addressed but at the moment there is currently no way to return the PIC on the Mimas V2 board to its factory settings.

I have not found any issues from doing this upgrade as yet however.

When my version of the Mimas V2 FPGA development arrived as new it did not have some header pins soldered into P3 - So I had to solder some in. This is needed to perform the PIC firmware upgrade:


Mimas V2 FPGA Development board without Firmware Upgrade Header

Here is my board with the header pins soldered in:


Next you will need to short the pins together to put the PIC Microcontroller into firmware upgrade mode:



Connect up the Mimas V2 FPGA development board to your computer - it's time to update the PIC firmware! When you connect up the FPGA development board windows will install a generic USB driver for the PIC device - this is meant to happen.

Open the folder where the software has been downloaded and execute up the firmware downloader program, Ignore the standard windows warning message - the program is fine. You should see something similar to the image below:



Click on 'Open Hex File' and navigate to where the 115200 baud update file was extracted - it's called MimasV2W@115200Beta.hex:



Click 'Open' to continue and then click on 'Program/Verify':



If all went according to plan you should see the above message!

Once that has been done you can remove the programming link.  Now it's time to upload the bin file to the FPGA which will create a soft processor which then accesses the micro-SD card and runs a version of Linux.

Now we need to download the file below - it's the bin file for the FPGA which runs at 115200 baud and adds the soft processor to the FPGA etc


The upload it to the FPGA using the appropriate program - don't use linux so I use the MimasV2Config.exe program in Windows.  If you are using Linux then there are python scripts available.


Select the COM port associated with your Mimas V2 FPGA Development board - mine was COM 22:


Then click on 'Open File' and navigate to where the mimas_v2_115200.bin file is located:


Then Click program!


Once it has completed.  The FPGA will reboot and the seven segment display will go through a process.  At the end of the process it should look the like the picture below:


Next it is time to check all is working.  Move the programming direct switch SW7 over to the right - towards the VGA connector.  Then load up the serial terminal program of choice.  In my case I use RealTerm but in theory any serial terminal software 'should' work:

It is important to set the display to ANSI so ensure that spurious characters are not displayed.  In realTerm:


Then click on the port tab and set it to reflect the settings for the serial port on the Mimas:


Then when you are connected it should be possible to reboot the board by manipulating SW7:


Once it has completely booted the command line prompt should be displayed:


Type some commands in and check all is working!  I tried LS and DMESG etc.  All seemed to respond correctly.  I should be honest here and explain that my Linux skills are not as strong as they could be.  I use it when necessary.  I have only so much time and brain space available these days. When I have to learn something I do...I haven't 'had' to learn Linux command line stuff much yet!


I think to properly make use of this the Mimas needs an Ethernet port.  Something I was thinking of designing although I may try and cobble something together from a breakout module.  There are lots available to try.

That's all for now - take care - Langster!