Jump to content
43oh

Parallax PIR sensor and LaunchPad - help?


Recommended Posts

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...

:lol:

Nice, but I'm not Schr

Link to post
Share on other sites
  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Just a heads up. If you want a similar PIR sensor for cheaper, and it comes with a bonus case with 2AA holder and plenty of space ;P   Radioshack sku 630-0282 Clearance item/Close Out price. The bi

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.

Link to post
Share on other sites

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. :-/

Link to post
Share on other sites
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?

Link to post
Share on other sites
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

Link to post
Share on other sites
I have a small problem, and I fix by grossly overcompensating :P

 

I see... so, a quad op-amp chip then? :lol:

 

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. :D )

 

-Doc

Link to post
Share on other sites

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...