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
Experimenting with Current Sense Amplifiers
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Current Sense Amplifiers
  • More
  • Cancel
Experimenting with Current Sense Amplifiers
Challenge Blog Blog 6: Now for some initial data
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: colporteur
  • Date Created: 26 Apr 2022 9:42 PM Date Created
  • Views 1864 views
  • Likes 8 likes
  • Comments 13 comments
  • Current 6 Click
  • raspberry pi
  • MAX40080
Related
Recommended

Blog 6: Now for some initial data

colporteur
colporteur
26 Apr 2022

With the python library, misaz shared in his blog post, I can continue with my challenge testing.  My initial tests of the sensor are using the locomotive on the bench. I have been using 3VDC, 5VDC and 12VDC to set some expectations before moving to the rail tests.

I still try and follow the process my electronics lab college instructor tried to instill in us 40 years ago. Have some idea of what the measurement should be, before you go poking around with testing equipment making measurements. I had no success getting current measurements using my Fluke VOM so I only have what the sensor is providing.

The python script generates a current & voltage reading every five seconds. The initial voltage applied to the locomotive motor is 5VDC, then changes (highlite) to 3VDC and then to 12VDC.

image

My question to the sharper electronic knives in the drawer than me is, do the current values look reasonable?

The current reading moves between.05 to .09, the average, throwing out the negative values in the calculation, is .06. I was expecting higher current values at the higher voltages. What I interpret from the current reading is a motor that is an active load where the resistance changes to ensure a steady current. That doesn't seem correct?

The motor speed does change with a change in the voltage.

I confess there is a lot of rust and dust accumulated on my electronic theory. Part of my motivation for doing these challenges is to refresh my knowledge. I would appreciate any feedback members have to offer before proceeding with further testing. What do you see in the values so far?

  • Sign in to reply

Top Comments

  • misaz
    misaz over 3 years ago in reply to michaelkellett +1
    Both Python anb C Library suppoort configuring digital filter. Maximum value of digital filter (128) eliminated almost whole noise in my case of sensing current flowing simple resistor on breadboard. …
Parents
  • michaelkellett
    michaelkellett over 3 years ago

    Do you have a scope - might be worth checking the nature of the applied voltage and the current ?

    Looking at your results the current measurments fluctuate too much to be happy with them

    Can you measure a a lot faster ?

    (I would have hoped for >100 readings per second.)

    Looking at your 12V readings the voltage is quite stable for the six readings but the current is still at the end dropping  - would be really nice if you kept going with more readings until it settles.

    Having said that, 6 samples would span 25 seconds which is a long time constant for the current to vary over .......

    More data needed.

    Suggested step 1.

    Repeat experiment but take at least 20 readings per voltage.

    BTW - what is th loco doing (on rails, upside down etc)

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • colporteur
    colporteur over 3 years ago in reply to michaelkellett

    Great suggestion MK. I don't have a scope but I did tinker with the sample rates.

    The python library issued a warning about frequency sample rate when measuring both current and voltage.

    raise ValueError("Sample rate must be 0.5 when measurement of both current and voltage is selected.")

    For the above readings the following was used.

    max.configure(sample_rate_khz=.5, digital_filter=1, measure_current=True, measure_voltage=True)

    For the next set of readings, I modified the config to only measure current and that enabled me to use the default sample rate 15.

    image

    I have the locomotive flipped on its back sitting on the bench for these tests.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 3 years ago in reply to colporteur

    I copied your 12V data into MATLAB and plotted it :

    image

    Then I fixed result 17 by setting it to the mean of sample 16 and sample 18.

    image

    The mean of the fixed data is 0.0735 and the standard deviation is 0.0204.

    In measuring science that counts as dreadful.

    The signal to noise ratio is about 11 dB.

    To put it into context - the 12 bit converter in the Maxim chip should easily give you 10 good bits, at 10% of full scale that would be a resolution of 1024/10 = 102 so we should be expecting a standard deviation of about 1% of the mean and a signal to noise ratio of about 40dB.

    There are a couple of reasons it may not be working well:

    1) is the full scale current range of the Maxim chip suitable - it should be about 1A for your set up

    2) is the current really very, very noisy (the Maxim chip should be able to deal with this but I have no idea how its internal settings are set in your experiment.

    You can check out 2 by putting a big capacitor across the loco (but not across the current sensor). It need to be between 1000=uF and 4700uF. This isn't a permament fix  - just for experimentation. If you don't have such a cap handy try the biggest value you do have ! (Must be rated 16V or more)

    Ideally we would like to look at the current with a scope - the Maxim chip can sample quite fast so it should be able to do this but your software library doesn't seem to allow it.

    (If you post any more data can you plonk it as text in the post or as a file attachment - if it's in a picture I have to copy it into MATLAB by hand.)

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 3 years ago in reply to michaelkellett

    Just looked as Misaz' latest post - it looks as if library just takes one sample  - this will be very susceptible to noise. So maybe you are  a bit stuck unless he can add some more features to the library.

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • misaz
    misaz over 3 years ago in reply to michaelkellett

    Both Python anb C Library suppoort configuring digital filter. Maximum value of digital filter (128) eliminated almost whole noise in my case of sensing current flowing simple resistor on breadboard.

    In case of Python Library colporteur can try replace configure call by this one:

    max.configure(digital_filter=128, measure_current=True, measure_voltage=True)
    

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • misaz
    misaz over 3 years ago in reply to michaelkellett

    Both Python anb C Library suppoort configuring digital filter. Maximum value of digital filter (128) eliminated almost whole noise in my case of sensing current flowing simple resistor on breadboard.

    In case of Python Library colporteur can try replace configure call by this one:

    max.configure(digital_filter=128, measure_current=True, measure_voltage=True)
    

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
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