Updated design of the WiFi IoT Electric Switch

After lots of design changes, we have been able to make a commercial prototype of a WiFi Electric Switch.
This WiFi Electrical Switch is used to control the home appliance, for example, light, fan, etc.

Below are some pictures of the updated version.

Prototype testing at my home.

This prototype has been running for a month. Installed it on 5th July 2018.

Inside the box.

Continue reading “Updated design of the WiFi IoT Electric Switch”

A small addition (foot length measuring tool) to the Pedograph Software

Pedograph is a medical device for measuring the variation of foot pressure at the various points  under the sole.
“Diabetic patients usually suffer from lack of nerve sensation, especially in the feet. Therefore, their gait on standing and during walking may deviate from that of a normal person and points of high pressure develop under the feet. However, due to neuropathy they do not feel any pain which would have been felt had the nerve functions were alright. Later, ulcers form at these high pressure points, leading to gangrene and eventual amputation of the leg. A Pedograph revealing the variation of foot pressure at various points under the sole easily delineates such high pressure regions at an early stage so that special shoe insoles can be prepared to spread the pressure away from the hot spots. This way the patient is saved from eventual amputation, from being crippled for the entire life. Again, pressure points and pattern may differ while standing and during walking, usually it is the latter which put the soles on greater burden, and a dynamic pressure measurement during walking has more importance from a clinical point of view.” (https://bibeat.com/product/dynamic-pedograph/)

The main sensor unit (Fig) uses an optical method to create an
image of light intensities proportional to the pressure impressed at
individual points. This sensor unit provides a video image and rest of the work is done by software.
In this software, I have added a tool for measuring foot length from the composite image.

Foot length measurement tool


Below is the fundamental portion of the code.

private void footDisplayPanelMouseClicked(java.awt.event.MouseEvent evt) {                                              
        // TODO add your handling code here:
    int FootLength = 0;
    int footLengthinInch = 0;
    float ResultofFootlenthInInch =0;
        Integer x = evt.getX(), y = evt.getY();
        Graphics g = footDisplayPanel.getGraphics();
        Graphics2D g2 = (Graphics2D) g;
        g2.setStroke(new BasicStroke(3));
        int alpha = 127; // 50% transparent
        Color myColour = new Color(255, 255, 255, alpha); // transparent white
        g.setColor(Color.WHITE);   // this is the code for pointer// the white '+' symbol 
        g.drawLine(x, y-15, x, y+15);
        g.drawLine(x-15, y, x+15, y);
        footLengthinInch = Constants.DEFAULT_PIXELS_PER_INCH;
     if (MAclickCount>1){
//        super.paint(g);
        g2.drawLine(PreviousX, PreviousY, x, y); 
        FootLength = (int) Math.sqrt(((PreviousX-x)*(PreviousX-x))+((PreviousY-y)*(PreviousY-y)));
        ResultofFootlenthInInch = (float)FootLength/footLengthinInch; 
//        footDisplayPanel.setBackground(myColour);
//        DisplayLength.setBackground(myColour);
        DisplayLength.setText("Lenght of The Foot = "+(String.format("%.2f", ResultofFootlenthInInch))+" Inch or "+FootLength+" Pixels");
//        DisplayLength.setBackground(myColour);
     if (MAclickCount>=2){ // for refreaching after two click. 
         PreviousX = 0;
         PreviousY = 0;
         MAclickCount =0;
         x =0;
     PreviousX = x;
     PreviousY = y;

Foot length measuring tool's code


Continue reading “A small addition (foot length measuring tool) to the Pedograph Software”