element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test Instrumentation
  • Challenges & Projects
  • Project14
  • Test Instrumentation
  • More
  • Cancel
Test Instrumentation
Blog tinyMonster - Analog Precision opto-isolator
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test Instrumentation to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: mahmood.hassan
  • Date Created: 13 Nov 2018 8:26 PM Date Created
  • Views 1740 views
  • Likes 5 likes
  • Comments 0 comments
  • analog opto-isolated
  • backtoanalogch
  • current sense measurements
  • advanced micro:bit projects
  • microbit projects
  • precision amplifiers
  • voltage measurement
  • advanced_microbit_projects
  • opto-isolated
  • optocouplers
  • diytestinstruch
Related
Recommended

tinyMonster - Analog Precision opto-isolator

mahmood.hassan
mahmood.hassan
13 Nov 2018

Related Post: Precision analog opto-isolation amplifier using HCNR200/201

 

Hardware Setup:

{gallery} Analog Opto-Isolator Hardware

image

IMAGE TITLE: tinyMonster - Analog Precision opto-isolator - output stage power supply

image

IMAGE TITLE: tinyMonster - Analog Precision opto-isolator - Breadboard prototype

image

IMAGE TITLE: tinyMonster - Analog Precision opto-isolator - Final Strip Board prototype

image

IMAGE TITLE: tinyMonster - Analog Precision opto-isolator - Breadboard and Final prototype

image

IMAGE TITLE: tinyMonster - Analog Precision opto-isolator - prototype setup

.

Testing After Calibration:

.

{tabbedtable} Tab LabelTab Content
MAX. and MIN. OUTPUT

Maximum and minimum possible output voltage are limited to integrate it with microbit analog input and to avoid any damage to microbit. Maximum output voltage will not exceed microbit analog input maximum limit 3.6V and similarly minimum output voltage will not go below 0V even if negative voltage is applied at the input.

 

MAX. OUTPUT

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

MIN. OUTPUT

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Negative INPUT Blocking

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

MAX. OUTPUT limit to 3.0V

Before connecting it to microbit the supply voltage at microbit 3V ring is tested and it is ~3.2V instead of 3.3V when supplied through usb and it was also momentarily dropping (~3.1) when something is displayed on leds matrix. So in order to avoid any possible damage to analog input, the maximum output of opto isolator circuit is limited to 3.0V. Because maximum possible IO voltage for microbit is VDD+0.3 volt.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Testing at Different Input Voltages

After Calibration and max min limit setting, it is tested at different voltages to check output linearity.

 

1.5V INPUT

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

1.0V INPUT

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

0.5V INPUT

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

0.1V INPUT

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

.

Final Demos with micro:bit

.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

.

Under voltage and Over Voltage Indicator

To indicate under and over applied voltage LM393 based circuit is used. Even though these voltages will not harm the microbit but it is handy when measuring unknown voltage and unknown positive and negative terminals.

.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

.

micro:Bit mbed Code

.

#include "MicroBit.h"

MicroBit uBit;

int main()
{
    // Initialise the micro:bit runtime.
    uBit.init();

    int val = 0;
    float val_f = 0.0f;
    char str[10];
    int i=0;

    // uncomment to get int value of adc on startup.
 /*   
    for (i=0; i<10; i++){
        val += uBit.io.P0.getAnalogValue()-3; // P0 is a value in the range of 0 - 1024
        wait(0.01f);
    }
    val_f = (val)/10;
    sprintf (str, "%.1f", val_f);
    uBit.display.scroll(str);

    uBit.sleep(1000);
*/
    while (1){
        val = 0;
        for (i=0; i<10; i++){    // average the 10 values of adc.

            val += uBit.io.P0.getAnalogValue()-3; // P0 is a value in the range of 0 - 1024
            wait(0.01f);
        }
        val_f = (val*0.30f)/967;    // (970 - 3 = 967) adc values for 3 volt
        sprintf (str, "%1.2f", val_f);
        uBit.display.scroll(str);
        
        uBit.sleep(1000);
    }
 }

.

Application Examples

Measuring voltage across inductive loads

Ground isolation between 2 analog circuit

DC Current measurement.

Adding protection against possible over voltage and negative voltage at ADC input

Attachments:
microbit-tM Final.zip
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube