electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
LM339 comparator woes
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [7 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
hylaster



Joined: Apr 11, 2007
Posts: 4
Location: Oakland

PostPosted: Thu Feb 28, 2008 12:21 pm    Post subject: LM339 comparator woes Reply with quote  Mark this post and the followings unread

Hello all. I'm working on a FSR touch CV controller. I am hoping to have trigger outs from a couple of the touch pads as well so I am using an LM339 in a basic comparator circuit.

According to the data sheet, this should be pretty straightforward. The reference voltage looks good - in this case around 3v, and the input voltage from the FSR looks right too. But I'm getting full voltage at the output without applying any pressure., Applying pressure past the reference voltage has no affect. Does anyone have any experience using th LM339 in this application?
Thanks!
chuck


LM339 comparator.jpg
 Description:
 Filesize:  11.26 KB
 Viewed:  13500 Time(s)

LM339 comparator.jpg



lm339 pinout.jpg
 Description:
 Filesize:  39.38 KB
 Viewed:  13500 Time(s)

lm339 pinout.jpg


Back to top
View user's profile Send private message Visit poster's website
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2743
Location: New York
Audio files: 24

PostPosted: Thu Feb 28, 2008 12:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, if the REF is +3V (V-) and the Vin is grounded (V+), and the output is pulled up to Vcc via a resistor and you are still getting Vcc at the output, then the comparator is probably bad assuking Vcc and ground are properly connected.

That output should be saturated and pull the putput pin to 0V ideally. Do all sections of the comparator do this? Also, don't leave any other inputs on the other comparator sections floating and bypass the Vcc pin to ground with a 0.1 uF capacitor.

BTW: Can you show the entire circuit schematically for us?

Bill
Back to top
View user's profile Send private message Send e-mail
hylaster



Joined: Apr 11, 2007
Posts: 4
Location: Oakland

PostPosted: Thu Feb 28, 2008 9:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Same thing happens on all four comparators. FWIW - I have tried 3 different chips and 2 breadboards, so this must be user error.

I am using a 9v battery for power. See the attached, poorly-drawn schematic. In this version REF is more like 4.5v, after a voltage divider between the +9v and REF input.

All unused input pins are tied to ground. I am not sure what you mean by grounding Vin as there is only an FSR (two pins) between it and +9v.

Thanks for the help!


lm339.jpg
 Description:
 Filesize:  22.3 KB
 Viewed:  194 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

lm339.jpg


Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20480
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Fri Feb 29, 2008 9:50 am    Post subject: Reply with quote  Mark this post and the followings unread

hylaster wrote:
as there is only an FSR (two pins) between it and +9v.


And that's exactly the problem Very Happy

The FSR will not lower the voltage on the +input as the +input has a very high impedance. You'll need an extra resistor from the +input to the ground to make the FSR and that resistor act as a voltage divider. The value of that restor would depend on the value range of the FSR. When you don't know that just experiment a bit with the value, you can't do any harm there.

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2743
Location: New York
Audio files: 24

PostPosted: Fri Feb 29, 2008 11:04 am    Post subject: Reply with quote  Mark this post and the followings unread

I second that Jan Wink

Bill
Back to top
View user's profile Send private message Send e-mail
hylaster



Joined: Apr 11, 2007
Posts: 4
Location: Oakland

PostPosted: Fri Feb 29, 2008 8:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

That was it! Thanks so much.
Back to top
View user's profile Send private message Visit poster's website
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2743
Location: New York
Audio files: 24

PostPosted: Sat Mar 01, 2008 7:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hylaster, welcome to electro-music BTW !!!

Bill
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [7 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use