Brian Moreau

Search this website


Plasma
Home
|
Solutions
|
Portfolio
|
Articles
|
Projects
|
Photography
|
Technology news
|
Blog
|
Contact
 
 
 

Electronics

Electronics is a subject I have great interest and passion for.
I have built several projects and designed a couple myself although these were in my younger days and I have not experimented for some years now.
I will, if I can find time, add some information about my previous electronic projects.

More recently I have decided to purchase the Velleman K8055 USB Experiment Interface board. The details of this follow below.

     

 

 
 
 

Velleman K8055 USB Experiment Interface board.

This self build kit is an Input / Output device that connects to a PC via USB port.
It features 5 digital inputs and 8 digital outputs in addition there are 2 analogue inputs and 2 analogue outputs.
The full specification can be found on the Velleman website.

My eyesight is not what it used to be and consequently this lead to trouble building the kit. In attempting to rectify my non working K8055 I came across a number of websites that featured this kit, the best and most intresting links are below.

Firstly I would like to point out that if you intend to buy one of these kits don’t be confused about its function. It appears from reading some message boards that some people have wrongly assumed that it is some kind of PIC Microprocessor experiment board but this is not the case. I can only assume that that assumption was made because the kit is based around such a processor. 

The supplied PIC16C745 Processor is pre-programmed and cannot be re-programmed with the kit. I am unsure if this particular PIC processor can be reprogrammed as many can but if it does allow this it could be re-programmed using a specific PIC programmer with a custom program.

Now I would assume that as it is described as an Experiment board then that is what its intended use is. Not only does the kit allow you to interface your computer with the outside world but it will also help teach you about the PIC16C745 Processor and how to use it in your own projects. The additional supplied information and utilities can also teach you how to write your own custom applications.
Again searching around the internet I have found many who have done exactly this.

 
 
 
 

Controlling the Velleman K8055 USB Experiment Interface Board over the Internet.

I decide that I would like to be able to control and monitor the K8055 USB interface board remotely from a web page. It quickly became evident that I would need to write a Visual Basic application that could receive data from the internet and have a web page that could send data to my visual basic program.

Unfortunately I do not have a server at home so communication between my Visual Basic application and the web page would have to go via my web site server.

Communication from the Internet in Visual Basic was achieved using the Internet Transfer Control. In my example I decided for simplicity I would read a single value from a text file using HTTP.

The control web page however was a little trickier as I decided control needed to be via two buttons i.e. ON and OFF. In order for values to be passed from the page without submitting a form then I would need to use Asynchronous JavaScript or Ajax as it is more commonly known.

I had a small understanding of Ajax and after a little searching around I found some examples that I was able to modify and eventually got the whole thing working.

Visual Basic Internet Communications Receiver screen shot
Internet Communications receiver
 
 
 
How it works
The web page writes either ON or OFF to a text file when a button is pressed. The text file is continuously being read by the Visual Basic program running on my home computer. For clarity when the ON button is pressed ALL of the digital outputs are switched on and when OFF is pressed they ALL turn OFF.
Note there is a slight delay as the cam is not a continuous video feed but I can assure you operation is instant.
 
 
 
 

Control the output yourself

K8055 Live CAM
Select refresh rate

If the image disappears then this is because a new cam image is being saved by my cam server at the same time this application is attempting to read the image file.
Wait and it will return.

The control demo page is now at http://www.brianmoreau.com/projects/internet-control/
 
 
 
 

The control program

You may download the control program for free and build your own control networks.
The program will work without a connected Velleman K8055 board but to actually control devices you will naturally need this interface.
The files to build your own web form for submitting commands to the program are also included in the archive.

 
 
File name Details
InternetCommsV3.exe Windows Executable.
InternetCommsV3.txt Instructions

USBControl.php

The WEB FORM used to submit the values of ON and OFF using Ajax

USBCommControl.php

The PHP code that receives the FORM data and writes the value to the TEXT file.

USBStatus.txt

The actual TEXT file which will contain your commands.

Velleman

For board control you will need the DLL file that is supplied on disk with the kit.
If you don’t have the K8055 board the application will run without it and the DLL is not required, you can download the DLL file direct from Velleman.

Known Bugs
NONE I know off, however the Ajax web form does not read from the text data file its self, it only sends data. This presents a problem where more than one person attempts to operate the device. In this case the OFF or ON status shown in your browser may not be correct.
I may thus modify the application so that it operates as Full Duplex.

Improvements and updates
February 2010
Version 3 launched with the following improvements and features.
Data file URL – you can now use your own data file on your own server.
Output Control – You can now customise commands for example you don’t have to send “ON” or “OFF” you could use “LEFT” or “RIGHT” for example or even use a more friendly  phrase such as “Lounge Light ON”
You will obviously need to modify the form values in USBControl.php
In addition to this feature you can select exactly which binary outputs you would like switched on or off on the K8055 board providing more versatile control.

 
 
 

Useful and interesting links for the Velleman K8055

HomeDome A controller for the HomeDome astronomy telescope housing.
This enthusiast has use the K8055 to control the position of the telescope using sensors and motors.   
Data Logger A custom Data Logger program.
Temperature Sensor Velleman Universal Temperature Sensor Kit K8067.
Vixen Not sure what this is yet but looks interesting.
USB View USB Hardware inspection tool just in case you have trouble getting it to work.
 
 
 
Twitter Control

Ok I have decided to take this web control t the next level and allow control via Twitter. The concept is simple, have a device connected to a computer that responds to Twits. The result…

Twitter Web Control Receiver V1.0

Description
Sets outputs on Velleman K8088 according to commands sent as direct messages via Twitter.

How it works
Commands are sent as direct messages to http://twitter.com/webcontrolit
A program running on the PC with the K8055 connected perform the following…
Calls TwitterAuth.php located on remote server
TwitterAuth.php logs into http://twitter.com/webcontrolit twitter account and receives latest direct messages.
The very last message or command in rewritten on the server in a txt file lastTwitterDirectMessage.txt
The program running on the control PC then sets outputs according to the command received.

Commands
UP
DOWN
LEFT
RIGHT

Notes
Calls to twitter are limited to once ever 30 seconds to stay within the maximum allowed of 150 calls per hour

Improvements
Make VB program log into twitter and receive XML data from twitter direct.
Make TwitterAuth.php  and VB program respond to twitter call errors such as HTTP 400
Invoke Whitelisting on Twitter to allow up to 20000 requests per hour
Support for other controllers such as X10

 
 
 
  ERROR Could not connect to MySQL server!
It may be bizy, please try again

Readers comments >