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
Dev Tools
  • Products
  • More
Dev Tools
Forum L298 current sensor pin, convert pulsed current signal to consumption flag
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Dev Tools to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 20 replies
  • Answers 2 answers
  • Subscribers 82 subscribers
  • Views 4242 views
  • Users 0 members are here
Related

L298 current sensor pin, convert pulsed current signal to consumption flag

modelrailwaycat
modelrailwaycat over 10 years ago

Hello,

 

I am designing a small, simple 12V motor controller fed by a L298 H-bridge driver. The H-bridge input pins are supplied by means of PWM at 40 Hz. The motor can be connected or disconnected from the output even with the input and enable on. For this reason, I am interested in adding additional circuitry in order to obtain a binary signal of consumption using the current sensor pins; that is obtain a permanent high level while some current is detected and a permanent low level when no current is detected (after at least 1 period, but this is flexible).

 

The idea is to use a 0.5 ohm resistor to connect the sense pin to ground, and then use the voltage across the resistor to obtain the signal. I consider that the voltage measured will be from 5 mV to 1V and the Duty Cycle can be down to 1%. Because the sensor signal is also pulsed, I need somehow to filter it and obtain an stable output while consumption is 'on'. The problem is that I had not success to set properly a low-pass filter plus op-amp buffer configuration from this signal working reliably with all the mentioned conditions. I also tried to pre-amplify the sensor signal with another op-amp, then output that into the low-pass filter plus buffer, but had no success too.

 

Any idea is appreciated. Thank you very much!

  • Sign in to reply
  • Cancel

Top Replies

  • D_Hersey
    D_Hersey over 10 years ago +2 suggested
    Can you draw it up? What op-amp are you using? Not all op amps have common mode input range all of the way to BoS.
  • D_Hersey
    D_Hersey over 10 years ago +2
    "If you are going to reverse the current, you will need to set up a different reference voltage as with everything referred to 0V you will not get a negative swing. And your comparator will have to work…
  • peterjcs23
    peterjcs23 over 10 years ago in reply to modelrailwaycat +1
    Hi John, is your motor turning ok? If you put a DVM across Rsense what voltage do you see when turning and when stationary? Do you have a scope to look at waveforms? Peter
Parents
  • D_Hersey
    0 D_Hersey over 10 years ago

    Here are some chips just made for this:

     

    Linear Technology - Parametric Search for Reference Plus Comparator or Amplifier

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • modelrailwaycat
    0 modelrailwaycat over 10 years ago in reply to D_Hersey

    Hi,

     

    @Peter,

    Software: I use Proteus ISIS. It has enough power for what I need, and also it is interesting the interactive controls (switch, motor, LED,...) during simulation. On the other hand, some components models are missing.

    Hysteresis resistors: if I add a 1M resistor between +pin and output in the 1st comparator, then the voltage threshold (connected to +pin) is bouncing due to the effect of the capacitor, which produces abnormal functionallity of this comparator. How can I avoid that? In the 2nd comparator there is no problem to add it, I think.

    Spiky inputs: I added the caps as suggested.

     

    @Don,

    OC comparators: yes, precisely this effect has solved the problematic of making the consumption flag remaining active (low) even at low Duty Cycles, thanks to the quick discharge of the capacitor.

    PS fluctuation: if I understood your suggestion right, I can solve this by adding a parallel capacitor to the lower side of the voltage divider, isn't it?

    Hysteresis resistors: yes, we want saturation to provide a 'clean' binary flag. From that I understand that Peter's proposal is the right way, but still I got the problem with the 1st comparator as told above.

    Alternative circuitry: in the application there will not be a -5v supply. By the way, I need 'accuracy' (in terms of stability of the flag during PWM action) rather than speed of the signal, for my particular application.

     

    Thank you again!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • peterjcs23
    0 peterjcs23 over 10 years ago in reply to modelrailwaycat

    ah, I see, there are too many 1M resistors in that chain that includes the reference, the hysteresis and the pull up. Perhaps you could leave out the hysteresis.

     

    Alternatively, you might improve the circuit with an amplifier on the current sense resistor and you bring the operating current signal up to ~1volt. As Don suggests you could use a Vref for the comparator reference so that you are not dependant on the power rails, which will vary. The comparator reference could be derived with resistors around the 10k level. The 1M pull up could be down to <10k.

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 10 years ago in reply to peterjcs23

    Rather than trying to deal with the tiny current sense signal by amplifiers you could increase the value of the sensor resistor to 10R. It would then drop far too many volts at high currents so you would need to shunt it with a schottky diode capable of handling the full load current.

    The loss in the diode would probably be not much worse than in the 0.5R resistor but you would have  a much bigger sense voltage to work with.

     

    Of course the linear range of current sensing would be reduced but since you seem only to want on/off detection this shouldn't matter.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • michaelkellett
    0 michaelkellett over 10 years ago in reply to peterjcs23

    Rather than trying to deal with the tiny current sense signal by amplifiers you could increase the value of the sensor resistor to 10R. It would then drop far too many volts at high currents so you would need to shunt it with a schottky diode capable of handling the full load current.

    The loss in the diode would probably be not much worse than in the 0.5R resistor but you would have  a much bigger sense voltage to work with.

     

    Of course the linear range of current sensing would be reduced but since you seem only to want on/off detection this shouldn't matter.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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