gatesphere 45 Posted September 11, 2010 Author Share Posted September 11, 2010 I'm sure you have, but have you tried giving P1.5 a high signal manually? If that works, we're not missing anything in the code, so it'd have to be in the sensor. But you said that the sensor checked out fine on the oscilloscope (was that at 3v?), so it must be in the code... :roll: Yes, I have, the code responds fine... Also, I ran it under my o-scope at both 3V3 and 5V, and also powered directly from the LaunchPad. It works just fine there. *shrug* I think it could possibly be interference, but I don't rightly know. I'm still going to guess that it's the output voltage, even though it's well above the .7V for HIGH logic on an MSP430. At this point (if it were my project), I'd probably put the whole thing in a box (maybe with a cat) and say it was both working and not working... Nice, but I'm not Schr Quote Link to post Share on other sites
juani_c 66 Posted September 11, 2010 Share Posted September 11, 2010 Just an aclaration; when the book says 0.7VCC, I think that means the 70% of Vcc, that is above 2.3V for HIGH, anyway it seems not to be a problem as you said that when powering the sensor with 5V you get almost 3V. I'm sorry if i'm being reiterative, I don't want to confuse anyone. Quote Link to post Share on other sites
GeekDoc 226 Posted September 11, 2010 Share Posted September 11, 2010 Just an aclaration; when the book says 0.7VCC, I think that means the 70% of Vcc, that is above 2.3V for HIGH, when powered from the LaunchPad's 3V3, where it shows ~1V7. Sounds like @juani_c is onto something! -Doc Quote Link to post Share on other sites
gatesphere 45 Posted September 11, 2010 Author Share Posted September 11, 2010 I think you're right. Maybe powering from TP1 is a good idea... Quote Link to post Share on other sites
gatesphere 45 Posted September 12, 2010 Author Share Posted September 12, 2010 Ok, I have it working! The trick *was* to run it from TP1 (5V) and TP3 (GND). These two tie points (left unpopulated on the board, and also at an nonstandard spacing...) grab the 5V and GND lines straight from the USB cable. Once the PIR has been powered from these tie points, it works perfectly. It was just a case of HIGH not going quite HIGH enough. I will write up some better code using interrupts and such, and do a write up on my blog. I'll post the link here once I'm done. Oh, and sorry for all the double-posting in this topic. :-/ Quote Link to post Share on other sites
gatesphere 45 Posted September 12, 2010 Author Share Posted September 12, 2010 Alrighty! This is now a triple-post But! I have the solution! And a write-up with detailed, thorough explanation and sample code! Check it out on my blog: http://blog.suspended-chord.info/?c=11 I'm adding this link to the first post to help anybody else who might have this problem in the future. Quote Link to post Share on other sites
david_crz 0 Posted September 14, 2010 Share Posted September 14, 2010 Ok, some additional research shows that while hooked up to an Arduino's 5V, the output pin only pulses at ~3V for high. Similar results when powered from the LaunchPad's 3V3, where it shows ~1V7. So, my guess is that the MSP430G2231 isn't sensitive enough for that voltage to be called high. So now my question is... is there a way to step up that voltage without too many expensive parts? I have very little experience with electronics outside of the LaunchPad and Arduino tinkerings, so I'm asking for someone with EE experience to help. Any ideas? The input threshold on the Launchpad port is 1.35V as shown on page 19 of the datasheet: http://focus.ti.com/lit/ds/symlink/msp430g2231.pdf. It should have detected it. How about using the A/D? Quote Link to post Share on other sites
gatesphere 45 Posted September 14, 2010 Author Share Posted September 14, 2010 That would have added way too much code for something that should have worked out of the box. I thought about going that route, I just didn't want to make my code any more complex. Quote Link to post Share on other sites
GeekDoc 226 Posted September 14, 2010 Share Posted September 14, 2010 The input threshold on the Launchpad port is 1.35V as shown on page 19 of the datasheet: http://focus.ti.com/lit/ds/symlink/msp430g2231.pdf. It should have detected it. How about using the A/D? @david_crz: 1.35v is the minimum spec. In other words, if you hit that level, some MSP430s in any given production run will sense a high. The max spec. is 2.25v; if you hit that level, any MSP430 in the batch will detect a high. It seems gatesphere's chip's threshold is above the 1.7v he was able to get to it. @gatesphere: With my newfound education on transistors, it seems a simple 1 or 2 transistor amplifier would work. I'll let the smarter folks explain exactly how that works, though. -Doc Quote Link to post Share on other sites
gatesphere 45 Posted September 15, 2010 Author Share Posted September 15, 2010 @Doc: I was thinking transistors... but I don't have any. *shrug* I'm a bit of a square-peg/round-hole/giant-mallet kind of person. I have a small problem, and I fix by grossly overcompensating Quote Link to post Share on other sites
GeekDoc 226 Posted September 15, 2010 Share Posted September 15, 2010 I have a small problem, and I fix by grossly overcompensating I see... so, a quad op-amp chip then? I have a bunch of transistors in my parts drawers. I can't remember if they're NPNs or PNPs, but it shouldn't make much difference (polarity). If you'd like me to pop a few in the mail, just PM me and I'll have them on their way tomorrow. No problem at all; would be happy to do it. (I have some quad op-amps too, if you want one. ) -Doc Quote Link to post Share on other sites
gatesphere 45 Posted September 15, 2010 Author Share Posted September 15, 2010 Thanks for the offer, but I seem to be having a bout of missing packages lately... I'd gladly accept, but I'd rather your parts not get lost in the mail, and I'd feel like I should pay for postage. Thank you for the offer though! It's greatly appreciated Quote Link to post Share on other sites
GeekDoc 226 Posted September 15, 2010 Share Posted September 15, 2010 The transistors cost pennies years ago, and postage is still under $0.50. The offer stands if you change your mind. -Doc Quote Link to post Share on other sites
gatesphere 45 Posted September 15, 2010 Author Share Posted September 15, 2010 Hmm... check your inbox. Quote Link to post Share on other sites
NJC 17 Posted September 16, 2010 Share Posted September 16, 2010 Transistor design is quite fun (unless its for something that you don't want to do). It gets quite in depth if you start doing frequency analysis on them, but I don't think that's much of a problem for what you guys want. I would recommend downloading some version of SPICE if you will be doing any kind of analog designs. LT Spice is decent. Currently I am using TINA, TI's SPICE. PSPICE is the best, but its a few thousand dollars if I remember correctly. NJC Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.