SlideShare a Scribd company logo
1 of 32
Download to read offline
Porthcawl Comprehensive School
Lafarge Tarmac
	
  
	
  
	
  
	
  
“SMART	
  Early	
  Warning	
  System”	
  
Team: Andrew Philips (Team Leader)
Jack Bevan
Curtis Naughton
Jasmeen Dawes
Tom Parsons
Keiren Waring
Aneurin Weale
Matthew Williams
Engineer: Mr Phil Jones
Teacher: Mr Richard Lawson
March 2014
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
2	
  	
  
	
  
Contents
	
  
Contents..................................................................................................................................... 1	
  
Executive Summary................................................................................................................... 3	
  
Introduction ............................................................................................................................... 4	
  
Analysis of Problem .................................................................................................................. 5	
  
Research into Existing Technologies ........................................................................................ 6	
  
Capacitance	
  Sensing	
  ...........................................................................................................................	
  6	
  
Analog	
  Devices	
  ...................................................................................................................................	
  6	
  
Ultrasonic	
  range	
  finder	
  ......................................................................................................................	
  7	
  
Data Processing ......................................................................................................................... 8	
  
Procedure................................................................................................................................. 11	
  
Initial	
  Meeting	
  ..................................................................................................................................	
  11	
  
Research	
  ...........................................................................................................................................	
  11	
  
About	
  Tarmac	
  ...................................................................................................................................	
  12	
  
Site	
  visit	
  ............................................................................................................................................	
  13	
  
Final	
  Solution	
  ....................................................................................................................................	
  16	
  
Design Development ............................................................................................................... 17	
  
Hardware	
  ..........................................................................................................................................	
  17	
  
Python Scripts.......................................................................................................................... 19	
  
Prototype	
  Testing	
  .............................................................................................................................	
  24	
  
Results, Discussion and Evaluation......................................................................................... 26	
  
Environmental	
  Benefits	
  ....................................................................................................................	
  26	
  
Development	
  Costs	
  ..........................................................................................................................	
  27	
  
Cost	
  Benefits	
  ....................................................................................................................................	
  28	
  
Health	
  and	
  Safety	
  .............................................................................................................................	
  28	
  
Wider	
  Scope	
  of	
  Project	
  .....................................................................................................................	
  29	
  
Conclusion............................................................................................................................... 30	
  
Appendix ................................................................................................................................. 31	
  
	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
3	
  	
  
	
  
Executive	
  Summary	
  
	
  
In	
  the	
  world	
  of	
  business,	
  orders	
  must	
  be	
  fulfilled	
  in	
  a	
  timely,	
  efficient	
  and	
  cost	
  effective	
  
manner.	
  This	
  is	
  equally	
  true	
  in	
  the	
  field	
  of	
  engineering.	
  Business	
  success	
  can	
  be	
  me	
  made	
  or	
  
broken	
  on	
  the	
  strength	
  of	
  a	
  having	
  a	
  company	
  reputation	
  of	
  making	
  deliveries	
  on	
  time.	
  If	
  
orders	
  are	
  fulfilled	
  quickly	
  then	
  costs	
  can	
  also	
  be	
  controlled	
  and	
  savings	
  can	
  be	
  passed	
  on	
  to	
  
customers.	
  This	
  project	
  will	
  investigate	
  ways	
  in	
  which	
  the	
  manufacture	
  and	
  delivery	
  of	
  
asphalt	
  can	
  be	
  maintained	
  and	
  made	
  robust	
  to	
  ensure	
  customer	
  satisfaction.	
  
In	
  Asphalt	
  manufacture,	
  lime	
  stone	
  is	
  quarried,	
  crushed	
  and	
  mixed	
  with	
  Bitumen	
  and	
  stone	
  
dust	
  to	
  make	
  a	
  solid	
  and	
  robust	
  construction	
  material	
  for	
  the	
  laying	
  of	
  roads	
  and	
  
motorways.	
  In	
  the	
  case	
  of	
  Lafarge	
  Tarmac	
  at	
  Cornelly,	
  the	
  stone	
  is	
  quarried	
  on	
  site.	
  The	
  
bitumen	
  it	
  is	
  mixed	
  with	
  is	
  supplied	
  from	
  a	
  refinery	
  in	
  Birkenhead	
  and	
  stored	
  in	
  four	
  50,000	
  
litre	
  tanks.	
  The	
  stone	
  is	
  mixed	
  with	
  the	
  bitumen	
  as	
  the	
  product	
  is	
  required.	
  Clearly,	
  the	
  
supply	
  of	
  stone	
  is	
  in	
  abundance	
  thanks	
  to	
  the	
  onsite	
  quarry.	
  However,	
  the	
  bitumen	
  supply	
  
must	
  be	
  more	
  closely	
  monitored	
  to	
  ensure	
  a	
  constant	
  amount	
  is	
  on	
  site	
  to	
  meet	
  the	
  orders	
  
received.	
  Currently,	
  this	
  level	
  is	
  monitored	
  by	
  engineers	
  on	
  site.	
  This	
  is	
  a	
  laborious	
  and	
  time	
  
consuming	
  process	
  which	
  takes	
  manpower	
  that	
  could	
  be	
  usefully	
  employed	
  elsewhere.	
  A	
  
better	
  solution	
  would	
  be	
  an	
  automatic	
  system	
  that	
  could	
  alert	
  on	
  site	
  engineers	
  that	
  
supplies	
  are	
  being	
  depleted	
  so	
  orders	
  could	
  be	
  made	
  on	
  time.	
  This	
  would	
  ideally	
  take	
  the	
  
form	
  of	
  an	
  alert	
  being	
  sent	
  to	
  the	
  engineers	
  wherever	
  they	
  are	
  instead	
  of	
  valuable	
  staff	
  
being	
  limited	
  to	
  a	
  small	
  radius	
  around	
  the	
  tanks.	
  
This	
  project	
  will	
  outline	
  the	
  design,	
  prototyping	
  and	
  testing	
  of	
  a	
  low	
  cost	
  automatic	
  level	
  
warning	
  system	
  that	
  will	
  notify	
  staff	
  of	
  low	
  bitumen	
  levels	
  via	
  SMS	
  text	
  message.	
  This	
  will	
  
aim	
  to	
  deliver	
  improvements	
  in	
  efficiency,	
  cost	
  saving	
  and	
  will	
  also	
  provide	
  environmental	
  
benefits	
  through	
  a	
  small,	
  low	
  cost	
  and	
  easily	
  implemented	
  unit.	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
4	
  	
  
	
  
Introduction	
  
	
  
In	
  order	
  to	
  maximise	
  cost	
  savings	
  and	
  ensure	
  that	
  highest	
  customer	
  service	
  levels	
  are	
  
maintained	
  on	
  the	
  company’s	
  Asphalt	
  plants,	
  “full	
  loads”	
  of	
  bitumen	
  must	
  be	
  ordered	
  and	
  
delivered	
  on	
  time.	
  Predicting	
  how	
  much	
  to	
  order	
  and	
  when	
  is	
  currently	
  an	
  art	
  form	
  and	
  
needs	
  to	
  be	
  turned	
  into	
  a	
  science	
  if	
  costly	
  “part	
  loads”	
  are	
  to	
  be	
  eliminated.	
  Reducing	
  the	
  
number	
  of	
  part	
  loads	
  is	
  a	
  key	
  performance	
  indicator	
  for	
  the	
  asphalt	
  business	
  and	
  this	
  system	
  
will	
  help	
  reduce	
  cost	
  and	
  improve	
  safety	
  at	
  our	
  sites.	
  
The	
  project	
  aim	
  was	
  to	
  design	
  and	
  build	
  a	
  working	
  prototype	
  system	
  to	
  monitor	
  and	
  predict	
  
the	
  usage	
  of	
  bitumen	
  in	
  bitumen	
  storage	
  tanks	
  such	
  that	
  an	
  automated	
  	
  SMS	
  text	
  message	
  
will	
  be	
  generated	
  and	
  sent	
  	
  to	
  the	
  site	
  manager	
  (or	
  his/her	
  deputy)	
  alerting	
  him/her	
  	
  of	
  the	
  
need	
  to	
  re-­‐order	
  a	
  “full	
  load”	
  of	
  bitumen	
  on	
  a	
  given	
  date.	
  	
  
In	
  addition,	
  a	
  monthly	
  spreadsheet	
  will	
  also	
  be	
  generated	
  from	
  that	
  system	
  showing,	
  
bitumen	
  ordered,	
  dates	
  and	
  times	
  plus	
  cost	
  savings	
  as	
  compared	
  to	
  historical	
  data	
  in	
  the	
  
previous	
  financial	
  year	
  which	
  include	
  costly	
  and	
  unwanted	
  part	
  loads.	
  Additional	
  features	
  in	
  
the	
  software	
  and	
  reporting	
  will	
  also	
  be	
  required	
  and	
  these	
  will	
  be	
  discussed	
  with	
  the	
  team	
  
throughout	
  the	
  project	
  execution.	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
5	
  	
  
	
  
Analysis	
  of	
  Problem	
  
	
  
Scope:	
  To	
  design	
  and	
  manufacture	
  a	
  scaled	
  working	
  system	
  to	
  carry	
  out	
  the	
  following	
  functions:	
  
1. Monitor	
  	
  fluid	
  level	
  in	
  a	
  vertical	
  cylindrical	
  tank	
  and	
  predict	
  the	
  usage	
  to	
  a	
  pre-­‐determined	
  
level.	
  
2. At	
  that	
  pre-­‐determined	
  level,	
  an	
  alarm	
  will	
  be	
  triggered	
  sending	
  a	
  signal	
  to	
  a	
  PC	
  which	
  in	
  
turn	
  
	
   	
  will	
  send	
  out	
  an	
  SMS	
  text	
  message	
  to	
  the	
  site	
  managers’	
  mobile	
  phone.	
  The	
  message	
  will	
  be	
  	
  
	
   sent	
  only	
  between	
  the	
  hours	
  of	
  06:00am	
  and	
  18:00pm,	
  Mon-­‐Sat,	
  50	
  weeks	
  p.a.	
  The	
  message	
  
	
   	
  will	
  advise	
  the	
  manager	
  to	
  re-­‐order	
  a	
  full	
  load	
  of	
  fluid	
  (bitumen)to	
  maintain	
  stock	
  levels,	
  
	
   protect	
  plant	
  availability	
  and	
  customer	
  service	
  levels.	
  
3. In	
  any	
  event,	
  a	
  text	
  message	
  will	
  be	
  sent	
  if	
  no	
  bitumen	
  has	
  been	
  ordered	
  within	
  any	
  single	
  
	
   24	
  day	
  period	
  as	
  a	
  quality	
  requirement	
  to	
  refresh	
  the	
  stock	
  
4. A	
  monthly	
  spreadsheet	
  will	
  also	
  be	
  required	
  (in	
  Excel	
  format)	
  illustrating	
  how	
  many	
  loads	
  	
  
	
   were	
  flagged	
  up	
  via	
  text	
  message	
  during	
  any	
  particular	
  calendar	
  month	
  showing	
  the	
  total	
  	
  
	
   cost	
  of	
  those	
  loads	
  both	
  in	
  month	
  and	
  cumulative	
  timescales.	
  
5. The	
  same	
  spreadsheet	
  will	
  also	
  be	
  required	
  to	
  show	
  the	
  cost	
  saving	
  of	
  not	
  having	
  to	
  order	
  
	
   part	
  loads	
  in	
  the	
  month/year	
  (using	
  2012	
  historical	
  data	
  for	
  reference).	
  	
  
4No.Bitumen	
  Tanks
50,000L	
  Capacity	
  Each
To	
  Asphalt	
  Plant
Full
Refill
Empty
Level	
  indication	
  to	
  PC
SMS	
  text	
  
message	
  to	
  
manager	
  to	
  
re-­‐order	
  
bitumen
(At	
  pre-­‐ determined	
  
level)	
  
Text	
  message Produce	
  monthly	
  
Spreadsheet	
  showing	
  
savings
EESW	
  2013
	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
6	
  	
  
	
  
Research	
  into	
  Existing	
  Technologies	
  
	
  
Capacitance	
  Sensing	
  
	
  
Sensor	
  Technics	
  
With	
  over	
  20	
  years	
  of	
  extensive	
  experience	
  in	
  the	
  development	
  and	
  manufacture	
  of	
  unique	
  
optical	
  and	
  MEMS	
  sensor	
  solutions,	
  our	
  brand	
  portfolio	
  includes	
  strong	
  and	
  highly	
  
specialised	
  brands.	
  We	
  serve	
  custom	
  development	
  and	
  manufacturing	
  at	
  14	
  sites	
  around	
  
the	
  world.	
  
	
  
Analog	
  Devices	
  
Analog	
  Devices	
  offers	
  the	
  world’s	
  first	
  high-­‐precision,	
  fully	
  integrated	
  Capacitance-­‐to-­‐Digital	
  
Converters	
  (CDC),	
  that	
  address	
  the	
  complex	
  and	
  difficult	
  signal	
  processing	
  challenges	
  of	
  
direct	
  capacitance-­‐to-­‐digital	
  conversion.	
  The	
  award-­‐winning	
  Capacitance-­‐to-­‐Digital	
  
Converter	
  (CDC)	
  technology	
  enables	
  high	
  accuracy	
  capacitance	
  sensing	
  for	
  Industrial,	
  
Automotive,	
  and	
  Consumer	
  applications.	
  
	
  
http://www.analog.com/en/analog-­‐to-­‐digital-­‐converters/capacitance-­‐to-­‐digital-­‐
converters/products/index.html?gclid=CIGd2LS9yboCFfHItAodDXoAcw#Capacitive_to_Digi
tal_Converters	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
7	
  	
  
	
  
	
   	
  
Ultrasonic	
  range	
  finder	
  	
  
Ultrasonic	
  sensors	
  (also	
  known	
  as	
  transceivers	
  when	
  they	
  both	
  send	
  and	
  receive,	
  but	
  more	
  
generally	
  called	
  transducers)	
  work	
  on	
  a	
  principle	
  similar	
  to	
  radar	
  or	
  sonar	
  which	
  evaluates	
  
attributes	
  of	
  a	
  target	
  by	
  interpreting	
  the	
  echoes	
  from	
  radio	
  or	
  sound	
  waves	
  respectively.	
  
Ultrasonic	
  sensors	
  generate	
  high	
  frequency	
  sound	
  waves	
  and	
  evaluate	
  the	
  echo	
  which	
  is	
  
received	
  back	
  by	
  the	
  sensor.	
  Sensors	
  calculate	
  the	
  time	
  interval	
  between	
  sending	
  the	
  signal	
  
and	
  receiving	
  the	
  echo	
  to	
  determine	
  the	
  distance	
  to	
  an	
  object.	
  
This	
  technology	
  can	
  be	
  used	
  for	
  measuring	
  wind	
  speed	
  and	
  direction	
  (anemometer),	
  tank	
  or	
  
channel	
  level,	
  and	
  speed	
  through	
  air	
  or	
  water.	
  For	
  measuring	
  speed	
  or	
  direction	
  a	
  device	
  
uses	
  multiple	
  detectors	
  and	
  calculates	
  the	
  speed	
  from	
  the	
  relative	
  distances	
  to	
  particulates	
  
in	
  the	
  air	
  or	
  water.	
  To	
  measure	
  tank	
  or	
  channel	
  level,	
  the	
  sensor	
  measures	
  the	
  distance	
  to	
  
the	
  surface	
  of	
  the	
  fluid.	
  Further	
  applications	
  include:	
  humidifiers,	
  sonar,	
  medical	
  
ultrasonography,	
  burglar	
  alarms	
  and	
  non-­‐destructive	
  testing. Systems	
  typically	
  use	
  a	
  
transducer	
  which	
  generates	
  sound	
  waves	
  in	
  the	
  ultrasonic	
  range,	
  above	
  18,000	
  hertz,	
  by	
  
turning	
  electrical	
  energy	
  into	
  sound,	
  then	
  upon	
  receiving	
  the	
  echo	
  turn	
  the	
  sound	
  waves	
  
into	
  electrical	
  energy	
  which	
  can	
  be	
  measured	
  and	
  displayed.	
  
	
  
The	
  technology	
  is	
  limited	
  by	
  the	
  shapes	
  of	
  surfaces	
  and	
  the	
  density	
  or	
  consistency	
  of	
  the	
  
material.	
  Foam,	
  in	
  particular,	
  can	
  distort	
  surface	
  level	
  readings	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
8	
  	
  
	
  
	
  
	
  
	
  
	
  
Data	
  Processing	
  
i) Database	
  to	
  look	
  up/	
  convert	
  raw	
  data	
  into	
  usable	
  data	
  
Polyspot	
  -­‐	
  PolySpot's	
  information	
  management	
  solutions	
  can	
  be	
  used	
  to	
  extract	
  and	
  enrich	
  
raw	
  data,	
  so	
  that	
  these	
  data	
  can	
  be	
  used	
  by	
  and	
  distributed	
  to	
  users.	
  
Universal	
  and	
  long-­‐term	
  connectivity	
  -­‐	
  Connectivity	
  with	
  the	
  various	
  applications	
  that	
  a	
  
company	
  uses	
  is	
  essential	
  for	
  raw	
  data	
  collection.	
  With	
  a	
  library	
  of	
  over	
  100	
  application	
  
