Category Archives: Blog

Fuel Totaliser Specification

SPECIFICATION:

Need to measure the amount of fuel used using an accurate flow meter and display this inside the car.

  • Flow meter has a reed switch output for a given flow, which is 200 pulses = 1 litre
  •  Measure up to 100 litres, so need to count 20,000 pulses
  • Display the current consumption total on an in car display to 1 decimal place
  • When refuelling, need to be able to reset the total by a push button held down for approx. 3 seconds.
  • The count needs to be non-volatile if power is lost.
  • Upload the total to an FTP site / HTTP POST site with a configurable frequency (approx. 1-10 times per minute) – (either dedicated MiFi or phone hotspot)
  • Future requirement : output a voltage level depending on current total so this can be fed into an external data logger

INPUTS

  • Pulse from flow meter, 200 pulses = 1 litre
  • Push button – 3 second push to reset count

OUTPUTS

  • Total litres used on display (BIG FONT)
  • Total pulses (SMALL FONT) (If using LCD)
  • Write current total/pulses/time to file
  • Upload total litres/pulses/time to FTP/HTTP site
  • Voltage output – level depending on litre total

OPTIONS

  • Rasberry Pi as compute device
  • Andriod as compute device
  • Phidget VINT hub as input/output interface
  • Phidget Graphic LCD for ‘posh’ out – allows more scope for future?
  • 7 segment LCD display – cheaper option – could be clearer in car?
  • Andriod option such as Samsumng Note would have power/display – could use on-the-go usb interface to VINT hub?
  • phyton option for Rasberry
  • java option for Andriod

REFERENCE

Flow Meter details
https://www.bellflowsystems.co.uk/v…-1-50-max-80-litre-hr–1.html?category_id=75

Future Data Logger connections
http://www.race-technology.com/wiki/index.php/RTLive/Connections

Discret Components
https://forum.allaboutcircuits.com/threads/fuel-used-indicator-with-reset.145636/#post-1255575

Raspberry Pi GPIO Explained
https://www.element14.com/community/docs/DOC-78315/l/raspberry-pi-gpio-explained

Raspberry Pi: Launch Python Script on Startup
http://www.instructables.com/id/Raspberry-Pi-Launch-Python-script-on-startup/

Rasberry Pi emulator
https://www.pcsteps.com/1199-raspberry-pi-emulation-for-windows-qemu/

Controlling a 7 segment 4 digit display with a Raspberry Pi
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=91796

How To Autorun A Python Script On Raspberry Pi Boot
https://www.raspberrypi-spy.co.uk/2015/02/how-to-autorun-a-python-script-on-raspberry-pi-boot/

How to drive a 7 segment display directly on Raspberry Pi in Python
http://raspi.tv/2015/how-to-drive-a-7-segment-display-directly-on-raspberry-pi-in-python

Official Raspberry Pi 7″ Touchscreen Display
https://thepihut.com/collections/raspberry-pi-screens/products/official-raspberry-pi-7-touchscreen-display

Connecting a Push Switch
http://razzpisampler.oreilly.com/ch07.html

Run Phidgets on the Raspberry Pi
https://www.phidgets.com/?view=articles&article=GetStartedPhidgetsRaspberry

Connect Phidgets to Raspberry Pi
https://www.phidgets.kcom/?view=articles&article=FourProjectsPhidgetsRaspberry

Extenal 3g antenna
http://cpc.farnell.com/siretta/tango14-3m-smam-s-s-24/antenna-4band-3g-loprf-bolt-3m/dp/RF00569?mckv=XJ0tgy5v_dc|pcrid|74629370918390|kword||match||plid||pid|RF00569|&CMP=KNC-MUK-CPC-SHOPPING&msclkid=588707fc94d81ebffc1c5cdb5c75f7f5&utm_source=bing&utm_medium=cpc&utm_campaign=M-440-Shopping-Electrical%20and%20Lighting&utm_term=4578228982951501&utm_content=Wireless%20Systems

Nano > normal sim adapter
https://www.amazon.co.uk/Nano-Micro-Standard-Adapter-iPhone/dp/B009CVEBVC

Overview of Azure Service Fabric

Azure Service Fabric is a distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices and containers. Service Fabric also addresses the significant challenges in developing and managing cloud native applications. Developers and administrators can avoid complex infrastructure problems and focus on implementing mission-critical, demanding workloads that are scalable, reliable, and manageable. Service Fabric represents the next-generation platform for building and managing these enterprise-class, tier-1, cloud-scale applications running in containers.

