Giter Site home page Giter Site logo

monsoon_power_measurement's Introduction

monsoon_power_measurement

Equipment and Cable Connections

Monsoon Power Monitor back view

Software Pre-request

https://github.com/msoon/PyMonsoon/tree/master

# create Python2.7 env
conda create -n monsoon python=2
conda activate monsoon

# install the specific version of libusb1
pip install libusb1==1.9.3

# install monsoon
pip install monsoon

Firmware

LVPM_RevE_Prot_1_Ver32.fwm

install firmware

Hold the "output enabled" button on the front panel and push the power button. Run with sudo.

import Monsoon.reflash as reflash  
Mon=reflash.bootloaderMonsoon()  
Mon.setup_usb()  
fwm_name=b"LVPM_RevE_Prot_1_Ver32.fwm"  
Header, Hex = Mon.getHeaderFromFWM(fwm_name.decode('latin-1'))  
  
if Mon.verifyHeader(Header):  
Mon.writeFlash(Hex)

Measure Experiments

Since the max voltage of Mon.setVout() is 4.55V, we power the embedded board by laptop. One cable between power monitor and embedded board, another cable between power monitor and laptop. front view

Run the experiments

Run with sudo.

which python
sudo ...
import Monsoon.LVPM as LVPM  
import Monsoon.sampleEngine as sampleEngine  
import Monsoon.Operations as op  
  
Mon = LVPM.Monsoon()  
Mon.setup_usb()  
  
# Mon.setVout(4.0)  
engine = sampleEngine.SampleEngine(Mon)  
# engine.enableCSVOutput("Main Example.csv")  
engine.ConsoleOutput(True)  
numSamples=50000 #sample for ten second  
# engine.startSampling(numSamples)  
  
#Disable Main channels  
engine.disableChannel(sampleEngine.channels.MainCurrent)  
engine.disableChannel(sampleEngine.channels.MainVoltage)  
#Enable USB channels  
engine.enableChannel(sampleEngine.channels.USBCurrent)  
engine.enableChannel(sampleEngine.channels.USBVoltage)  
#Enable Aux channel  
# engine.enableChannel(sampleEngine.channels.AuxCurrent)  
#Set USB Passthrough mode to 'on,' since it defaults to 'auto' and will turn off when sampling mode begins.  
Mon.setUSBPassthroughMode(op.USB_Passthrough.On)  
  
engine.enableCSVOutput("USB Example.csv")  
engine.startSampling(numSamples)

monsoon_power_measurement's People

Contributors

peimu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.