connectors,	
  ‘PolySpot	
  Silo	
  Breaker’	
  can	
  easily	
  be	
  connected	
  to	
  the	
  majority	
  of	
  market-­‐
standard	
  content	
  (DMS,	
  CMS,	
  WCMS,	
  DBMS,	
  web,	
  RSS),	
  guaranteeing	
  long-­‐term	
  access	
  from	
  
a	
  single	
  point	
  to	
  all	
  of	
  a	
  company's	
  applications.	
  
From	
  raw	
  data	
  to	
  enriched	
  information	
  -­‐	
  Freshly-­‐produced,	
  out-­‐of-­‐context	
  data	
  is	
  neither	
  
useful	
  nor	
  meaningful.	
  PolySpot	
  has	
  developed	
  conversion	
  and	
  semantic	
  enrichment	
  
modules	
  to	
  standardise	
  and	
  contextualise	
  raw	
  data	
  to	
  produce	
  information	
  that	
  can	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
9	
  	
  
	
  
instantly	
  be	
  used	
  by	
  a	
  range	
  of	
  different	
  search	
  services.	
  
In	
  order	
  to	
  combine	
  high	
  
information	
  availability	
  and	
  maximum	
  indexing	
  versatility,	
  PolySpot	
  has	
  developed	
  a	
  unique	
  
architecture,	
  capable	
  of	
  managing	
  a	
  variety	
  of	
  processes	
  in	
  both	
  synchronous	
  and	
  
asynchronous	
  mode.	
  
Shared	
  and	
  distributed	
  information	
  -­‐	
  Enriched	
  information	
  is	
  distributed	
  via	
  a	
  range	
  of	
  
different	
  search	
  services,	
  each	
  of	
  which	
  is	
  capable	
  of	
  providing	
  users	
  with	
  all	
  available	
  
information	
  from	
  a	
  single	
  interface.	
  PolySpot's	
  enterprise	
  search	
  applications	
  can	
  be	
  
adapted	
  to	
  suit	
  business-­‐specific	
  requirements,	
  with	
  unrivalled	
  configuration	
  and	
  display	
  
options	
  (simple	
  search	
  interface	
  configuration,	
  relevance	
  fine-­‐tuning,	
  specific	
  settings	
  based	
  
on	
  the	
  user's	
  profile	
  and	
  context)	
  and	
  intelligent	
  searching	
  and	
  browsing	
  functions	
  (auto-­‐
complete,	
  spelling	
  suggestion,	
  thesaurus/ontology	
  integration,	
  property-­‐based	
  browsing,	
  
multi-­‐view	
  management,	
  alerts,	
  collaborative	
  functions,	
  etc.).	
  
ii) Automatically	
  generate	
  a	
  text	
  based	
  on	
  information	
  
Text	
  Local	
  -­‐	
  Easily	
  text	
  important	
  information,	
  offers	
  &	
  alerts.	
  Attach	
  pictures,	
  files,	
  web-­‐
links	
  &	
  surveys.	
  
Text	
  local	
  help	
  over	
  102,383	
  businesses	
  send	
  up	
  to	
  40	
  million	
  messages	
  per	
  month.	
  Over	
  
the	
  last	
  seven	
  years,	
  Textlocal	
  have	
  been	
  at	
  the	
  forefront	
  of	
  business	
  mobile	
  messaging.	
  
Our	
  in-­‐house,	
  award	
  winning,	
  technical	
  team	
  like	
  nothing	
  better	
  than	
  to	
  innovate	
  and	
  
build	
  tools	
  optimized	
  for	
  delivery	
  on	
  mobile	
  phones	
  that	
  meet	
  real	
  business	
  needs.	
  We	
  
deal	
  with	
  businesses	
  every	
  day.	
  We	
  know	
  the	
  challenges	
  you	
  face	
  and	
  we	
  understand	
  
your	
  needs.	
  
Our	
  emphasis	
  is	
  on	
  efficiency,	
  integration	
  and	
  ease	
  of	
  use.	
  Our	
  Messenger	
  platform	
  has	
  
been	
  built	
  with	
  this	
  in	
  mind,	
  along	
  with	
  some	
  really	
  useful	
  added	
  extras	
  such	
  as	
  tracking,	
  
surveys,	
  attachments,	
  ticketing,	
  analytics,	
  campaign	
  management	
  tools	
  and	
  much	
  more.	
  
Our	
  ethos	
  encompasses	
  a	
  complete	
  dedication	
  to	
  exceeding	
  customer	
  expectations,	
  and	
  
this	
  has	
  been	
  highly	
  commended	
  by	
  industry	
  experts.	
  The	
  awards	
  have	
  just	
  kept	
  coming.	
  
We	
  have	
  been	
  listed	
  as	
  a	
  Media	
  Momentum	
  top	
  20	
  fastest	
  growing	
  digital	
  agency	
  across	
  
Europe	
  for	
  the	
  last	
  three	
  years,	
  won	
  a	
  Chamber	
  Business	
  Award	
  for	
  innovation,	
  a	
  DMA	
  
Honours	
  award	
  for	
  marketing	
  Innovation	
  and	
  also	
  shortlisted	
  for	
  the	
  best	
  marketing	
  
services	
  company.	
  This	
  adds	
  to	
  our	
  collection	
  including	
  Global	
  Messaging	
  Award	
  for	
  our	
  
exceptional	
  messaging	
  infrastructure,	
  and	
  Digital	
  and	
  Media	
  Entrepreneurs	
  of	
  the	
  year.	
  
Our	
  ever	
  growing	
  staff	
  base	
  is	
  made	
  up	
  of	
  passionate,	
  dedicated	
  people	
  who	
  believe	
  
completely	
  in	
  how	
  Textlocal	
  can	
  revolutionise	
  the	
  communication	
  structure	
  of	
  any	
  
business.	
  As	
  the	
  awards	
  keep	
  coming	
  in	
  and	
  our	
  customers	
  remain	
  extremely	
  satisfied,	
  
we	
  know	
  Textlocal	
  is	
  an	
  exciting	
  company	
  to	
  be	
  involved	
  with	
  on	
  any	
  level.	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
10	
  	
  
	
  
Twilio	
  SMS	
  -­‐	
  Send	
  &	
  receive	
  SMS	
  with	
  twilio	
  messaging	
  
Global	
  Text	
  Messaging	
  API	
  -­‐	
  Build	
  apps	
  that	
  send	
  and	
  receive	
  SMS	
  using	
  phone	
  numbers	
  
and	
  short	
  codes,	
  perfect	
  for	
  businesses	
  and	
  organisations.	
  The	
  API	
  enables	
  users	
  to	
  
communicate	
  with	
  their	
  app	
  and	
  send	
  messages	
  when	
  they	
  wish.	
  
Build	
  Intelligent	
  Communications	
  -­‐	
  Twilio	
  lets	
  you	
  use	
  standard	
  web	
  languages	
  to	
  build	
  
SMS	
  and	
  voice	
  applications.	
  We’re	
  connected	
  to	
  carrier	
  networks	
  globally	
  and	
  expose	
  
them	
  to	
  you	
  via	
  a	
  clean,	
  powerful	
  web	
  API.	
  So	
  bring	
  your	
  favorite	
  programming	
  
language,	
  a	
  web	
  server,	
  and	
  build	
  the	
  next	
  generation	
  of	
  communications	
  with	
  us.	
  
Cloud	
  Powered	
  -­‐	
  We’re	
  built	
  in	
  the	
  cloud.	
  Our	
  API	
  is	
  always	
  available,	
  continuously	
  upgraded	
  
and	
  auto-­‐scales	
  to	
  meet	
  your	
  needs.	
  When	
  you	
  move	
  your	
  communications	
  to	
  the	
  cloud,	
  
there	
  are	
  no	
  tricky	
  VPNs	
  to	
  configure	
  or	
  SMPP	
  binds	
  to	
  manage.	
  Just	
  send	
  us	
  your	
  message	
  
via	
  HTTP,	
  and	
  we’ll	
  deliver	
  it	
  anywhere	
  in	
  the	
  world.	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
11	
  	
  
	
  
Procedure	
  
	
  
Initial	
  Meeting	
  
We	
  first	
  met	
  Mr	
  Phil	
  Jones	
  at	
  the	
  Introduction	
  meeting	
  in	
  Bridgend	
  where	
  he	
  announced	
  
himself	
  as	
  our	
  Engineer.	
  Phil	
  introduced	
  himself	
  and	
  the	
  company	
  that	
  he	
  was	
  involved	
  in	
  
which	
  was	
  ‘Lafarge	
  Tarmac’.	
  He	
  then	
  went	
  on	
  to	
  explain	
  in	
  more	
  detail	
  what	
  kind	
  of	
  
company	
  Lafarge	
  was	
  and	
  the	
  sort	
  of	
  work	
  that	
  they	
  are	
  involved	
  in.	
  After	
  explaining	
  some	
  
details	
  about	
  the	
  company,	
  Phil	
  moved	
  onto	
  the	
  task	
  in	
  hand	
  which	
  was	
  the	
  project	
  to	
  be	
  
given	
  to	
  and	
  developed	
  by	
  our	
  team.	
  He	
  gave	
  us	
  the	
  definition	
  of	
  the	
  problem	
  and	
  helped	
  us	
  
to	
  visualise	
  this	
  by	
  giving	
  us	
  information	
  sheets	
  and	
  diagrams.	
  Phil	
  then	
  explained	
  in	
  more	
  
detail	
  the	
  type	
  of	
  solution	
  they	
  were	
  looking	
  for	
  and	
  why	
  this	
  solution	
  was	
  required.	
  We	
  
then	
  began	
  to	
  discuss	
  the	
  problem,	
  thinking	
  of	
  and	
  writing	
  down	
  key	
  features	
  that	
  the	
  
possible	
  solution	
  must	
  include	
  and	
  how	
  we	
  could	
  go	
  about	
  developing	
  these	
  solutions.	
  After	
  
a	
  lengthy	
  discussion,	
  we	
  felt	
  quite	
  confident	
  on	
  the	
  project	
  and	
  thought	
  that	
  a	
  suitable	
  
solution	
  was	
  quite	
  possible	
  and	
  therefore	
  were	
  looking	
  forward	
  to	
  working	
  with	
  Phil	
  and	
  
Lafarge.	
  Since	
  the	
  initial	
  discussion,	
  we	
  have	
  kept	
  in	
  touch	
  with	
  Phil	
  regularly	
  with	
  him	
  
attending	
  our	
  meetings	
  at	
  least	
  once	
  a	
  month.	
  With	
  the	
  purpose	
  of	
  these	
  visits	
  being	
  to	
  see	
  
the	
  progress	
  and	
  development	
  of	
  the	
  project	
  first-­‐hand	
  and	
  in	
  order	
  to	
  give	
  us	
  any	
  data,	
  
information	
  or	
  advice	
  that	
  we	
  may	
  have	
  requested	
  in	
  order	
  to	
  help	
  with	
  the	
  completion	
  of	
  
the	
  task.	
  Research	
  into	
  level	
  monitoring	
  
Research	
  
Through	
  the	
  course	
  of	
  seeking	
  the	
  best	
  solution	
  for	
  the	
  project,	
  a	
  large	
  amount	
  of	
  research	
  
was	
  conducted	
  by	
  the	
  team	
  members	
  into	
  the	
  different	
  types	
  of	
  systems	
  currently	
  in	
  use	
  for	
  
measuring	
  levels	
  of	
  fluids,	
  sending	
  text	
  messages	
  and	
  processing	
  data.	
  Many	
  of	
  these	
  were	
  
ruled	
  out	
  as	
  either	
  too	
  expensive	
  or	
  too	
  difficult	
  to	
  make.	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
12	
  	
  
	
  
About	
  Tarmac	
  
Lafarge	
  Tarmac	
  is	
  the	
  UK's	
  leading	
  supplier	
  of	
  aggregates	
  and	
  asphalt.	
  They	
  combine	
  
industry-­‐leading	
  innovation	
  with	
  an	
  unrivalled	
  supply	
  and	
  distribution	
  network	
  that	
  includes	
  
over	
  100	
  quarries,	
  70	
  dedicated	
  asphalt	
  plants	
  
and	
  70	
  recycling	
  operations.	
  Their	
  products	
  
meet	
  the	
  highest	
  standards	
  of	
  sustainability	
  and	
  
performance,	
  as	
  you	
  would	
  expect	
  from	
  a	
  
market	
  leader.	
  They	
  are	
  responsibly	
  sourced	
  
and	
  certified	
  to	
  BES	
  6001.	
  
Their	
  range	
  of	
  'Ultimate'	
  aggregate	
  and	
  asphalt	
  
solutions	
  have	
  been	
  designed	
  to	
  meet	
  the	
  daily	
  
challenges	
  faced	
  by	
  construction	
  professionals.	
  
These	
  specialist	
  solutions	
  help	
  their	
  customers	
  
deliver	
  outstanding	
  results	
  in	
  shorter	
  
timescales,	
  even	
  when	
  faced	
  with	
  challenging	
  
requirements	
  or	
  difficult	
  site	
  conditions.	
  
Asphalt	
  	
  (also	
  known	
  as	
  bitumen),	
  is	
  a	
  sticky,	
  
black	
  and	
  highly	
  viscous	
  liquid	
  or	
  semi-­‐solid	
  
form	
  of	
  petroleum.	
  It	
  may	
  be	
  found	
  in	
  natural	
  
deposits	
  or	
  may	
  be	
  a	
  refined	
  product;	
  it	
  is	
  a	
  
substance	
  classed	
  as	
  a	
  pitch.	
  Until	
  the	
  20th	
  
century,	
  the	
  term	
  asphaltum	
  was	
  also	
  used.	
  	
  
The	
  primary	
  use	
  (70%)	
  of	
  asphalt/bitumen	
  is	
  in	
  road	
  construction,	
  where	
  it	
  is	
  used	
  as	
  the	
  
glue	
  or	
  binder	
  mixed	
  with	
  aggregate	
  particles	
  to	
  create	
  asphalt	
  concrete.	
  Its	
  other	
  main	
  uses	
  
are	
  for	
  bituminous	
  waterproofing	
  products,	
  including	
  production	
  of	
  roofing	
  felt	
  and	
  for	
  
sealing	
  flat	
  roofs.	
  	
  
The	
  terms	
  asphalt	
  and	
  bitumen	
  are	
  often	
  used	
  interchangeably	
  to	
  mean	
  both	
  natural	
  and	
  
manufactured	
  forms	
  of	
  the	
  substance.	
  In	
  American	
  English,	
  asphalt	
  (or	
  asphalt	
  cement)	
  is	
  
the	
  carefully	
  refined	
  residue	
  from	
  the	
  distillation	
  process	
  of	
  selected	
  crude	
  oils.	
  Outside	
  the	
  
United	
  States,	
  the	
  product	
  is	
  often	
  called	
  bitumen.	
  Geological	
  terminology	
  often	
  prefers	
  the	
  
term	
  bitumen.	
  Common	
  usage	
  often	
  refers	
  to	
  various	
  forms	
  of	
  asphalt/bitumen	
  as	
  "tar",	
  
such	
  as	
  at	
  the	
  La	
  Brea	
  Tar	
  Pits.	
  Another	
  term,	
  mostly	
  archaic,	
  refers	
  to	
  asphalt/bitumen	
  as	
  
"pitch".	
  The	
  pitch	
  used	
  in	
  this	
  mixture	
  is	
  sometimes	
  found	
  in	
  natural	
  deposits	
  but	
  usually	
  
made	
  by	
  the	
  distillation	
  of	
  crude	
  oil.	
  
Naturally	
  occurring	
  asphalt/bitumen	
  is	
  sometimes	
  specified	
  by	
  the	
  term	
  "crude	
  bitumen".	
  
Its	
  viscosity	
  is	
  similar	
  to	
  that	
  of	
  cold	
  molasses	
  while	
  the	
  material	
  obtained	
  from	
  the	
  