Follow this link for more information.

WordPress Plugin: Duplicator – Replacing special characters

We have used the WordPress Duplicator Plugin many times to backup sites and move them to new hosting solutions.

However, on occasion we find special characters in pages and posts, such as Â or Ã.  So here is a simple way to remove them.

Log onto your mySQL DB and check if you have any special chars:

SELECT * FROM 'wp_posts' where 'post_content' like '%Â%'

If you do, then use this simple UPDATE command to replace them:

UPDATE wp_posts SET post_content = REPLACE (post_content, 'Â', '');

Hope that helps.

How to Scale Websites with Azure and Auto Scale

How to Scale Websites

For increased performance and throughput for your websites on Microsoft Azure, you can use the Azure Management Portal to scale your Web Hosting Plan mode from Free to Shared, Basic, or Standard.

Scaling up on Azure Websites involves two related actions: changing your Web Hosting Plan mode to a higher level of service, and configuring certain settings after you have switched to the higher level of service. Both topics are covered in this article. Higher service tiers like Standard mode offer greater robustness and flexibility in determining how your resources on Azure are used.

Changing modes and configuring them is easily done in the Scale tab of the management portal. You can scale up or down as required. These changes take only seconds to apply and affect all websites in your Web Hosting Plan. They do not require your code to be changed or your applications to be redeployed.

NB: You cannot use auto scale in Free mode.  Auto scale is only available in Shared, Basic and Standard mode.  Changing your Web Hosting Plan mode to a higher level of service will probably increase your monthly charges.  For charges, see Websites Pricing Details

Read more at Microsoft Azure

Microsoft Azure suffered a major outage on its cloud service overnight.

The service started having issues just before 1am UK time, and services are only now slowly returning to normal.

Microsoft confessed that multiple regions were affected by the “service interruption”.

Customers around the world using Azure storage, virtual machines, a number of SQL products and Active Directory, among other services, were confronted by the lengthy outage.

By 7am UK time this morning, Microsoft claimed to have revived its cloud platform.

azure-outage-tweet

It’s the second major outage to have hit Redmond’s Azure service in the past three months. In August, it had a similar sit-down, much to the frustration of it’s customers

Read more at The Register

Multiple SSL Certificates to one IP address

Overview

In the past you’ve needed a separate IP address for each SSL website.  With the introduction of Server Name Indication (SNI), you can bind many SSL certificates to a single IP.

What is Server Name Indication (SNI)?

SNI stands for Server Name Indication and is an extension of the TLS protocol.  It indicates which hostname is being contacted by the browser at the beginning of the ‘handshake’-process.  This allows a server to connect multiple SSL Certificates to one IP address.

How SNI works

Browsers that support SNI will immediately communicate the name of the website the visitor wants to connect with during the initialisation of the secured connection, so that the server knows which certificate to send back.  This allows browsers/clients and servers supporting SNI to connect multiple certificates for multiple domainnames to one IP address.

Downsides

SNI is not common practice yet, because some older browsers/systems cannot support the technique.  This is because the SSL/TLS library can be transmitted as part of the request and as part of the operating system.  Some browsers support SNI on all operating systems, but a small number only support SNI on specific operating systems.

Browsers that offer support for SNI:

  • Internet Explorer 7 or higher, on Windows Vista or newer.  (Does not work on Windows XP and Internet Explorer 8)
  • Mozilla Firefox 2.0 or higher
  • Opera 8.0 or higher (the TLS 1.1 protocol must be implemented)
  • Opera Mobile, version must be at least 10.1 beta on Android
  • Google Chrome (Windows Vista or newer, Windows XP requires Chrome 6 or higher, OS X 10.5.7 or newer requires Chrome 5.0.342.1 or higher)
  • Konqueror/KDE 4.7 or higher
  • MobileSafari for Apple iOS 4.0 or newer
  • Android standard browser on Honeycomb (v3.x) or higher
  • Windows Phone 7

The following servers that support SNI:

  • Apache 2.2.12 or higher, must use mod_ssl
  • Apache Traffic Server 3.2.0 or higher
  • Cherokee, must have TLS support implemented
  • F5 Networks Local Traffic Manager, version 11.1 or higher
  • G-WAN Web app. Server, must use OpenSSL with SNI support
  • Apache Tomcat on Java 7 or higher
  • Microsoft Internet Information Server IIS 8
  • Saetta Web Server via OpenSSL
  • Citrix NetScaler 9.2 or higher
  • HAProxy 1.5 or higher