fractional	
  distillation	
  of	
  crude	
  oil	
  [boiling	
  at	
  525	
  °C	
  (977	
  °F)	
  is	
  sometimes	
  referred	
  to	
  as	
  
"refined	
  bitumen".	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
13	
  	
  
	
  
At	
  the	
  site,	
  we	
  were	
  briefed	
  about	
  the	
  company’s	
  health	
  and	
  safety	
  guide,	
  which	
  is	
  a	
  prime	
  
concern	
  of	
  Lafarge	
  Tarmac.	
  Lafarge	
  Tarmac	
  is	
  keen	
  to	
  play	
  an	
  active	
  part	
  in	
  the	
  community	
  
and	
  encourage	
  schools	
  and	
  other	
  interested	
  groups	
  to	
  visit	
  their	
  sites	
  and	
  gain	
  firsthand	
  
knowledge	
  of	
  their	
  industry.	
  However,	
  quarries	
  and	
  other	
  areas	
  such	
  as	
  asphalt	
  plants	
  and	
  
recycling	
  depots	
  can	
  be	
  dangerous.	
  During	
  the	
  visit,	
  the	
  group	
  had	
  to	
  stay	
  together	
  under	
  
the	
  supervision	
  of	
  a	
  guide	
  provided	
  by	
  the	
  company.	
  
	
  
Site	
  visit	
  
We	
  were	
  invited	
  to	
  visit	
  the	
  Quarry	
  to	
  see	
  the	
  Bitumen	
  tanks	
  in	
  their	
  location	
  and	
  to	
  see	
  the	
  
kind	
  of	
  environment	
  in	
  which	
  they	
  the	
  system	
  would	
  be	
  installed.	
  	
  
	
  
This	
  was	
  a	
  potentially	
  hazardous	
  environment	
  which	
  meant	
  we	
  had	
  to	
  have	
  a	
  safety	
  lesson	
  
and	
  then	
  were	
  issued	
  with	
  protective	
  clothing	
  and	
  equipment.	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
14	
  	
  
	
  
	
  
When	
  we	
  went	
  out	
  into	
  the	
  quarry,	
  we	
  were	
  taken	
  to	
  the	
  Bitumen	
  tanks	
  in	
  the	
  minibus	
  with	
  
a	
  safety	
  car	
  escort	
  and	
  were	
  shown	
  how	
  the	
  bitumen	
  was	
  loaded	
  in	
  to	
  the	
  tanks	
  as	
  there	
  
was	
  a	
  delivery	
  taking	
  place	
  at	
  the	
  time.	
  
	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
15	
  	
  
	
  
We	
  were	
  then	
  taken	
  up	
  to	
  the	
  top	
  of	
  the	
  10m	
  tall	
  tanks	
  to	
  see	
  where	
  the	
  sensor	
  could	
  be	
  
installed.	
  
From	
  here	
  we	
  were	
  taken	
  around	
  the	
  entire	
  quarry	
  site	
  and	
  shown	
  how	
  Lafarge	
  Tarmac	
  first	
  
quarries	
  the	
  limestone,	
  treats	
  the	
  stone	
  and	
  finally	
  turns	
  it	
  into	
  asphalt	
  that	
  can	
  be	
  sent	
  all	
  
over	
  the	
  area	
  for	
  use	
  in	
  making	
  roads.	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
16	
  	
  
	
  
Final	
  Solution	
  
The	
  solution	
  we	
  decided	
  on	
  as	
  a	
  team	
  was	
  to	
  use	
  an	
  ultrasonic	
  transmitter/receiver	
  unit	
  
with	
  a	
  Raspberry	
  Pi	
  computer.	
  This	
  combination	
  gives	
  the	
  following	
  benefits:	
  
• The	
  chosen	
  sensor	
  is	
  very	
  low	
  cost.	
  We	
  obtained	
  ours	
  from	
  the	
  internet	
  for	
  
approximately	
  £2	
  
• The	
  Raspberry	
  Pi	
  is	
  a	
  low	
  cost	
  computing	
  option.	
  Approximately	
  £25.	
  
• The	
  software	
  code	
  that	
  we	
  have	
  implemented	
  is	
  very	
  flexible	
  and	
  can	
  be	
  changed	
  
easily	
  to:	
  
o Change	
  the	
  message	
  that	
  is	
  sent	
  
o Change	
  the	
  number	
  of	
  recipients	
  
o Change	
  the	
  number	
  of	
  massages	
  sent	
  
o Change	
  the	
  depth	
  at	
  which	
  the	
  message	
  is	
  triggered	
  
• The	
  device	
  can	
  be	
  implemented	
  any	
  number	
  of	
  times	
  across	
  the	
  site	
  with	
  very	
  small	
  
amounts	
  of	
  set	
  up	
  or	
  reconfiguration	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
17	
  	
  
	
  
Design	
  Development	
  
	
  
Once	
  the	
  technology	
  and	
  implementation	
  had	
  been	
  decided	
  on	
  we	
  had	
  to	
  build	
  the	
  system	
  
to	
  test	
  it	
  on	
  a	
  small	
  scale	
  in	
  the	
  laboratory.	
  The	
  equipment	
  had	
  been	
  ordered	
  from	
  the	
  
internet	
  and	
  the	
  software	
  code	
  was	
  being	
  written.	
  While	
  this	
  was	
  being	
  done,	
  the	
  hardware	
  
had	
  to	
  be	
  constructed	
  in	
  order	
  to	
  test	
  the	
  software	
  was	
  working	
  correctly.	
  The	
  software	
  and	
  
the	
  hardware	
  were	
  then	
  put	
  together	
  to	
  check	
  the	
  system	
  worked	
  and	
  then	
  put	
  through	
  a	
  
period	
  of	
  testing	
  to	
  ensure	
  consistent	
  operation.	
  
Hardware	
  
The	
  sensor	
  unit	
  was	
  a	
  basic	
  unit	
  with	
  ultrasonic	
  transmitter	
  and	
  receiver	
  built	
  onto	
  a	
  circuit	
  
board	
  with	
  a	
  small	
  amount	
  of	
  circuitry	
  (an	
  oscillator	
  and	
  timing	
  circuits	
  to	
  make	
  the	
  
ultrasonic	
  sound	
  waves	
  that	
  are	
  sent	
  by	
  the	
  transmitter).	
  
	
  
This	
  small	
  circuit	
  board	
  then	
  required	
  a	
  small	
  amount	
  of	
  circuitry	
  to	
  make	
  it	
  work	
  with	
  the	
  
raspberry	
  pi.	
  This	
  circuit	
  was	
  a	
  small	
  interface	
  system	
  to	
  ensure	
  that	
  the	
  voltage	
  provided	
  by	
  
the	
  raspberry	
  pi	
  was	
  correct	
  to	
  drive	
  the	
  sensor	
  and	
  the	
  signal	
  supplied	
  by	
  the	
  sensor	
  was	
  
correct	
  for	
  the	
  pi	
  to	
  be	
  able	
  to	
  understand.	
  
This	
  circuit	
  was	
  first	
  constructed	
  on	
  a	
  prototyping	
  board	
  to	
  ensure	
  correct	
  operation.	
  
	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
18	
  	
  
	
  
Once	
  this	
  circuit	
  was	
  tested	
  and	
  could	
  be	
  seen	
  to	
  work	
  reliably	
  it	
  was	
  soldered	
  onto	
  strip	
  
board	
  to	
  make	
  the	
  contacts	
  more	
  secure	
  and	
  resilient.	
  
	
  
This	
  circuit	
  could	
  then	
  be	
  mounted	
  in	
  a	
  case	
  to	
  protect	
  the	
  more	
  sensitive	
  parts	
  of	
  the	
  circuit	
  
from	
  damage.	
  The	
  sensor	
  was	
  interfaced	
  to	
  the	
  Raspberry	
  Pi	
  by	
  using	
  a	
  temporary	
  general	
  
input	
  output	
  break	
  out	
  board	
  (GPIO	
  board).	
  This	
  is	
  a	
  temporary	
  measure	
  and,	
  because	
  of	
  
the	
  nature	
  of	
  the	
  Pi,	
  these	
  contacts	
  could	
  be	
  made	
  directly	
  to	
  the	
  computer	
  board	
  by	
  
soldering.	
  However,	
  this	
  would	
  be	
  a	
  final	
  solution	
  and	
  not	
  for	
  development.	
  	
  
	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
19	
  	
  
	
  
Python	
  Scripts	
  
The	
  software	
  program	
  script	
  for	
  the	
  Raspberry	
  Pi	
  was	
  written	
  in	
  Python	
  code.	
  This	
  is	
  the	
  
main	
  programming	
  language	
  for	
  the	
  raspberry	
  pi	
  and	
  is	
  becoming	
  more	
  popular	
  among	
  
programmers	
  in	
  many	
  areas	
  of	
  computing.	
  
The	
  following	
  section	
  outlines	
  the	
  Python	
  programme	
  that	
  was	
  created	
  for	
  this	
  project.	
  
Unfortunately	
  the	
  formatting	
  has	
  not	
  been	
  retained	
  –	
  this	
  was	
  lost	
  when	
  exporting	
  the	
  
programme	
  file	
  from	
  the	
  Pi.	
  This	
  formatting	
  would	
  have	
  taken	
  the	
  form	
  of	
  indenting	
  
different	
  parts	
  of	
  the	
  program	
  in	
  order	
  to	
  group	
  sections	
  of	
  the	
  code	
  together.	
  
Some	
  annotation	
  is	
  included	
  in	
  the	
  text	
  in	
  the	
  form	
  of	
  comments.	
  These	
  comments	
  are	
  
preceded	
  by	
  a	
  hash	
  icon	
  (#).	
  This	
  is	
  the	
  standard	
  way	
  that	
  programmers	
  annotate	
  software	
  
to	
  keep	
  track	
  of	
  their	
  code.	
  The	
  hash	
  sign	
  tells	
  the	
  program	
  to	
  ignore	
  that	
  line	
  as	
  it	
  is	
  not	
  
part	
  of	
  the	
  program.	
  Annotation	
  has	
  been	
  added	
  in	
  the	
  boxes	
  on	
  the	
  right	
  of	
  the	
  page.	
  
Ultrasonic	
  distance	
  measure:	
  
import	
  time	
  
import	
  RPi.GPIO	
  as	
  GPIO	
  
	
  
def	
  measure():	
  
	
  	
  #	
  This	
  function	
  measures	
  a	
  distance	
  
	
  	
  GPIO.output(GPIO_TRIGGER,	
  True)	
  
	
  	
  time.sleep(0.00001)	
  
	
  	
  GPIO.output(GPIO_TRIGGER,	
  False)	
  
	
  	
  start	
  =	
  time.time()	
  
	
  	
  while	
  GPIO.input(GPIO_ECHO)==0:	
  
	
  	
  	
  	
  start	
  =	
  time.time()	
  
	
  	
  while	
  GPIO.input(GPIO_ECHO)==1:	
  
	
  	
  	
  	
  stop	
  =	
  time.time()	
  
	
  	
  elapsed	
  =	
  stop-­‐start	
  
	
  	
  distance	
  =	
  (elapsed	
  *	
  34300)/2	
  
	
  	
  return	
  distance	
  
def	
  measure_average():	
  
	
  	
  distance1=measure()	
  
	
  	
  time.sleep(0.1)	
  
Functions	
  such	
  as	
  the	
  General	
  
Purpose	
  Input	
  Output	
  library	
  
must	
  be	
  allocated	
  to	
  this	
  
program.	
  
This	
  section	
  of	
  the	
  code	
  is	
  how	
  
the	
  Pi	
  is	
  able	
  to	
  measure	
  
distance.	
  
The	
  Ultrasonic	
  unit	
  transmits	
  a	
  
pulse	
  of	
  high	
  frequency	
  sound	
  
waves	
  (GPIO	
  Trigger	
  True)	
  and	
  
then	
  starts	
  a	
  timer.	
  The	
  timer	
  is	
  
stopped	
  when	
  the	
  echo	
  is	
  
detected	
  at	
  the	
  sensor.	
  
This	
  equation	
  then	
  takes	
  the	
  
recorded	
  time	
  and	
  mulitplies	
  it	
  by	
  
the	
  speed	
  of	
  sound	
  in	
  air.	
  This	
  is	
  
approximately	
  34300	
  cm/s.	
  This	
  
number	
  is	
  then	
  divided	
  by	
  two	
  in	
  
order	
  to	
  find	
  the	
  distance	
  from	
  
the	
  sensor	
  to	
  the	
  surface	
  of	
  the	
  
liquid	
  –	
  not	
  the	
  total	
  path	
  length	
  
the	
  sound	
  wave	
  has	
  travelled.	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
20	
  	
  
	
  
	
  	
  distance2=measure()	
  
	
  	
  time.sleep(0.1)	
  
	
  	
  distance3=measure()	
  
	
  	
  distance	
  =	
  distance1	
  +	
  distance2	
  +	
  distance3	
  
	
  	
  distance	
  =	
  distance	
  /	
  3	
  
	
  	
  return	
  distance	
  
	
  
	
  
#	
  Main	
  Script	
  
#	
  Use	
  BCM	
  GPIO	
  references	
  
#	
  instead	
  of	
  physical	
  pin	
  numbers	
  
GPIO.setmode(GPIO.BCM)	
  
#	
  Define	
  GPIO	
  Pins	
  to	
  use	
  on	
  Pi	
  
GPIO_TRIGGER	
  =	
  23	
  
GPIO_ECHO	
  	
  	
  	
  =	
  24	
  
print	
  "Ultrasonic	
  Measurement"	
  
#	
  Set	
  pins	
  as	
  output	
  and	
  input	
  
GPIO.setup(GPIO_TRIGGER,GPIO.OUT)	
  	
  #	
  Trigger	
  
GPIO.setup(GPIO_ECHO,GPIO.IN)	
  	
  	
  	
  	
  	
  #	
  Echo	
  
#	
  Set	
  trigger	
  to	
  False	
  (Low)	
  
GPIO.output(GPIO_TRIGGER,	
  False)	
  
try:	
  
	
  	
  while	
  True:	
  
	
  	
  	
  	
  distance	
  =	
  measure_average()	
  
	
  	
  	
  	
  print	
  "Distance	
  :	
  %.1f"	
  %	
  distance	
  
	
  	
  	
  	
  time.sleep(1)	
  
	
  
#trigger	
  SMS1	
  when	
  distance	
  is	
  greater	
  than	
  40	
  cm	
  
if	
  distance	
  >	
  40:	
  
This	
  section	
  of	
  the	
  code	
  takes	
  
three	
  measurements	
  of	
  the	
  
distance	
  and	
  then	
  takes	
  anmean	
  
average	
  of	
  the	
  results.	
  This	
  helps	
  
in	
  making	
  the	
  measurement	
  
more	
  accurate.	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
This	
  section	
  of	
  the	
  code	
  begins	
  to	
  
define	
  the	
  levels	
  at	
  which	
  the	
  
alarms	
  will	
  be	
  raised.	
  This	
  will	
  be	
  
short	
  distances	
  set	
  for	
  our	
  model	
  
but	
  this	
  can	
  be	
  adjusted	
  very	
  
easily	
  for	
  any	
  size	
  of	
  tank	
  or	
  silo.	
  
	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
21	
  	
  
	
  
	
  	
  	
  	
  	
  	
  	
  	
  sms	
  
except	
  KeyboardInterrupt:	
  
	
  	
  #	
  User	
  pressed	
  CTRL-­‐C	
  
	
  	
  #	
  Reset	
  GPIO	
  settings	
  
	
  	
  GPIO.cleanup()	
  
def	
  SMS(	
  
Code	
  to	
  send	
  SMS	
  
#	
  Import	
  required	
  libraries	
  
import	
  urllib	
  	
  	
  	
  	
  	
  #	
  URL	
  functions	
  
import	
  urllib2	
  	
  	
  	
  	
  #	
  URL	
  functions	
  
#	
  Define	
  your	
  message	
  
message	
  =	
  'Refill	
  bitumen	
  tank	
  number	
  1	
  -­‐	
  Cornelly	
  
Quarry'	
  
#	
  Set	
  your	
  username	
  and	
  sender	
  name.	
  
username	
  =	
  'lawson.richard@hotmail.com'	
  
sender	
  =	
  'Porthcawl	
  EESW	
  Team	
  
#	
  Your	
  unique	
  hash	
  is	
  available	
  from	
  the	
  docs	
  page	
  
#	
  https://control.txtlocal.co.uk/docs/	
  
hash	
  =	
  
'86cee22e249d8e18f09bd0b7bed6821ea6c72cf1'	
  
#	
  Set	
  the	
  phone	
  number	
  	
  
numbers	
  =	
  ('447855272195')	
  
#	
  Set	
  flag	
  to	
  1	
  to	
  simulate	
  sending	
  
#	
  To	
  send	
  real	
  message	
  set	
  this	
  flag	
  to	
  0	
  
test_flag	
  =	
  1	
  
values	
  =	
  {'test'	
  	
  	
  	
  :	
  test_flag,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'uname'	
  	
  	
  :	
  username,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'hash'	
  	
  	
  	
  :	
  hash,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'message'	
  :	
  message,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'from'	
  	
  	
  	
  :	
  sender,	
  
CTRL-­‐C	
  is	
  the	
  standard	
  code	
  to	
  
interrupt	
  a	
  program	
  that	
  is	
  
running.	
  In	
  this	
  case	
  it	
  is	
  also	
  
being	
  used	
  to	
  reset	
  the	
  inputs	
  
and	
  outputs	
  of	
  the	
  Pi.	
  
	
  
This	
  section	
  of	
  the	
  code	
  will	
  send	
  
the	
  message	
  to	
  amobile	
  phone	
  
via	
  the	
  internet	
  service	
  “text	
  
local”.	
  This	
  service	
  was	
  selected	
  
as	
  it	
  enables	
  remote	
  and	
  
automatic	
  log	
  in	
  using	
  the	
  
provided	
  “Hash	
  Code”	
  
	
  
The	
  service	
  requires	
  a	
  
administrator	
  to	
  maintain	
  control	
  
of	
  the	
  system	
  so	
  our	
  teacher,	
  Mr	
  
Lawson	
  has	
  signed	
  in	
  with	
  his	
  
details,	
  
This	
  is	
  the	
  Hash	
  code	
  provided	
  by	
  
the	
  website	
  
This	
  script	
  can	
  send	
  text	
  
messages	
  to	
  individual	
  phones	
  or	
  
a	
  group	
  of	
  phones	
  numbers	
  if	
  
required.	
  This	
  is	
  where	
  the	
  phone	
  
number(s)	
  to	
  be	
  used	
  is	
  entered.	
  
	
  
As	
  text	
  messages	
  cost	
  money	
  to	
  
send	
  (10p)	
  then	
  we	
  have	
  included	
  
the	
  ability	
  to	
  simulate	
  sending	
  a	
  
text	
  for	
  testing	
  the	
  system	
  and	
  to	
  
keep	
  costs	
  to	
  a	
  minimum	
  during	
  
development.	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
22	
  	
  
	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'selectednums'	
  :	
  numbers	
  }	
  
	
  
url	
  =	
  'http://www.txtlocal.com/sendsmspost.php'	
  
postdata	
  =	
  urllib.urlencode(values)	
  
req	
  =	
  urllib2.Request(url,	
  postdata)	
  
print	
  'Attempt	
  to	
  send	
  SMS	
  ...	
  '	
  
try:	
  
	
  	
  response	
  =	
  urllib2.urlopen(req)	
  
	
  	
  response_url	
  =	
  response.geturl()	
  
	
  	
  if	
  response_url==url:	
  
	
  	
  	
  	
  print	
  'SMS	
  sent!'	
  
except	
  urllib2.URLError,	
  e:	
  
	
  	
  print	
  'Send	
  failed!'	
  
	
  	
  print	
  e.reason	
  
	
  
	
  
#	
  Import	
  required	
  libraries	
  
import	
  urllib	
  	
  	
  	
  	
  	
  #	
  URL	
  functions	
  
import	
  urllib2	
  	
  	
  	
  	
  #	
  URL	
  functions	
  
#	
  Define	
  your	
  message	
  
message	
  =	
  'URGENT!	
  –	
  Level	
  Low:	
  Refill	
  bitumen	
  tank	
  
number	
  1	
  -­‐	
  Cornelly	
  Quarry'	
  
#	
  Set	
  your	
  username	
  and	
  sender	
  name.	
  
username	
  =	
  'lawson.richard@hotmail.com'	
  
sender	
  =	
  'Porthcawl	
  EESW	
  Team’	
  
#	
  Your	
  unique	
  hash	
  is	
  available	
  from	
  the	
  docs	
  page	
  
#	
  https://control.txtlocal.co.uk/docs/	
  
hash	
  =	
  
'86cee22e249d8e18f09bd0b7bed6821ea6c72cf1'	
  
#	
  Set	
  the	
  phone	
  number	
  you	
  wish	
  to	
  send	
  
The	
  program	
  will	
  print	
  progress	
  
messages	
  on	
  the	
  screen	
  and	
  
confirmation	
  that	
  the	
  text	
  has	
  
been	
  sent.	
  This	
  is	
  mainly	
  for	
  the	
  
development	
  stage	
  as	
  during	
  
main	
  use	
  the	
  screen	
  will	
  not	
  be	
  
required.	
  
	
  
	
  
	
  
	
  
It	
  will	
  tell	
  us	
  if	
  the	
  send	
  has	
  failed	
  
or	
  succeeded.	
  This	
  works	
  even	
  in	
  
simulated	
  test	
  mode.	
  
	
  
	
  
	
  
This	
  section	
  of	
  the	
  program	
  is	
  a	
  
copy	
  and	
  repeat	
  of	
  the	
  previous	
  
section.	
  This	
  was	
  the	
  easiest	
  way	
  
to	
  enable	
  us	
  to	
  send	
  different	
  
messages	
  at	
  different	
  times.	
  This	
  
is	
  difficult	
  to	
  see	
  here	
  as	
  the	
  
indent	
  formatting	
  did	
  not	
  keep.	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
23	
  	
  
	
  
#	
  message	
  to.	
  
numbers	
  =	
  ('447855272195')	
  
#	
  Set	
  flag	
  to	
  1	
  to	
  simulate	
  sending	
  
#	
  To	
  send	
  real	
  message	
  set	
  this	
  flag	
  to	
  0	
  
test_flag	
  =	
  1	
  
values	
  =	
  {'test'	
  	
  	
  	
  :	
  test_flag,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'uname'	
  	
  	
  :	
  username,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'hash'	
  	
  	
  	
  :	
  hash,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'message'	
  :	
  message,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'from'	
  	
  	
  	
  :	
  sender,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'selectednums'	
  :	
  numbers	
  }	
  
url	
  =	
  'http://www.txtlocal.com/sendsmspost.php'	
  
postdata	
  =	
  urllib.urlencode(values)	
  
req	
  =	
  urllib2.Request(url,	
  postdata)	
  
	
  
print	
  'Attempt	
  to	
  send	
  SMS	
  ...	
  '	
  
try:	
  
	
  	
  response	
  =	
  urllib2.urlopen(req)	
  
	
  	
  response_url	
  =	
  response.geturl()	
  
	
  	
  if	
  response_url==url:	
  
	
  	
  	
  	
  print	
  'SMS	
  sent!'	
  
except	
  urllib2.URLError,	
  e:	
  
	
  	
  print	
  'Send	
  failed!'	
  
	
  	
  print	
  e.reason	
  
	
  
	
  
	
   	
  
Though	
  a	
  repeated	
  part	
  of	
  the	
  
program,	
  this	
  is	
  a	
  key	
  part	
  of	
  the	
  
operation.	
  This	
  function	
  can	
  be	
  
replicated	
  for	
  different	
  distances	
  
within	
  the	
  tank	
  allowing	
  early	
  
warning	
  messages	
  to	
  be	
  sent,	
  
emergency	
  low	
  level	
  messages	
  or	
  
test	
  messages.	
  
	
  
This	
  function	
  could	
  be	
  expanded	
  
by	
  the	
  company	
  at	
  any	
  point	
  and	
  
very	
  easily	
  to	
  enable	
  the	
  system	
  
to	
  become	
  more	
  flexible	
  
depending	
  on	
  changing	
  needs.	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
24	
  	
  
	
  
Prototype	
  Testing	
  
The	
  prototype	
  system	
  was	
  tested	
  on	
  a	
  small	
  scale.	
  The	
  site	
  where	
  this	
  system	
  would	
  
normally	
  be	
  used	
  is	
  a	
  very	
  dangerous	
  environment.	
  The	
  sensor	
  would	
  have	
  to	
  be	
  set	
  up	
  
inside	
  the	
  bitumen	
  tank	
  and	
  the	
  bitumen	
  is	
  held	
  at	
  a	
  very	
  high	
  temperature	
  to	
  make	
  sure	
  it	
  
remains	
  liquid.	
  This	
  raises	
  the	
  possibility	
  that	
  the	
  sensor	
  would	
  not	
  work	
  properly	
  in	
  his	
  
environment	
  but	
  this	
  is	
  impossible	
  for	
  us	
  to	
  test	
  within	
  the	
  scope	
  of	
  this	
  project.	
  
So,	
  to	
  test	
  the	
  concept	
  of	
  the	
  system	
  we	
  built	
  a	
  scale	
  model	
  of	
  the	
  bitumen	
  tank	
  on	
  site,	
  
scaled	
  the	
  trigger	
  thresholds	
  in	
  the	
  software	
  and	
  constructed	
  a	
  mount	
  to	
  hold	
  the	
  sensor	
  
unit	
  at	
  the	
  top	
  of	
  the	
  tank.	
  After	
  much	
  discussion	
  we	
  finally	
  selected	
  our	
  equipment	
  to	
  use	
  
for	
  our	
  testing	
  and	
  display	
  model.	
  The	
  first	
  step	
  in	
  building	
  our	
  model	
  was	
  ordering	
  the	
  
equipment.	
  Some	
  of	
  the	
  equipment	
  used	
  was	
  sourced	
  or	
  built	
  in	
  school.	
  For	
  example	
  the	
  
casing	
  for	
  our	
  raspberry	
  pi	
  was	
  found	
  and	
  then	
  modified	
  in	
  order	
  to	
  hold	
  the	
  pi	
  and	
  keep	
  it	
  
safe.	
  The	
  casing	
  for	
  the	
  ultrasonic	
  sensor	
  was	
  also	
  modified	
  to	
  hold	
  the	
  sensor.	
  
We	
  then	
  used	
  a	
  high	
  speed	
  drill	
  to	
  cut	
  a	
  hole	
  for	
  the	
  tap.	
  We	
  did	
  this	
  by	
  drilling	
  lots	
  of	
  holes	
  
close	
  together	
  and	
  then	
  pushing	
  the	
  plastic	
  out.	
  We	
  chose	
  to	
  do	
  it	
  this	
  way	
  as	
  it	
  had	
  the	
  
lowest	
  risk	
  of	
  the	
  plastic	
  splitting	
  as	
  we	
  were	
  cutting.	
  We	
  then	
  put	
  the	
  tap	
  in	
  place	
  making	
  
sure	
  to	
  use	
  the	
  gaskets	
  provided	
  to	
  stop	
  the	
  risk	
  of	
  leaking.	
  The	
  piping	
  was	
  then	
  attached.	
  
We	
  also	
  added	
  stickers	
  to	
  the	
  tanks	
  to	
  make	
  them	
  look	
  more	
  realistic.	
  We	
  have	
  also	
  used	
  a	
  
bubble	
  machine	
  in	
  order	
  to	
  make	
  the	
  liquid	
  look	
  like	
  its	
  hot.	
  
To	
  start	
  we	
  needed	
  a	
  container	
  to	
  hold	
  x	
  amount	
  of	
  (material)	
  so	
  before	
  building	
  an	
  actual	
  
physical	
  model	
  a	
  design	
  was	
  first	
  created	
  to	
  replicate	
  the	
  specification	
  given.	
  
First	
  purely	
  the	
  cylinder	
  and	
  base	
  were	
  created	
  with	
  the	
  measurements	
  of	
  (insert	
  
dimensions)	
  and	
  volume	
  of	
  (insert	
  volume)	
  as	
  shown	
  in	
  fig	
  1.	
  
	
  
Secondly	
  the	
  lid	
  was	
  designed	
  the	
  original	
  design	
  was	
  to	
  cover	
  the	
  entire	
  top	
  surface	
  as	
  
shown	
  in	
  fig	
  2.	
  However	
  later	
  design	
  proved	
  that	
  due	
  to	
  the	
  use	
  of	
  sonar	
  as	
  the	
  method	
  of	
  
measurement	
  it	
  was	
  better	
  to	
  have	
  a	
  half	
  covered	
  surface	
  to	
  avoid	
  any	
  echo	
  or	
  at	
  least	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
25	
  	
  
	
  
avoid	
  most	
  to	
  give	
  more	
  reliable	
  results	
  when	
  measuring	
  the	
  volume	
  of	
  liquid	
  in	
  the	
  
container.	
  
The	
  final	
  result	
  with	
  the	
  sonar	
  device	
  is	
  as	
  shown	
  in	
  fig	
  3.	
  	
  	
  
	
  
Using	
  this	
  rig,	
  the	
  tank	
  was	
  filled	
  and	
  drained	
  many	
  times.	
  First	
  the	
  rig	
  was	
  tested	
  with	
  the	
  
test	
  flag	
  set	
  in	
  the	
  software.	
  This	
  meant	
  that	
  the	
  levels	
  could	
  be	
  monitored	
  and	
  the	
  
computer	
  would	
  signal	
  that	
  a	
  text	
  message	
  would	
  be	
  sent.	
  Once	
  this	
  was	
  working	
  
successfully,	
  the	
  test	
  flag	
  could	
  be	
  removed	
  and	
  so	
  the	
  system	
  would	
  send	
  real	
  text	
  
messages	
  over	
  the	
  internet.	
  This	
  was	
  first	
  done	
  for	
  members	
  of	
  the	
  team	
  and	
  our	
  teacher.	
  
Then	
  we	
  attempted	
  to	
  send	
  a	
  series	
  of	
  texts	
  to	
  our	
  Engineer,	
  Mr	
  Jones	
  by	
  simply	
  changing	
  
the	
  water	
  level	
  in	
  the	
  test	
  tank.	
  This	
  was	
  a	
  great	
  success	
  and	
  showed	
  that	
  the	
  system	
  was	
  
reliable	
  in	
  sending	
  the	
  messages.	
  
The	
  only	
  problem	
  we	
  encountered	
  at	
  this	
  stage	
  was	
  that	
  occasionally,	
  the	
  system	
  would	
  
send	
  two	
  or	
  three	
  text	
  messages	
  in	
  a	
  row	
  instead	
  of	
  a	
  single	
  text.	
  The	
  reason	
  for	
  this	
  is	
  
unknown	
  but	
  the	
  problem	
  of	
  sending	
  too	
  many	
  text	
  messages	
  is	
  better	
  than	
  not	
  sending	
  
any.	
  
	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
26	
  	
  
	
  
Results,	
  Discussion	
  and	
  Evaluation	
  
The	
  benefits	
  of	
  this	
  system	
  being	
  implemented	
  in	
  the	
  Tarmac	
  company	
  are	
  broad	
  and	
  far	
  
reaching.	
  This	
  section	
  will	
  aim	
  to	
  summarise	
  the	
  main	
  points	
  that	
  will	
  benefit	
  the	
  company.	
  
Environmental	
  Benefits	
  
As	
  the	
  bitumen	
  used	
  is	
  ordered	
  and	
  so	
  delivered	
  from	
  Birkenhead,	
  this	
  obviously	
  has	
  an	
  
impact	
  on	
  the	
  environment	
  as	
  a	
  whole.	
  The	
  tanker	
  lorries	
  that	
  deliver	
  the	
  bitumen	
  to	
  site	
  
have	
  to	
  travel	
  231	
  miles	
  (371	
  km)	
  on	
  their	
  journey	
  from	
  Birkenhead	
  to	
  Cornelly	
  Quarry.	
  This	
  
is	
  an	
  unavoidable	
  journey	
  but	
  still	
  causes	
  a	
  significant	
  CO2	
  contribution	
  to	
  atmospheric	
  
pollution.	
  The	
  following	
  table	
  shows	
  how,	
  on	
  average	
  vehicles	
  contribute	
  to	
  global	
  warming	
  
with	
  CO2	
  emissions:	
  
	
  
Bitumen	
  is	
  delivered	
  in	
  25	
  tonne	
  loads	
  by	
  large	
  tanker	
  trucks.	
  Depending	
  on	
  the	
  size	
  of	
  the	
  
truck	
  and	
  engine	
  being	
  used,	
  the	
  CO2	
  produced	
  is	
  generally	
  between	
  3.0	
  and	
  3.9	
  
kg/tonne/km.	
  
If	
  we	
  take	
  an	
  average	
  pollution	
  rate	
  of	
  3.4	
  kg/tonne/km	
  then	
  we	
  can	
  calculate	
  the	
  pollution	
  
per	
  journey	
  as	
  follows:	
  
	
  
This	
  will	
  be	
  consistent	
  for	
  the	
  371	
  km	
  journey	
  so	
  will	
  generate:	
  
Total	
  kg	
  per	
  journey	
  	
   =	
  371	
  km	
  x	
  3.4	
  kg/km	
  
	
   	
   	
   =	
  1,261	
  kg	
  of	
  CO2	
  per	
  journey	
  
Although	
  the	
  tanker	
  will	
  have	
  unloaded	
  the	
  25	
  tonnes	
  of	
  liquid	
  at	
  Cornelly,	
  the	
  return	
  
journey	
  must	
  also	
  be	
  factored	
  in	
  as	
  this	
  is	
  an	
  inevitable	
  part	
  of	
  the	
  process.	
  	
  
	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
27	
  	
  
	
  
Total	
  kg	
  per	
  delivery	
  	
   =	
  1,261	
  x	
  2	
  
	
   	
   	
   =	
  2,523	
  kg	
  	
  
	
  
It	
  is	
  estimated	
  by	
  the	
  company	
  that	
  unnecessary	
  part	
  loads	
  are	
  ordered	
  on	
  average	
  10	
  times	
  
each	
  year.	
  This	
  is	
  the	
  type	
  of	
  journey	
  that	
  is	
  caused	
  by	
  poor	
  level	
  control	
  and	
  so	
  the	
  type	
  of	
  
pollution	
  our	
  system	
  will	
  aim	
  to	
  eliminate.	
  So	
  the	
  total	
  unnecessary	
  CO2	
  generated	
  per	
  year:	
  
	
  
Total	
  CO2	
  per	
  year	
  	
   =	
  2,523	
  kg	
  x	
  10	
  
	
   	
   	
   =	
  25,230	
  kg	
  CO2	
  per	
  year	
  
This	
  is	
  a	
  very	
  large	
  amount	
  of	
  pollution	
  that	
  could	
  be	
  reduced	
  very	
  simply	
  by	
  implementing	
  
our	
  device.	
  
	
  
Development	
  Costs	
  
	
  
The	
  costs	
  of	
  developing	
  this	
  system	
  were	
  actually	
  very	
  small.	
  The	
  Raspberry	
  Pi	
  computer	
  
generally	
  retails	
  for	
  about	
  £25.	
  The	
  Ultrasonic	
  transceiver	
  costs	
  approximately	
  £2.	
  The	
  cases	
  
and	
  hardware	
  were	
  surplus	
  to	
  requirements	
  and	
  so	
  were	
  free	
  to	
  the	
  project	
  though	
  
normally	
  they	
  would	
  cost	
  less	
  than	
  £10	
  in	
  total.	
  The	
  actual	
  cost	
  to	
  create	
  this	
  system	
  in	
  a	
  
form	
  that	
  could	
  be	
  used	
  therefore	
  is	
  about	
  £40	
  in	
  total.	
  
However,	
  there	
  were	
  more	
  costs	
  involved	
  in	
  development	
  than	
  merely	
  constructing	
  the	
  
system.	
  The	
  test	
  rig	
  and	
  tanks	
  were	
  the	
  single	
  biggest	
  expense.	
  These	
  alone	
  cost	
  £136.	
  This	
  
seems	
  like	
  a	
  very	
  large	
  expenditure	
  when	
  compared	
  to	
  the	
  rest	
  of	
  the	
  system	
  but	
  it	
  was	
  
considered	
  important	
  to	
  have	
  a	
  test	
  system	
  that	
  was	
  similar	
  in	
  shape	
  and	
  scale	
  dimensions	
  
to	
  the	
  actual	
  storage	
  tanks	
  on	
  site.	
  
The	
  text	
  messaging	
  service	
  used,	
  “Text	
  Local”	
  is	
  a	
  py	
  per	
  use	
  service.	
  It	
  is	
  free	
  to	
  register	
  and	
  
gain	
  an	
  account.	
  This	
  account	
  even	
  comes	
  with	
  £10	
  of	
  free	
  text	
  messages.	
  As	
  testing	
  
continued,	
  we	
  began	
  to	
  run	
  out	
  of	
  text	
  messages.	
  We	
  contacted	
  the	
  text	
  service	
  providers	
  
and	
  explained	
  the	
  idea	
  behind	
  the	
  EESW	
  scheme	
  and	
  they	
  agreed	
  to	
  provide	
  us	
  with	
  a	
  
further	
  50	
  text	
  message	
  credits	
  with	
  the	
  offer	
  of	
  more	
  if	
  this	
  did	
  not	
  prove	
  sufficient.	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
28	
  	
  
	
  
Cost	
  Benefits	
  
	
  
The	
  cost	
  benefits	
  to	
  this	
  system	
  are	
  very	
  significant.	
  These	
  benefits	
  can	
  be	
  outlined	
  as	
  
follows:	
  
A	
  full	
  tank	
  of	
  bitumen	
  delivered	
  from	
  Birkenhead	
  is	
  25	
  tonnes	
  at	
  £550	
  per	
  tonne.	
  
This	
  means	
  that	
  each	
  tanker	
  load	
  costs	
  £13,750.	
  
If	
  a	
  part	
  load	
  is	
  required,	
  these	
  loads	
  are	
  15	
  tonnes.	
  	
  However,	
  the	
  cost	
  of	
  this	
  delivery	
  is	
  still	
  
£13,750.	
  Effectively	
  the	
  company	
  is	
  charged	
  a	
  premium	
  if	
  the	
  tanker	
  is	
  not	
  full.	
  It	
  is	
  
therefore	
  in	
  the	
  companies	
  best	
  interest	
  to	
  ensure	
  that	
  only	
  full	
  loads	
  are	
  being	
  ordered.	
  
Each	
  time	
  this	
  happens,	
  although	
  the	
  tanker	
  is	
  delivering	
  10	
  tonnes	
  less	
  than	
  normal,	
  the	
  
company	
  is	
  still	
  charged	
  for	
  these	
  10	
  missing	
  tonnes	
  at	
  £550/tonne.	
  So	
  the	
  company	
  pays	
  
£5,500	
  for	
  bitumen	
  it	
  does	
  not	
  receive.	
  	
  
As	
  mentioned	
  above,	
  this	
  is	
  estimated	
  to	
  happen	
  currently	
  approximately	
  10	
  times	
  each	
  
year.	
  This	
  equates	
  to	
  £5,500	
  per	
  tank.	
  Cornelly	
  has	
  4	
  tanks	
  so	
  this	
  could	
  be	
  as	
  much	
  as	
  
£22,000	
  per	
  site.	
  
Cornelly	
  also	
  has	
  smaller	
  tanks	
  than	
  other	
  sites	
  in	
  the	
  company.	
  Some	
  quarry	
  sites	
  have	
  100	
  
tonne	
  tanks	
  instead	
  of	
  50	
  tonnes	
  tanks.	
  This	
  will	
  therefore	
  increase	
  the	
  amount	
  of	
  wasted	
  
journeys	
  and	
  money.	
  
The	
  cost	
  benefits	
  are	
  also	
  more	
  widespread	
  than	
  straight	
  forward	
  purchasing.	
  The	
  fact	
  that	
  
the	
  system	
  will	
  be	
  automatic	
  enables	
  an	
  engineer	
  to	
  be	
  redeployed	
  elsewhere	
  on	
  site	
  
instead	
  of	
  having	
  to	
  monitor	
  tank	
  levels.	
  This	
  will	
  help	
  the	
  site	
  to	
  run	
  more	
  efficiently	
  and	
  
more	
  productively.	
  
The	
  increased	
  productivity	
  and	
  efficiency	
  will	
  also	
  enable	
  the	
  company	
  to	
  maintain	
  better	
  
relationships	
  with	
  their	
  clients	
  and	
  will	
  be	
  able	
  to	
  fulfil	
  more	
  orders	
  more	
  quickly	
  and	
  will	
  
therefore	
  help	
  to	
  grow	
  their	
  business	
  and	
  reputation.	
  
	
  
Health	
  and	
  Safety	
  
	
  
This	
  system	
  also	
  delivers	
  safety	
  benefits.	
  Each	
  time	
  the	
  lorry	
  driver	
  discharges	
  a	
  tanker	
  load	
  
of	
  bitumen,	
  he	
  is	
  exposed	
  to	
  liquids	
  held	
  at	
  temperatures	
  in	
  excess	
  of	
  120	
  o
C.	
  This	
  means	
  he	
  
must	
  wear	
  special	
  safety	
  clothing	
  and	
  runs	
  the	
  risk	
  of	
  accidental	
  spills.	
  He	
  is	
  also	
  exposed	
  to	
  
the	
  fumes	
  and	
  gases	
  given	
  off	
  by	
  such	
  a	
  dangerous	
  and	
  volatile	
  substance.	
  
	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
29	
  	
  
	
  
Wider	
  Scope	
  of	
  Project	
  
	
  
By	
  the	
  time	
  this	
  project	
  had	
  been	
  finished	
  and	
  tested	
  to	
  prove	
  it	
  worked,	
  we	
  began	
  to	
  
realise	
  the	
  full	
  potential	
  of	
  this	
  project.	
  While	
  this	
  has	
  been	
  demonstrated	
  to	
  be	
  a	
  huge	
  
benefit	
  to	
  Lafarge	
  Tarmac	
  in	
  the	
  remote	
  monitoring	
  of	
  Bitumen	
  level,	
  it	
  could	
  be	
  used	
  
anywhere	
  a	
  level	
  in	
  a	
  container	
  needs	
  to	
  be	
  monitored.	
  
For	
  example,	
  any	
  liquid,	
  not	
  just	
  bitumen,	
  could	
  be	
  monitored.	
  This	
  could	
  include	
  any	
  type	
  
of	
  fluid	
  required	
  in	
  manufacturing,	
  chemicals	
  in	
  industrial	
  plants,	
  ingredients	
  in	
  food	
  
manufacturing,	
  petrol/diesel	
  levels	
  in	
  mass	
  storage	
  tanks	
  or	
  petrol	
  stations	
  or	
  water	
  in	
  
swimming	
  pools.	
  The	
  list	
  of	
  liquids	
  that	
  could	
  be	
  measured	
  is	
  literally	
  endless.	
  
As	
  this	
  system	
  is	
  ultrasonic,	
  it	
  does	
  not	
  necessarily	
  have	
  to	
  be	
  a	
  liquid	
  to	
  be	
  measured.	
  This	
  
would	
  work	
  equally	
  well	
  in	
  a	
  farms	
  grain	
  silo,	
  a	
  bread	
  factory’s	
  flour	
  silo	
  or	
  building	
  sites	
  for	
  
monitoring	
  sand	
  or	
  cement	
  powder	
  in	
  the	
  construction	
  industry.	
  
This	
  could	
  also	
  be	
  a	
  very	
  important	
  way	
  of	
  helping	
  people	
  in	
  developing	
  countries.	
  For	
  
example,	
  this	
  device	
  could	
  be	
  installed	
  in	
  a	
  drinking	
  water	
  well	
  and	
  could	
  alert	
  people	
  of	
  
falling	
  water	
  levels	
  so	
  that	
  help	
  can	
  be	
  sought	
  or	
  contingency	
  plans	
  could	
  be	
  put	
  in	
  place.	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
30	
  	
  
	
  
Conclusion	
  
	
  
The	
  unit	
  designed	
  fulfilled	
  the	
  design	
  brief	
  in	
  operation.	
  It	
  has	
  proved	
  able	
  to	
  detect	
  the	
  
level	
  of	
  liquid	
  within	
  a	
  large	
  tank	
  with	
  a	
  high	
  degree	
  of	
  accuracy.	
  It	
  has	
  also	
  proved	
  to	
  be	
  
reliable	
  and	
  issued	
  at	
  least	
  one	
  text	
  message	
  each	
  time	
  the	
  liquid	
  threshold	
  levels	
  were	
  
reached.	
  Occasionally	
  more	
  than	
  one	
  SMS	
  was	
  transmitted	
  but	
  as	
  previously	
  mentioned	
  this	
  
was	
  not	
  seen	
  as	
  an	
  issue	
  as	
  the	
  message	
  would	
  still	
  have	
  got	
  through	
  to	
  the	
  engineer.	
  
The	
  greatest	
  area	
  of	
  success	
  which	
  we	
  did	
  not	
  originally	
  intend	
  to	
  be	
  so	
  great	
  was	
  the	
  
proven	
  cost	
  saving	
  that	
  this	
  small	
  unit	
  could,	
  and	
  will	
  achieve.	
  These	
  are	
  complimented	
  by	
  
huge	
  savings	
  in	
  environmental	
  factors	
  such	
  as	
  CO2	
  output	
  and	
  the	
  benefit	
  to	
  the	
  perception	
  
of	
  the	
  company	
  by	
  clients	
  and	
  competitors.	
  
As	
  previously	
  mentioned	
  this	
  project	
  has	
  the	
  potential	
  to	
  help	
  wider	
  industry	
  and	
  is	
  not	
  just	
  
limited	
  to	
  bitumen	
  monitoring	
  in	
  the	
  manufacture	
  of	
  asphalt.	
  As	
  a	
  team,	
  we	
  have	
  designed,	
  
developed	
  and	
  delivered	
  a	
  robust	
  solution	
  to	
  a	
  very	
  challenging	
  problem.	
  This	
  design	
  has	
  
been	
  built	
  and	
  tested	
  and	
  has	
  shown	
  that	
  it	
  can	
  work	
  reliably.	
  	
  
The	
  main	
  limitation	
  of	
  the	
  system	
  developed	
  so	
  far	
  is	
  that	
  it	
  cannot	
  at	
  present	
  be	
  installed	
  
on	
  site.	
  For	
  this	
  to	
  take	
  place	
  it	
  would	
  have	
  to	
  be	
  formally	
  tested	
  for	
  Electromagnetic	
  
Compatibility,	
  safety	
  testing	
  and	
  would	
  need	
  to	
  be	
  ruggedized	
  to	
  make	
  sure	
  it	
  will	
  withstand	
  
the	
  harsh	
  environments	
  on	
  site.	
  
However,	
  this	
  would	
  be	
  a	
  relatively	
  small	
  investment	
  and	
  as	
  such,	
  this	
  device	
  has	
  shown	
  
that	
  it	
  can	
  provide	
  very	
  substantial	
  cost	
  saving,	
  enormous	
  environmental	
  benefits	
  and	
  can	
  
be	
  used	
  in	
  many	
  different	
  situations.	
  
	
   	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
31	
  	
  
	
  
Appendix	
  
	
  
The	
  following	
  appendix	
  shows	
  examples	
  of	
  the	
  systems	
  that	
  were	
  used	
  to	
  ensure	
  the	
  work	
  was	
  
completed	
  in	
  an	
  orderly	
  and	
  timely	
  manner.	
  
Porthcawl	
  Comprehensive	
  School	
   March,	
  2014	
  
32	
  	
  
	
  
Action	
  Log	
  
This	
  spreadsheet	
  shows	
  an	
  early	
  example	
  of	
  the	
  progress	
  log	
  that	
  was	
  used	
  to	
  keep	
  track	
  of	
  tasks	
  
within	
  the	
  team	
  and	
  to	
  keep	
  our	
  Engineer	
  informed.	
  
	
  
	
  
	
  
	
  

More Related Content

Similar to Project Report Porthcawl Comprehensive School

Design and implementation of a computerized goods transportation system
Design and implementation of a computerized goods transportation systemDesign and implementation of a computerized goods transportation system
Design and implementation of a computerized goods transportation systemOvercomer Michael
 
ENGINEERING PROJECT – CONVEYOR BLOCKAGE DETECTION
ENGINEERING PROJECT – CONVEYOR BLOCKAGE DETECTIONENGINEERING PROJECT – CONVEYOR BLOCKAGE DETECTION
ENGINEERING PROJECT – CONVEYOR BLOCKAGE DETECTIONAll Assignment Experts
 
Planning and developing a records center
Planning and developing a records center Planning and developing a records center
Planning and developing a records center Dhani Ahmad
 
TechDataPackLaneProject
TechDataPackLaneProjectTechDataPackLaneProject
TechDataPackLaneProjectAlex Robinson
 
CEMEX_SeniorDesignPosterUpdate4.21.3.pptx
CEMEX_SeniorDesignPosterUpdate4.21.3.pptxCEMEX_SeniorDesignPosterUpdate4.21.3.pptx
CEMEX_SeniorDesignPosterUpdate4.21.3.pptxArda Onkol
 
Smart logistics solutions are a great fit for the building materials industry
Smart logistics solutions are a great fit for the building materials industrySmart logistics solutions are a great fit for the building materials industry
Smart logistics solutions are a great fit for the building materials industryVivien Cheong
 
IRJET - Literature Survey on Smart Bin that Segregates and Measures the W...
IRJET -  	  Literature Survey on Smart Bin that Segregates and Measures the W...IRJET -  	  Literature Survey on Smart Bin that Segregates and Measures the W...
IRJET - Literature Survey on Smart Bin that Segregates and Measures the W...IRJET Journal
 
ORTEC Customer Case Liebensteiner Kartonagenwerk GmbH
ORTEC Customer Case  Liebensteiner Kartonagenwerk GmbHORTEC Customer Case  Liebensteiner Kartonagenwerk GmbH
ORTEC Customer Case Liebensteiner Kartonagenwerk GmbHAndrei Pinte
 
System Integration White Paper
System Integration White PaperSystem Integration White Paper
System Integration White PaperGarrett Guinn
 
ARCHIMATE Physical layer "My Little PanCake Factory"
ARCHIMATE Physical layer "My Little PanCake Factory"ARCHIMATE Physical layer "My Little PanCake Factory"
ARCHIMATE Physical layer "My Little PanCake Factory"COMPETENSIS
 
Concept Tanks PFAS Storage & Containment
Concept Tanks PFAS Storage & ContainmentConcept Tanks PFAS Storage & Containment
Concept Tanks PFAS Storage & ContainmentAndrew Bilton
 
Study on Different Mechanism for Congestion Control in Real Time Traffic for ...
Study on Different Mechanism for Congestion Control in Real Time Traffic for ...Study on Different Mechanism for Congestion Control in Real Time Traffic for ...
Study on Different Mechanism for Congestion Control in Real Time Traffic for ...IRJET Journal
 
How to Increase Throughput Using Buffer Zones and Accumulation
How to Increase Throughput Using Buffer Zones and AccumulationHow to Increase Throughput Using Buffer Zones and Accumulation
How to Increase Throughput Using Buffer Zones and AccumulationNercon
 
Quintiq SCM CIO Seminar -20120922-1
Quintiq SCM CIO Seminar -20120922-1Quintiq SCM CIO Seminar -20120922-1
Quintiq SCM CIO Seminar -20120922-1Ralph Yin
 
Shipgenie 1 Shipping Software | Online Shipping Management | Web Based Shipping
Shipgenie 1 Shipping Software | Online Shipping Management | Web Based ShippingShipgenie 1 Shipping Software | Online Shipping Management | Web Based Shipping
Shipgenie 1 Shipping Software | Online Shipping Management | Web Based ShippingShipgenie
 
Localisation workflows: the impact of process well-handledness on automation
Localisation workflows: the impact of process well-handledness on automationLocalisation workflows: the impact of process well-handledness on automation
Localisation workflows: the impact of process well-handledness on automationNicolas Martinez
 

Similar to Project Report Porthcawl Comprehensive School (20)

Design and implementation of a computerized goods transportation system
Design and implementation of a computerized goods transportation systemDesign and implementation of a computerized goods transportation system
Design and implementation of a computerized goods transportation system
 
Eka-stockpile-optimization-article
Eka-stockpile-optimization-articleEka-stockpile-optimization-article
Eka-stockpile-optimization-article
 
11 2016 jit-dumping_ss360
11 2016 jit-dumping_ss36011 2016 jit-dumping_ss360
11 2016 jit-dumping_ss360
 
EGR 590 Final GM
EGR 590 Final GM EGR 590 Final GM
EGR 590 Final GM
 
ENGINEERING PROJECT – CONVEYOR BLOCKAGE DETECTION
ENGINEERING PROJECT – CONVEYOR BLOCKAGE DETECTIONENGINEERING PROJECT – CONVEYOR BLOCKAGE DETECTION
ENGINEERING PROJECT – CONVEYOR BLOCKAGE DETECTION
 
Planning and developing a records center
Planning and developing a records center Planning and developing a records center
Planning and developing a records center
 
TechDataPackLaneProject
TechDataPackLaneProjectTechDataPackLaneProject
TechDataPackLaneProject
 
CEMEX_SeniorDesignPosterUpdate4.21.3.pptx
CEMEX_SeniorDesignPosterUpdate4.21.3.pptxCEMEX_SeniorDesignPosterUpdate4.21.3.pptx
CEMEX_SeniorDesignPosterUpdate4.21.3.pptx
 
Smart logistics solutions are a great fit for the building materials industry
Smart logistics solutions are a great fit for the building materials industrySmart logistics solutions are a great fit for the building materials industry
Smart logistics solutions are a great fit for the building materials industry
 
IRJET - Literature Survey on Smart Bin that Segregates and Measures the W...
IRJET -  	  Literature Survey on Smart Bin that Segregates and Measures the W...IRJET -  	  Literature Survey on Smart Bin that Segregates and Measures the W...
IRJET - Literature Survey on Smart Bin that Segregates and Measures the W...
 
ORTEC Customer Case Liebensteiner Kartonagenwerk GmbH
ORTEC Customer Case  Liebensteiner Kartonagenwerk GmbHORTEC Customer Case  Liebensteiner Kartonagenwerk GmbH
ORTEC Customer Case Liebensteiner Kartonagenwerk GmbH
 
System Integration White Paper
System Integration White PaperSystem Integration White Paper
System Integration White Paper
 
Feed weighing systems
Feed weighing systemsFeed weighing systems
Feed weighing systems
 
ARCHIMATE Physical layer "My Little PanCake Factory"
ARCHIMATE Physical layer "My Little PanCake Factory"ARCHIMATE Physical layer "My Little PanCake Factory"
ARCHIMATE Physical layer "My Little PanCake Factory"
 
Concept Tanks PFAS Storage & Containment
Concept Tanks PFAS Storage & ContainmentConcept Tanks PFAS Storage & Containment
Concept Tanks PFAS Storage & Containment
 
Study on Different Mechanism for Congestion Control in Real Time Traffic for ...
Study on Different Mechanism for Congestion Control in Real Time Traffic for ...Study on Different Mechanism for Congestion Control in Real Time Traffic for ...
Study on Different Mechanism for Congestion Control in Real Time Traffic for ...
 
How to Increase Throughput Using Buffer Zones and Accumulation
How to Increase Throughput Using Buffer Zones and AccumulationHow to Increase Throughput Using Buffer Zones and Accumulation
How to Increase Throughput Using Buffer Zones and Accumulation
 
Quintiq SCM CIO Seminar -20120922-1
Quintiq SCM CIO Seminar -20120922-1Quintiq SCM CIO Seminar -20120922-1
Quintiq SCM CIO Seminar -20120922-1
 
Shipgenie 1 Shipping Software | Online Shipping Management | Web Based Shipping
Shipgenie 1 Shipping Software | Online Shipping Management | Web Based ShippingShipgenie 1 Shipping Software | Online Shipping Management | Web Based Shipping
Shipgenie 1 Shipping Software | Online Shipping Management | Web Based Shipping
 
Localisation workflows: the impact of process well-handledness on automation
Localisation workflows: the impact of process well-handledness on automationLocalisation workflows: the impact of process well-handledness on automation
Localisation workflows: the impact of process well-handledness on automation
 

Project Report Porthcawl Comprehensive School

  • 1. Porthcawl Comprehensive School Lafarge Tarmac         “SMART  Early  Warning  System”   Team: Andrew Philips (Team Leader) Jack Bevan Curtis Naughton Jasmeen Dawes Tom Parsons Keiren Waring Aneurin Weale Matthew Williams Engineer: Mr Phil Jones Teacher: Mr Richard Lawson March 2014
  • 2. Porthcawl  Comprehensive  School   March,  2014   2       Contents   Contents..................................................................................................................................... 1   Executive Summary................................................................................................................... 3   Introduction ............................................................................................................................... 4   Analysis of Problem .................................................................................................................. 5   Research into Existing Technologies ........................................................................................ 6   Capacitance  Sensing  ...........................................................................................................................  6   Analog  Devices  ...................................................................................................................................  6   Ultrasonic  range  finder  ......................................................................................................................  7   Data Processing ......................................................................................................................... 8   Procedure................................................................................................................................. 11   Initial  Meeting  ..................................................................................................................................  11   Research  ...........................................................................................................................................  11   About  Tarmac  ...................................................................................................................................  12   Site  visit  ............................................................................................................................................  13   Final  Solution  ....................................................................................................................................  16   Design Development ............................................................................................................... 17   Hardware  ..........................................................................................................................................  17   Python Scripts.......................................................................................................................... 19   Prototype  Testing  .............................................................................................................................  24   Results, Discussion and Evaluation......................................................................................... 26   Environmental  Benefits  ....................................................................................................................  26   Development  Costs  ..........................................................................................................................  27   Cost  Benefits  ....................................................................................................................................  28   Health  and  Safety  .............................................................................................................................  28   Wider  Scope  of  Project  .....................................................................................................................  29   Conclusion............................................................................................................................... 30   Appendix ................................................................................................................................. 31        
  • 3. Porthcawl  Comprehensive  School   March,  2014   3       Executive  Summary     In  the  world  of  business,  orders  must  be  fulfilled  in  a  timely,  efficient  and  cost  effective   manner.  This  is  equally  true  in  the  field  of  engineering.  Business  success  can  be  me  made  or   broken  on  the  strength  of  a  having  a  company  reputation  of  making  deliveries  on  time.  If   orders  are  fulfilled  quickly  then  costs  can  also  be  controlled  and  savings  can  be  passed  on  to   customers.  This  project  will  investigate  ways  in  which  the  manufacture  and  delivery  of   asphalt  can  be  maintained  and  made  robust  to  ensure  customer  satisfaction.   In  Asphalt  manufacture,  lime  stone  is  quarried,  crushed  and  mixed  with  Bitumen  and  stone   dust  to  make  a  solid  and  robust  construction  material  for  the  laying  of  roads  and   motorways.  In  the  case  of  Lafarge  Tarmac  at  Cornelly,  the  stone  is  quarried  on  site.  The   bitumen  it  is  mixed  with  is  supplied  from  a  refinery  in  Birkenhead  and  stored  in  four  50,000   litre  tanks.  The  stone  is  mixed  with  the  bitumen  as  the  product  is  required.  Clearly,  the   supply  of  stone  is  in  abundance  thanks  to  the  onsite  quarry.  However,  the  bitumen  supply   must  be  more  closely  monitored  to  ensure  a  constant  amount  is  on  site  to  meet  the  orders   received.  Currently,  this  level  is  monitored  by  engineers  on  site.  This  is  a  laborious  and  time   consuming  process  which  takes  manpower  that  could  be  usefully  employed  elsewhere.  A   better  solution  would  be  an  automatic  system  that  could  alert  on  site  engineers  that   supplies  are  being  depleted  so  orders  could  be  made  on  time.  This  would  ideally  take  the   form  of  an  alert  being  sent  to  the  engineers  wherever  they  are  instead  of  valuable  staff   being  limited  to  a  small  radius  around  the  tanks.   This  project  will  outline  the  design,  prototyping  and  testing  of  a  low  cost  automatic  level   warning  system  that  will  notify  staff  of  low  bitumen  levels  via  SMS  text  message.  This  will   aim  to  deliver  improvements  in  efficiency,  cost  saving  and  will  also  provide  environmental   benefits  through  a  small,  low  cost  and  easily  implemented  unit.      
  • 4. Porthcawl  Comprehensive  School   March,  2014   4       Introduction     In  order  to  maximise  cost  savings  and  ensure  that  highest  customer  service  levels  are   maintained  on  the  company’s  Asphalt  plants,  “full  loads”  of  bitumen  must  be  ordered  and   delivered  on  time.  Predicting  how  much  to  order  and  when  is  currently  an  art  form  and   needs  to  be  turned  into  a  science  if  costly  “part  loads”  are  to  be  eliminated.  Reducing  the   number  of  part  loads  is  a  key  performance  indicator  for  the  asphalt  business  and  this  system   will  help  reduce  cost  and  improve  safety  at  our  sites.   The  project  aim  was  to  design  and  build  a  working  prototype  system  to  monitor  and  predict   the  usage  of  bitumen  in  bitumen  storage  tanks  such  that  an  automated    SMS  text  message   will  be  generated  and  sent    to  the  site  manager  (or  his/her  deputy)  alerting  him/her    of  the   need  to  re-­‐order  a  “full  load”  of  bitumen  on  a  given  date.     In  addition,  a  monthly  spreadsheet  will  also  be  generated  from  that  system  showing,   bitumen  ordered,  dates  and  times  plus  cost  savings  as  compared  to  historical  data  in  the   previous  financial  year  which  include  costly  and  unwanted  part  loads.  Additional  features  in   the  software  and  reporting  will  also  be  required  and  these  will  be  discussed  with  the  team   throughout  the  project  execution.      
  • 5. Porthcawl  Comprehensive  School   March,  2014   5       Analysis  of  Problem     Scope:  To  design  and  manufacture  a  scaled  working  system  to  carry  out  the  following  functions:   1. Monitor    fluid  level  in  a  vertical  cylindrical  tank  and  predict  the  usage  to  a  pre-­‐determined   level.   2. At  that  pre-­‐determined  level,  an  alarm  will  be  triggered  sending  a  signal  to  a  PC  which  in   turn      will  send  out  an  SMS  text  message  to  the  site  managers’  mobile  phone.  The  message  will  be       sent  only  between  the  hours  of  06:00am  and  18:00pm,  Mon-­‐Sat,  50  weeks  p.a.  The  message      will  advise  the  manager  to  re-­‐order  a  full  load  of  fluid  (bitumen)to  maintain  stock  levels,     protect  plant  availability  and  customer  service  levels.   3. In  any  event,  a  text  message  will  be  sent  if  no  bitumen  has  been  ordered  within  any  single     24  day  period  as  a  quality  requirement  to  refresh  the  stock   4. A  monthly  spreadsheet  will  also  be  required  (in  Excel  format)  illustrating  how  many  loads       were  flagged  up  via  text  message  during  any  particular  calendar  month  showing  the  total       cost  of  those  loads  both  in  month  and  cumulative  timescales.   5. The  same  spreadsheet  will  also  be  required  to  show  the  cost  saving  of  not  having  to  order     part  loads  in  the  month/year  (using  2012  historical  data  for  reference).     4No.Bitumen  Tanks 50,000L  Capacity  Each To  Asphalt  Plant Full Refill Empty Level  indication  to  PC SMS  text   message  to   manager  to   re-­‐order   bitumen (At  pre-­‐ determined   level)   Text  message Produce  monthly   Spreadsheet  showing   savings EESW  2013  
  • 6. Porthcawl  Comprehensive  School   March,  2014   6       Research  into  Existing  Technologies     Capacitance  Sensing     Sensor  Technics   With  over  20  years  of  extensive  experience  in  the  development  and  manufacture  of  unique   optical  and  MEMS  sensor  solutions,  our  brand  portfolio  includes  strong  and  highly   specialised  brands.  We  serve  custom  development  and  manufacturing  at  14  sites  around   the  world.     Analog  Devices   Analog  Devices  offers  the  world’s  first  high-­‐precision,  fully  integrated  Capacitance-­‐to-­‐Digital   Converters  (CDC),  that  address  the  complex  and  difficult  signal  processing  challenges  of   direct  capacitance-­‐to-­‐digital  conversion.  The  award-­‐winning  Capacitance-­‐to-­‐Digital   Converter  (CDC)  technology  enables  high  accuracy  capacitance  sensing  for  Industrial,   Automotive,  and  Consumer  applications.     http://www.analog.com/en/analog-­‐to-­‐digital-­‐converters/capacitance-­‐to-­‐digital-­‐ converters/products/index.html?gclid=CIGd2LS9yboCFfHItAodDXoAcw#Capacitive_to_Digi tal_Converters  
  • 7. Porthcawl  Comprehensive  School   March,  2014   7           Ultrasonic  range  finder     Ultrasonic  sensors  (also  known  as  transceivers  when  they  both  send  and  receive,  but  more   generally  called  transducers)  work  on  a  principle  similar  to  radar  or  sonar  which  evaluates   attributes  of  a  target  by  interpreting  the  echoes  from  radio  or  sound  waves  respectively.   Ultrasonic  sensors  generate  high  frequency  sound  waves  and  evaluate  the  echo  which  is   received  back  by  the  sensor.  Sensors  calculate  the  time  interval  between  sending  the  signal   and  receiving  the  echo  to  determine  the  distance  to  an  object.   This  technology  can  be  used  for  measuring  wind  speed  and  direction  (anemometer),  tank  or   channel  level,  and  speed  through  air  or  water.  For  measuring  speed  or  direction  a  device   uses  multiple  detectors  and  calculates  the  speed  from  the  relative  distances  to  particulates   in  the  air  or  water.  To  measure  tank  or  channel  level,  the  sensor  measures  the  distance  to   the  surface  of  the  fluid.  Further  applications  include:  humidifiers,  sonar,  medical   ultrasonography,  burglar  alarms  and  non-­‐destructive  testing. Systems  typically  use  a   transducer  which  generates  sound  waves  in  the  ultrasonic  range,  above  18,000  hertz,  by   turning  electrical  energy  into  sound,  then  upon  receiving  the  echo  turn  the  sound  waves   into  electrical  energy  which  can  be  measured  and  displayed.     The  technology  is  limited  by  the  shapes  of  surfaces  and  the  density  or  consistency  of  the   material.  Foam,  in  particular,  can  distort  surface  level  readings  
  • 8. Porthcawl  Comprehensive  School   March,  2014   8               Data  Processing   i) Database  to  look  up/  convert  raw  data  into  usable  data   Polyspot  -­‐  PolySpot's  information  management  solutions  can  be  used  to  extract  and  enrich   raw  data,  so  that  these  data  can  be  used  by  and  distributed  to  users.   Universal  and  long-­‐term  connectivity  -­‐  Connectivity  with  the  various  applications  that  a   company  uses  is  essential  for  raw  data  collection.  With  a  library  of  over  100  application   connectors,  ‘PolySpot  Silo  Breaker’  can  easily  be  connected  to  the  majority  of  market-­‐ standard  content  (DMS,  CMS,  WCMS,  DBMS,  web,  RSS),  guaranteeing  long-­‐term  access  from   a  single  point  to  all  of  a  company's  applications.   From  raw  data  to  enriched  information  -­‐  Freshly-­‐produced,  out-­‐of-­‐context  data  is  neither   useful  nor  meaningful.  PolySpot  has  developed  conversion  and  semantic  enrichment   modules  to  standardise  and  contextualise  raw  data  to  produce  information  that  can  
  • 9. Porthcawl  Comprehensive  School   March,  2014   9       instantly  be  used  by  a  range  of  different  search  services.  
In  order  to  combine  high   information  availability  and  maximum  indexing  versatility,  PolySpot  has  developed  a  unique   architecture,  capable  of  managing  a  variety  of  processes  in  both  synchronous  and   asynchronous  mode.   Shared  and  distributed  information  -­‐  Enriched  information  is  distributed  via  a  range  of   different  search  services,  each  of  which  is  capable  of  providing  users  with  all  available   information  from  a  single  interface.  PolySpot's  enterprise  search  applications  can  be   adapted  to  suit  business-­‐specific  requirements,  with  unrivalled  configuration  and  display   options  (simple  search  interface  configuration,  relevance  fine-­‐tuning,  specific  settings  based   on  the  user's  profile  and  context)  and  intelligent  searching  and  browsing  functions  (auto-­‐ complete,  spelling  suggestion,  thesaurus/ontology  integration,  property-­‐based  browsing,   multi-­‐view  management,  alerts,  collaborative  functions,  etc.).   ii) Automatically  generate  a  text  based  on  information   Text  Local  -­‐  Easily  text  important  information,  offers  &  alerts.  Attach  pictures,  files,  web-­‐ links  &  surveys.   Text  local  help  over  102,383  businesses  send  up  to  40  million  messages  per  month.  Over   the  last  seven  years,  Textlocal  have  been  at  the  forefront  of  business  mobile  messaging.   Our  in-­‐house,  award  winning,  technical  team  like  nothing  better  than  to  innovate  and   build  tools  optimized  for  delivery  on  mobile  phones  that  meet  real  business  needs.  We   deal  with  businesses  every  day.  We  know  the  challenges  you  face  and  we  understand   your  needs.   Our  emphasis  is  on  efficiency,  integration  and  ease  of  use.  Our  Messenger  platform  has   been  built  with  this  in  mind,  along  with  some  really  useful  added  extras  such  as  tracking,   surveys,  attachments,  ticketing,  analytics,  campaign  management  tools  and  much  more.   Our  ethos  encompasses  a  complete  dedication  to  exceeding  customer  expectations,  and   this  has  been  highly  commended  by  industry  experts.  The  awards  have  just  kept  coming.   We  have  been  listed  as  a  Media  Momentum  top  20  fastest  growing  digital  agency  across   Europe  for  the  last  three  years,  won  a  Chamber  Business  Award  for  innovation,  a  DMA   Honours  award  for  marketing  Innovation  and  also  shortlisted  for  the  best  marketing   services  company.  This  adds  to  our  collection  including  Global  Messaging  Award  for  our   exceptional  messaging  infrastructure,  and  Digital  and  Media  Entrepreneurs  of  the  year.   Our  ever  growing  staff  base  is  made  up  of  passionate,  dedicated  people  who  believe   completely  in  how  Textlocal  can  revolutionise  the  communication  structure  of  any   business.  As  the  awards  keep  coming  in  and  our  customers  remain  extremely  satisfied,   we  know  Textlocal  is  an  exciting  company  to  be  involved  with  on  any  level.      
  • 10. Porthcawl  Comprehensive  School   March,  2014   10       Twilio  SMS  -­‐  Send  &  receive  SMS  with  twilio  messaging   Global  Text  Messaging  API  -­‐  Build  apps  that  send  and  receive  SMS  using  phone  numbers   and  short  codes,  perfect  for  businesses  and  organisations.  The  API  enables  users  to   communicate  with  their  app  and  send  messages  when  they  wish.   Build  Intelligent  Communications  -­‐  Twilio  lets  you  use  standard  web  languages  to  build   SMS  and  voice  applications.  We’re  connected  to  carrier  networks  globally  and  expose   them  to  you  via  a  clean,  powerful  web  API.  So  bring  your  favorite  programming   language,  a  web  server,  and  build  the  next  generation  of  communications  with  us.   Cloud  Powered  -­‐  We’re  built  in  the  cloud.  Our  API  is  always  available,  continuously  upgraded   and  auto-­‐scales  to  meet  your  needs.  When  you  move  your  communications  to  the  cloud,   there  are  no  tricky  VPNs  to  configure  or  SMPP  binds  to  manage.  Just  send  us  your  message   via  HTTP,  and  we’ll  deliver  it  anywhere  in  the  world.    
  • 11. Porthcawl  Comprehensive  School   March,  2014   11       Procedure     Initial  Meeting   We  first  met  Mr  Phil  Jones  at  the  Introduction  meeting  in  Bridgend  where  he  announced   himself  as  our  Engineer.  Phil  introduced  himself  and  the  company  that  he  was  involved  in   which  was  ‘Lafarge  Tarmac’.  He  then  went  on  to  explain  in  more  detail  what  kind  of   company  Lafarge  was  and  the  sort  of  work  that  they  are  involved  in.  After  explaining  some   details  about  the  company,  Phil  moved  onto  the  task  in  hand  which  was  the  project  to  be   given  to  and  developed  by  our  team.  He  gave  us  the  definition  of  the  problem  and  helped  us   to  visualise  this  by  giving  us  information  sheets  and  diagrams.  Phil  then  explained  in  more   detail  the  type  of  solution  they  were  looking  for  and  why  this  solution  was  required.  We   then  began  to  discuss  the  problem,  thinking  of  and  writing  down  key  features  that  the   possible  solution  must  include  and  how  we  could  go  about  developing  these  solutions.  After   a  lengthy  discussion,  we  felt  quite  confident  on  the  project  and  thought  that  a  suitable   solution  was  quite  possible  and  therefore  were  looking  forward  to  working  with  Phil  and   Lafarge.  Since  the  initial  discussion,  we  have  kept  in  touch  with  Phil  regularly  with  him   attending  our  meetings  at  least  once  a  month.  With  the  purpose  of  these  visits  being  to  see   the  progress  and  development  of  the  project  first-­‐hand  and  in  order  to  give  us  any  data,   information  or  advice  that  we  may  have  requested  in  order  to  help  with  the  completion  of   the  task.  Research  into  level  monitoring   Research   Through  the  course  of  seeking  the  best  solution  for  the  project,  a  large  amount  of  research   was  conducted  by  the  team  members  into  the  different  types  of  systems  currently  in  use  for   measuring  levels  of  fluids,  sending  text  messages  and  processing  data.  Many  of  these  were   ruled  out  as  either  too  expensive  or  too  difficult  to  make.      
  • 12. Porthcawl  Comprehensive  School   March,  2014   12       About  Tarmac   Lafarge  Tarmac  is  the  UK's  leading  supplier  of  aggregates  and  asphalt.  They  combine   industry-­‐leading  innovation  with  an  unrivalled  supply  and  distribution  network  that  includes   over  100  quarries,  70  dedicated  asphalt  plants   and  70  recycling  operations.  Their  products   meet  the  highest  standards  of  sustainability  and   performance,  as  you  would  expect  from  a   market  leader.  They  are  responsibly  sourced   and  certified  to  BES  6001.   Their  range  of  'Ultimate'  aggregate  and  asphalt   solutions  have  been  designed  to  meet  the  daily   challenges  faced  by  construction  professionals.   These  specialist  solutions  help  their  customers   deliver  outstanding  results  in  shorter   timescales,  even  when  faced  with  challenging   requirements  or  difficult  site  conditions.   Asphalt    (also  known  as  bitumen),  is  a  sticky,   black  and  highly  viscous  liquid  or  semi-­‐solid   form  of  petroleum.  It  may  be  found  in  natural   deposits  or  may  be  a  refined  product;  it  is  a   substance  classed  as  a  pitch.  Until  the  20th   century,  the  term  asphaltum  was  also  used.     The  primary  use  (70%)  of  asphalt/bitumen  is  in  road  construction,  where  it  is  used  as  the   glue  or  binder  mixed  with  aggregate  particles  to  create  asphalt  concrete.  Its  other  main  uses   are  for  bituminous  waterproofing  products,  including  production  of  roofing  felt  and  for   sealing  flat  roofs.     The  terms  asphalt  and  bitumen  are  often  used  interchangeably  to  mean  both  natural  and   manufactured  forms  of  the  substance.  In  American  English,  asphalt  (or  asphalt  cement)  is   the  carefully  refined  residue  from  the  distillation  process  of  selected  crude  oils.  Outside  the   United  States,  the  product  is  often  called  bitumen.  Geological  terminology  often  prefers  the   term  bitumen.  Common  usage  often  refers  to  various  forms  of  asphalt/bitumen  as  "tar",   such  as  at  the  La  Brea  Tar  Pits.  Another  term,  mostly  archaic,  refers  to  asphalt/bitumen  as   "pitch".  The  pitch  used  in  this  mixture  is  sometimes  found  in  natural  deposits  but  usually   made  by  the  distillation  of  crude  oil.   Naturally  occurring  asphalt/bitumen  is  sometimes  specified  by  the  term  "crude  bitumen".   Its  viscosity  is  similar  to  that  of  cold  molasses  while  the  material  obtained  from  the   fractional  distillation  of  crude  oil  [boiling  at  525  °C  (977  °F)  is  sometimes  referred  to  as   "refined  bitumen".  
  • 13. Porthcawl  Comprehensive  School   March,  2014   13       At  the  site,  we  were  briefed  about  the  company’s  health  and  safety  guide,  which  is  a  prime   concern  of  Lafarge  Tarmac.  Lafarge  Tarmac  is  keen  to  play  an  active  part  in  the  community   and  encourage  schools  and  other  interested  groups  to  visit  their  sites  and  gain  firsthand   knowledge  of  their  industry.  However,  quarries  and  other  areas  such  as  asphalt  plants  and   recycling  depots  can  be  dangerous.  During  the  visit,  the  group  had  to  stay  together  under   the  supervision  of  a  guide  provided  by  the  company.     Site  visit   We  were  invited  to  visit  the  Quarry  to  see  the  Bitumen  tanks  in  their  location  and  to  see  the   kind  of  environment  in  which  they  the  system  would  be  installed.       This  was  a  potentially  hazardous  environment  which  meant  we  had  to  have  a  safety  lesson   and  then  were  issued  with  protective  clothing  and  equipment.  
  • 14. Porthcawl  Comprehensive  School   March,  2014   14         When  we  went  out  into  the  quarry,  we  were  taken  to  the  Bitumen  tanks  in  the  minibus  with   a  safety  car  escort  and  were  shown  how  the  bitumen  was  loaded  in  to  the  tanks  as  there   was  a  delivery  taking  place  at  the  time.    
  • 15. Porthcawl  Comprehensive  School   March,  2014   15       We  were  then  taken  up  to  the  top  of  the  10m  tall  tanks  to  see  where  the  sensor  could  be   installed.   From  here  we  were  taken  around  the  entire  quarry  site  and  shown  how  Lafarge  Tarmac  first   quarries  the  limestone,  treats  the  stone  and  finally  turns  it  into  asphalt  that  can  be  sent  all   over  the  area  for  use  in  making  roads.      
  • 16. Porthcawl  Comprehensive  School   March,  2014   16       Final  Solution   The  solution  we  decided  on  as  a  team  was  to  use  an  ultrasonic  transmitter/receiver  unit   with  a  Raspberry  Pi  computer.  This  combination  gives  the  following  benefits:   • The  chosen  sensor  is  very  low  cost.  We  obtained  ours  from  the  internet  for   approximately  £2   • The  Raspberry  Pi  is  a  low  cost  computing  option.  Approximately  £25.   • The  software  code  that  we  have  implemented  is  very  flexible  and  can  be  changed   easily  to:   o Change  the  message  that  is  sent   o Change  the  number  of  recipients   o Change  the  number  of  massages  sent   o Change  the  depth  at  which  the  message  is  triggered   • The  device  can  be  implemented  any  number  of  times  across  the  site  with  very  small   amounts  of  set  up  or  reconfiguration      
  • 17. Porthcawl  Comprehensive  School   March,  2014   17       Design  Development     Once  the  technology  and  implementation  had  been  decided  on  we  had  to  build  the  system   to  test  it  on  a  small  scale  in  the  laboratory.  The  equipment  had  been  ordered  from  the   internet  and  the  software  code  was  being  written.  While  this  was  being  done,  the  hardware   had  to  be  constructed  in  order  to  test  the  software  was  working  correctly.  The  software  and   the  hardware  were  then  put  together  to  check  the  system  worked  and  then  put  through  a   period  of  testing  to  ensure  consistent  operation.   Hardware   The  sensor  unit  was  a  basic  unit  with  ultrasonic  transmitter  and  receiver  built  onto  a  circuit   board  with  a  small  amount  of  circuitry  (an  oscillator  and  timing  circuits  to  make  the   ultrasonic  sound  waves  that  are  sent  by  the  transmitter).     This  small  circuit  board  then  required  a  small  amount  of  circuitry  to  make  it  work  with  the   raspberry  pi.  This  circuit  was  a  small  interface  system  to  ensure  that  the  voltage  provided  by   the  raspberry  pi  was  correct  to  drive  the  sensor  and  the  signal  supplied  by  the  sensor  was   correct  for  the  pi  to  be  able  to  understand.   This  circuit  was  first  constructed  on  a  prototyping  board  to  ensure  correct  operation.    
  • 18. Porthcawl  Comprehensive  School   March,  2014   18       Once  this  circuit  was  tested  and  could  be  seen  to  work  reliably  it  was  soldered  onto  strip   board  to  make  the  contacts  more  secure  and  resilient.     This  circuit  could  then  be  mounted  in  a  case  to  protect  the  more  sensitive  parts  of  the  circuit   from  damage.  The  sensor  was  interfaced  to  the  Raspberry  Pi  by  using  a  temporary  general   input  output  break  out  board  (GPIO  board).  This  is  a  temporary  measure  and,  because  of   the  nature  of  the  Pi,  these  contacts  could  be  made  directly  to  the  computer  board  by   soldering.  However,  this  would  be  a  final  solution  and  not  for  development.      
  • 19. Porthcawl  Comprehensive  School   March,  2014   19       Python  Scripts   The  software  program  script  for  the  Raspberry  Pi  was  written  in  Python  code.  This  is  the   main  programming  language  for  the  raspberry  pi  and  is  becoming  more  popular  among   programmers  in  many  areas  of  computing.   The  following  section  outlines  the  Python  programme  that  was  created  for  this  project.   Unfortunately  the  formatting  has  not  been  retained  –  this  was  lost  when  exporting  the   programme  file  from  the  Pi.  This  formatting  would  have  taken  the  form  of  indenting   different  parts  of  the  program  in  order  to  group  sections  of  the  code  together.   Some  annotation  is  included  in  the  text  in  the  form  of  comments.  These  comments  are   preceded  by  a  hash  icon  (#).  This  is  the  standard  way  that  programmers  annotate  software   to  keep  track  of  their  code.  The  hash  sign  tells  the  program  to  ignore  that  line  as  it  is  not   part  of  the  program.  Annotation  has  been  added  in  the  boxes  on  the  right  of  the  page.   Ultrasonic  distance  measure:   import  time   import  RPi.GPIO  as  GPIO     def  measure():      #  This  function  measures  a  distance      GPIO.output(GPIO_TRIGGER,  True)      time.sleep(0.00001)      GPIO.output(GPIO_TRIGGER,  False)      start  =  time.time()      while  GPIO.input(GPIO_ECHO)==0:          start  =  time.time()      while  GPIO.input(GPIO_ECHO)==1:          stop  =  time.time()      elapsed  =  stop-­‐start      distance  =  (elapsed  *  34300)/2      return  distance   def  measure_average():      distance1=measure()      time.sleep(0.1)   Functions  such  as  the  General   Purpose  Input  Output  library   must  be  allocated  to  this   program.   This  section  of  the  code  is  how   the  Pi  is  able  to  measure   distance.   The  Ultrasonic  unit  transmits  a   pulse  of  high  frequency  sound   waves  (GPIO  Trigger  True)  and   then  starts  a  timer.  The  timer  is   stopped  when  the  echo  is   detected  at  the  sensor.   This  equation  then  takes  the   recorded  time  and  mulitplies  it  by   the  speed  of  sound  in  air.  This  is   approximately  34300  cm/s.  This   number  is  then  divided  by  two  in   order  to  find  the  distance  from   the  sensor  to  the  surface  of  the   liquid  –  not  the  total  path  length   the  sound  wave  has  travelled.  
  • 20. Porthcawl  Comprehensive  School   March,  2014   20          distance2=measure()      time.sleep(0.1)      distance3=measure()      distance  =  distance1  +  distance2  +  distance3      distance  =  distance  /  3      return  distance       #  Main  Script   #  Use  BCM  GPIO  references   #  instead  of  physical  pin  numbers   GPIO.setmode(GPIO.BCM)   #  Define  GPIO  Pins  to  use  on  Pi   GPIO_TRIGGER  =  23   GPIO_ECHO        =  24   print  "Ultrasonic  Measurement"   #  Set  pins  as  output  and  input   GPIO.setup(GPIO_TRIGGER,GPIO.OUT)    #  Trigger   GPIO.setup(GPIO_ECHO,GPIO.IN)            #  Echo   #  Set  trigger  to  False  (Low)   GPIO.output(GPIO_TRIGGER,  False)   try:      while  True:          distance  =  measure_average()          print  "Distance  :  %.1f"  %  distance          time.sleep(1)     #trigger  SMS1  when  distance  is  greater  than  40  cm   if  distance  >  40:   This  section  of  the  code  takes   three  measurements  of  the   distance  and  then  takes  anmean   average  of  the  results.  This  helps   in  making  the  measurement   more  accurate.                                     This  section  of  the  code  begins  to   define  the  levels  at  which  the   alarms  will  be  raised.  This  will  be   short  distances  set  for  our  model   but  this  can  be  adjusted  very   easily  for  any  size  of  tank  or  silo.    
  • 21. Porthcawl  Comprehensive  School   March,  2014   21                      sms   except  KeyboardInterrupt:      #  User  pressed  CTRL-­‐C      #  Reset  GPIO  settings      GPIO.cleanup()   def  SMS(   Code  to  send  SMS   #  Import  required  libraries   import  urllib            #  URL  functions   import  urllib2          #  URL  functions   #  Define  your  message   message  =  'Refill  bitumen  tank  number  1  -­‐  Cornelly   Quarry'   #  Set  your  username  and  sender  name.   username  =  'lawson.richard@hotmail.com'   sender  =  'Porthcawl  EESW  Team   #  Your  unique  hash  is  available  from  the  docs  page   #  https://control.txtlocal.co.uk/docs/   hash  =   '86cee22e249d8e18f09bd0b7bed6821ea6c72cf1'   #  Set  the  phone  number     numbers  =  ('447855272195')   #  Set  flag  to  1  to  simulate  sending   #  To  send  real  message  set  this  flag  to  0   test_flag  =  1   values  =  {'test'        :  test_flag,                      'uname'      :  username,                      'hash'        :  hash,                      'message'  :  message,                      'from'        :  sender,   CTRL-­‐C  is  the  standard  code  to   interrupt  a  program  that  is   running.  In  this  case  it  is  also   being  used  to  reset  the  inputs   and  outputs  of  the  Pi.     This  section  of  the  code  will  send   the  message  to  amobile  phone   via  the  internet  service  “text   local”.  This  service  was  selected   as  it  enables  remote  and   automatic  log  in  using  the   provided  “Hash  Code”     The  service  requires  a   administrator  to  maintain  control   of  the  system  so  our  teacher,  Mr   Lawson  has  signed  in  with  his   details,   This  is  the  Hash  code  provided  by   the  website   This  script  can  send  text   messages  to  individual  phones  or   a  group  of  phones  numbers  if   required.  This  is  where  the  phone   number(s)  to  be  used  is  entered.     As  text  messages  cost  money  to   send  (10p)  then  we  have  included   the  ability  to  simulate  sending  a   text  for  testing  the  system  and  to   keep  costs  to  a  minimum  during   development.  
  • 22. Porthcawl  Comprehensive  School   March,  2014   22                          'selectednums'  :  numbers  }     url  =  'http://www.txtlocal.com/sendsmspost.php'   postdata  =  urllib.urlencode(values)   req  =  urllib2.Request(url,  postdata)   print  'Attempt  to  send  SMS  ...  '   try:      response  =  urllib2.urlopen(req)      response_url  =  response.geturl()      if  response_url==url:          print  'SMS  sent!'   except  urllib2.URLError,  e:      print  'Send  failed!'      print  e.reason       #  Import  required  libraries   import  urllib            #  URL  functions   import  urllib2          #  URL  functions   #  Define  your  message   message  =  'URGENT!  –  Level  Low:  Refill  bitumen  tank   number  1  -­‐  Cornelly  Quarry'   #  Set  your  username  and  sender  name.   username  =  'lawson.richard@hotmail.com'   sender  =  'Porthcawl  EESW  Team’   #  Your  unique  hash  is  available  from  the  docs  page   #  https://control.txtlocal.co.uk/docs/   hash  =   '86cee22e249d8e18f09bd0b7bed6821ea6c72cf1'   #  Set  the  phone  number  you  wish  to  send   The  program  will  print  progress   messages  on  the  screen  and   confirmation  that  the  text  has   been  sent.  This  is  mainly  for  the   development  stage  as  during   main  use  the  screen  will  not  be   required.           It  will  tell  us  if  the  send  has  failed   or  succeeded.  This  works  even  in   simulated  test  mode.         This  section  of  the  program  is  a   copy  and  repeat  of  the  previous   section.  This  was  the  easiest  way   to  enable  us  to  send  different   messages  at  different  times.  This   is  difficult  to  see  here  as  the   indent  formatting  did  not  keep.  
  • 23. Porthcawl  Comprehensive  School   March,  2014   23       #  message  to.   numbers  =  ('447855272195')   #  Set  flag  to  1  to  simulate  sending   #  To  send  real  message  set  this  flag  to  0   test_flag  =  1   values  =  {'test'        :  test_flag,                      'uname'      :  username,                      'hash'        :  hash,                      'message'  :  message,                      'from'        :  sender,                      'selectednums'  :  numbers  }   url  =  'http://www.txtlocal.com/sendsmspost.php'   postdata  =  urllib.urlencode(values)   req  =  urllib2.Request(url,  postdata)     print  'Attempt  to  send  SMS  ...  '   try:      response  =  urllib2.urlopen(req)      response_url  =  response.geturl()      if  response_url==url:          print  'SMS  sent!'   except  urllib2.URLError,  e:      print  'Send  failed!'      print  e.reason           Though  a  repeated  part  of  the   program,  this  is  a  key  part  of  the   operation.  This  function  can  be   replicated  for  different  distances   within  the  tank  allowing  early   warning  messages  to  be  sent,   emergency  low  level  messages  or   test  messages.     This  function  could  be  expanded   by  the  company  at  any  point  and   very  easily  to  enable  the  system   to  become  more  flexible   depending  on  changing  needs.  
  • 24. Porthcawl  Comprehensive  School   March,  2014   24       Prototype  Testing   The  prototype  system  was  tested  on  a  small  scale.  The  site  where  this  system  would   normally  be  used  is  a  very  dangerous  environment.  The  sensor  would  have  to  be  set  up   inside  the  bitumen  tank  and  the  bitumen  is  held  at  a  very  high  temperature  to  make  sure  it   remains  liquid.  This  raises  the  possibility  that  the  sensor  would  not  work  properly  in  his   environment  but  this  is  impossible  for  us  to  test  within  the  scope  of  this  project.   So,  to  test  the  concept  of  the  system  we  built  a  scale  model  of  the  bitumen  tank  on  site,   scaled  the  trigger  thresholds  in  the  software  and  constructed  a  mount  to  hold  the  sensor   unit  at  the  top  of  the  tank.  After  much  discussion  we  finally  selected  our  equipment  to  use   for  our  testing  and  display  model.  The  first  step  in  building  our  model  was  ordering  the   equipment.  Some  of  the  equipment  used  was  sourced  or  built  in  school.  For  example  the   casing  for  our  raspberry  pi  was  found  and  then  modified  in  order  to  hold  the  pi  and  keep  it   safe.  The  casing  for  the  ultrasonic  sensor  was  also  modified  to  hold  the  sensor.   We  then  used  a  high  speed  drill  to  cut  a  hole  for  the  tap.  We  did  this  by  drilling  lots  of  holes   close  together  and  then  pushing  the  plastic  out.  We  chose  to  do  it  this  way  as  it  had  the   lowest  risk  of  the  plastic  splitting  as  we  were  cutting.  We  then  put  the  tap  in  place  making   sure  to  use  the  gaskets  provided  to  stop  the  risk  of  leaking.  The  piping  was  then  attached.   We  also  added  stickers  to  the  tanks  to  make  them  look  more  realistic.  We  have  also  used  a   bubble  machine  in  order  to  make  the  liquid  look  like  its  hot.   To  start  we  needed  a  container  to  hold  x  amount  of  (material)  so  before  building  an  actual   physical  model  a  design  was  first  created  to  replicate  the  specification  given.   First  purely  the  cylinder  and  base  were  created  with  the  measurements  of  (insert   dimensions)  and  volume  of  (insert  volume)  as  shown  in  fig  1.     Secondly  the  lid  was  designed  the  original  design  was  to  cover  the  entire  top  surface  as   shown  in  fig  2.  However  later  design  proved  that  due  to  the  use  of  sonar  as  the  method  of   measurement  it  was  better  to  have  a  half  covered  surface  to  avoid  any  echo  or  at  least  
  • 25. Porthcawl  Comprehensive  School   March,  2014   25       avoid  most  to  give  more  reliable  results  when  measuring  the  volume  of  liquid  in  the   container.   The  final  result  with  the  sonar  device  is  as  shown  in  fig  3.         Using  this  rig,  the  tank  was  filled  and  drained  many  times.  First  the  rig  was  tested  with  the   test  flag  set  in  the  software.  This  meant  that  the  levels  could  be  monitored  and  the   computer  would  signal  that  a  text  message  would  be  sent.  Once  this  was  working   successfully,  the  test  flag  could  be  removed  and  so  the  system  would  send  real  text   messages  over  the  internet.  This  was  first  done  for  members  of  the  team  and  our  teacher.   Then  we  attempted  to  send  a  series  of  texts  to  our  Engineer,  Mr  Jones  by  simply  changing   the  water  level  in  the  test  tank.  This  was  a  great  success  and  showed  that  the  system  was   reliable  in  sending  the  messages.   The  only  problem  we  encountered  at  this  stage  was  that  occasionally,  the  system  would   send  two  or  three  text  messages  in  a  row  instead  of  a  single  text.  The  reason  for  this  is   unknown  but  the  problem  of  sending  too  many  text  messages  is  better  than  not  sending   any.        
  • 26. Porthcawl  Comprehensive  School   March,  2014   26       Results,  Discussion  and  Evaluation   The  benefits  of  this  system  being  implemented  in  the  Tarmac  company  are  broad  and  far   reaching.  This  section  will  aim  to  summarise  the  main  points  that  will  benefit  the  company.   Environmental  Benefits   As  the  bitumen  used  is  ordered  and  so  delivered  from  Birkenhead,  this  obviously  has  an   impact  on  the  environment  as  a  whole.  The  tanker  lorries  that  deliver  the  bitumen  to  site   have  to  travel  231  miles  (371  km)  on  their  journey  from  Birkenhead  to  Cornelly  Quarry.  This   is  an  unavoidable  journey  but  still  causes  a  significant  CO2  contribution  to  atmospheric   pollution.  The  following  table  shows  how,  on  average  vehicles  contribute  to  global  warming   with  CO2  emissions:     Bitumen  is  delivered  in  25  tonne  loads  by  large  tanker  trucks.  Depending  on  the  size  of  the   truck  and  engine  being  used,  the  CO2  produced  is  generally  between  3.0  and  3.9   kg/tonne/km.   If  we  take  an  average  pollution  rate  of  3.4  kg/tonne/km  then  we  can  calculate  the  pollution   per  journey  as  follows:     This  will  be  consistent  for  the  371  km  journey  so  will  generate:   Total  kg  per  journey     =  371  km  x  3.4  kg/km         =  1,261  kg  of  CO2  per  journey   Although  the  tanker  will  have  unloaded  the  25  tonnes  of  liquid  at  Cornelly,  the  return   journey  must  also  be  factored  in  as  this  is  an  inevitable  part  of  the  process.      
  • 27. Porthcawl  Comprehensive  School   March,  2014   27       Total  kg  per  delivery     =  1,261  x  2         =  2,523  kg       It  is  estimated  by  the  company  that  unnecessary  part  loads  are  ordered  on  average  10  times   each  year.  This  is  the  type  of  journey  that  is  caused  by  poor  level  control  and  so  the  type  of   pollution  our  system  will  aim  to  eliminate.  So  the  total  unnecessary  CO2  generated  per  year:     Total  CO2  per  year     =  2,523  kg  x  10         =  25,230  kg  CO2  per  year   This  is  a  very  large  amount  of  pollution  that  could  be  reduced  very  simply  by  implementing   our  device.     Development  Costs     The  costs  of  developing  this  system  were  actually  very  small.  The  Raspberry  Pi  computer   generally  retails  for  about  £25.  The  Ultrasonic  transceiver  costs  approximately  £2.  The  cases   and  hardware  were  surplus  to  requirements  and  so  were  free  to  the  project  though   normally  they  would  cost  less  than  £10  in  total.  The  actual  cost  to  create  this  system  in  a   form  that  could  be  used  therefore  is  about  £40  in  total.   However,  there  were  more  costs  involved  in  development  than  merely  constructing  the   system.  The  test  rig  and  tanks  were  the  single  biggest  expense.  These  alone  cost  £136.  This   seems  like  a  very  large  expenditure  when  compared  to  the  rest  of  the  system  but  it  was   considered  important  to  have  a  test  system  that  was  similar  in  shape  and  scale  dimensions   to  the  actual  storage  tanks  on  site.   The  text  messaging  service  used,  “Text  Local”  is  a  py  per  use  service.  It  is  free  to  register  and   gain  an  account.  This  account  even  comes  with  £10  of  free  text  messages.  As  testing   continued,  we  began  to  run  out  of  text  messages.  We  contacted  the  text  service  providers   and  explained  the  idea  behind  the  EESW  scheme  and  they  agreed  to  provide  us  with  a   further  50  text  message  credits  with  the  offer  of  more  if  this  did  not  prove  sufficient.      
  • 28. Porthcawl  Comprehensive  School   March,  2014   28       Cost  Benefits     The  cost  benefits  to  this  system  are  very  significant.  These  benefits  can  be  outlined  as   follows:   A  full  tank  of  bitumen  delivered  from  Birkenhead  is  25  tonnes  at  £550  per  tonne.   This  means  that  each  tanker  load  costs  £13,750.   If  a  part  load  is  required,  these  loads  are  15  tonnes.    However,  the  cost  of  this  delivery  is  still   £13,750.  Effectively  the  company  is  charged  a  premium  if  the  tanker  is  not  full.  It  is   therefore  in  the  companies  best  interest  to  ensure  that  only  full  loads  are  being  ordered.   Each  time  this  happens,  although  the  tanker  is  delivering  10  tonnes  less  than  normal,  the   company  is  still  charged  for  these  10  missing  tonnes  at  £550/tonne.  So  the  company  pays   £5,500  for  bitumen  it  does  not  receive.     As  mentioned  above,  this  is  estimated  to  happen  currently  approximately  10  times  each   year.  This  equates  to  £5,500  per  tank.  Cornelly  has  4  tanks  so  this  could  be  as  much  as   £22,000  per  site.   Cornelly  also  has  smaller  tanks  than  other  sites  in  the  company.  Some  quarry  sites  have  100   tonne  tanks  instead  of  50  tonnes  tanks.  This  will  therefore  increase  the  amount  of  wasted   journeys  and  money.   The  cost  benefits  are  also  more  widespread  than  straight  forward  purchasing.  The  fact  that   the  system  will  be  automatic  enables  an  engineer  to  be  redeployed  elsewhere  on  site   instead  of  having  to  monitor  tank  levels.  This  will  help  the  site  to  run  more  efficiently  and   more  productively.   The  increased  productivity  and  efficiency  will  also  enable  the  company  to  maintain  better   relationships  with  their  clients  and  will  be  able  to  fulfil  more  orders  more  quickly  and  will   therefore  help  to  grow  their  business  and  reputation.     Health  and  Safety     This  system  also  delivers  safety  benefits.  Each  time  the  lorry  driver  discharges  a  tanker  load   of  bitumen,  he  is  exposed  to  liquids  held  at  temperatures  in  excess  of  120  o C.  This  means  he   must  wear  special  safety  clothing  and  runs  the  risk  of  accidental  spills.  He  is  also  exposed  to   the  fumes  and  gases  given  off  by  such  a  dangerous  and  volatile  substance.    
  • 29. Porthcawl  Comprehensive  School   March,  2014   29       Wider  Scope  of  Project     By  the  time  this  project  had  been  finished  and  tested  to  prove  it  worked,  we  began  to   realise  the  full  potential  of  this  project.  While  this  has  been  demonstrated  to  be  a  huge   benefit  to  Lafarge  Tarmac  in  the  remote  monitoring  of  Bitumen  level,  it  could  be  used   anywhere  a  level  in  a  container  needs  to  be  monitored.   For  example,  any  liquid,  not  just  bitumen,  could  be  monitored.  This  could  include  any  type   of  fluid  required  in  manufacturing,  chemicals  in  industrial  plants,  ingredients  in  food   manufacturing,  petrol/diesel  levels  in  mass  storage  tanks  or  petrol  stations  or  water  in   swimming  pools.  The  list  of  liquids  that  could  be  measured  is  literally  endless.   As  this  system  is  ultrasonic,  it  does  not  necessarily  have  to  be  a  liquid  to  be  measured.  This   would  work  equally  well  in  a  farms  grain  silo,  a  bread  factory’s  flour  silo  or  building  sites  for   monitoring  sand  or  cement  powder  in  the  construction  industry.   This  could  also  be  a  very  important  way  of  helping  people  in  developing  countries.  For   example,  this  device  could  be  installed  in  a  drinking  water  well  and  could  alert  people  of   falling  water  levels  so  that  help  can  be  sought  or  contingency  plans  could  be  put  in  place.      
  • 30. Porthcawl  Comprehensive  School   March,  2014   30       Conclusion     The  unit  designed  fulfilled  the  design  brief  in  operation.  It  has  proved  able  to  detect  the   level  of  liquid  within  a  large  tank  with  a  high  degree  of  accuracy.  It  has  also  proved  to  be   reliable  and  issued  at  least  one  text  message  each  time  the  liquid  threshold  levels  were   reached.  Occasionally  more  than  one  SMS  was  transmitted  but  as  previously  mentioned  this   was  not  seen  as  an  issue  as  the  message  would  still  have  got  through  to  the  engineer.   The  greatest  area  of  success  which  we  did  not  originally  intend  to  be  so  great  was  the   proven  cost  saving  that  this  small  unit  could,  and  will  achieve.  These  are  complimented  by   huge  savings  in  environmental  factors  such  as  CO2  output  and  the  benefit  to  the  perception   of  the  company  by  clients  and  competitors.   As  previously  mentioned  this  project  has  the  potential  to  help  wider  industry  and  is  not  just   limited  to  bitumen  monitoring  in  the  manufacture  of  asphalt.  As  a  team,  we  have  designed,   developed  and  delivered  a  robust  solution  to  a  very  challenging  problem.  This  design  has   been  built  and  tested  and  has  shown  that  it  can  work  reliably.     The  main  limitation  of  the  system  developed  so  far  is  that  it  cannot  at  present  be  installed   on  site.  For  this  to  take  place  it  would  have  to  be  formally  tested  for  Electromagnetic   Compatibility,  safety  testing  and  would  need  to  be  ruggedized  to  make  sure  it  will  withstand   the  harsh  environments  on  site.   However,  this  would  be  a  relatively  small  investment  and  as  such,  this  device  has  shown   that  it  can  provide  very  substantial  cost  saving,  enormous  environmental  benefits  and  can   be  used  in  many  different  situations.      
  • 31. Porthcawl  Comprehensive  School   March,  2014   31       Appendix     The  following  appendix  shows  examples  of  the  systems  that  were  used  to  ensure  the  work  was   completed  in  an  orderly  and  timely  manner.  
  • 32. Porthcawl  Comprehensive  School   March,  2014   32       Action  Log   This  spreadsheet  shows  an  early  example  of  the  progress  log  that  was  used  to  keep  track  of  tasks   within  the  team  and  to  keep  our  Engineer  informed.