Please read, need urgent help for school project!

Hi, I'm a High school student who is doing a major work for my subject Design Technology.
Before I ask for your help I will give you a brief over view, of what product I'm designing for my major project so that any
confusions of what my questions are regarding, are clear to you.

For my design I have incorporated a pickaxe into a shelf which I have made. I have currently purchased and
assembled together a PICAXE 20M2. In that i have pursuits in using the picaxe to give life and function to my shelf as to for-fill
a design brief of purpose and need.
The Product design itself is an illuminating shelf run by LEDs, in which is controlled by a picaxe. The picaxe receives a signal from a infra-red sensor, to which is located below the shelf. So that whenever someone walks pass the shelf the infra-red sensor will pick up,and it then sends a signal to the picaxe saying ie. someone has walked pass to which it then triggers the second sensor, sandwiching the ends of platform of the shelf where you put your Important belongings ie Key,wallet,phone. The sensor sandwiching the ends of platform of the shelf allows the picaxe to know if anything is placed onto the platform of the shelf as the weight from the belongings push the platform down to hit contact with the sensor. If the sensor in-between the platform of the shelf doesn't move, after getting a signal of someone walking past the shelf from the infra-red sensor, the picaxe in the shelf will then send a signal to illuminate the red LEDs inside the shelf, to grab the attention and warn the owner who walked into the house from the front door, that they haven't placed there Key,wallet, phone onto the shelf.

The purpose of this product was to shape human behaviour to have a good habit of having your important belongings somewhere placed to be easily accessible for your Keys wallets and phone. So situations are prevented ,such as like your bus is coming in 5 mins , and that your not spending the 5 mins finding your Key,wallet and phone. Its right on the shelf in front of your door so you can take straight away and leave your house so that you don't miss your bus.

In order to fore fill the purpose of my product I have a few questions
see below-
1. First where can I find a infra-red sensor in which is compatible to send signals to my picaxe, programming wise and if so how to program?
2. If there is no infra-red sensor in which can be incorporated into my picaxe, is there any other alternatives for sensor in which can substituted for my shelf, so that it fore fills my function of my design?
3. Also if there is a infra-red sensor in which can be compatible with my picaxe, how do i program it into my picaxe? I so far know from reading the Picaxe manuals that (readadc) is to read analogue inputs into the picaxe,but im not even sure if thats right tho. so how do I program it if so?
4.Lastly if there is any suggestion of what type of sensors could be incorporate into my product design please leave the name of the type of sensor or provide a link to it.

(EDIT

Here is a picture of my product to give you a further insight of the form.

The bottom part of the picture is the side view of my shelf the top right picture is the side panels to seal of the hollow opening of my shelf and the top left picture is my picaxe 20m2 which will sit inside against the back part of the shelf in which will be supported against a wall. Also there will be LEDS inside to illuminate the shelf and sensors under the shelf etc...)

11111111111111111111.PNG

Once again thanks you very much for your time in reading this and your suggestions, I greatly appreciate if you have contributed in giving feedback to my Thread, and hope to see your reply soon.
 
Last edited:

westaust55

Moderator
Welcome to the PICAXE forum.

While I realise that you have provided a lot of information which is good, there are still some questions for you:
Are you intending to use an IR LED to send an IR beam out from the shelf such that when a person is walking past they reflect some of the IR light to the IR receiver.

There are certainly IR LEDs and IR receiver parts readily available but getting a good reflection from a person walking past may be difficult. Also if there is a lot of sunlight entering the room (assuming it is indoors) then some of that light will be detected by the IR receiver.
For this reason it is good to modulate the signal and use an IR receiver designed to detect a 38 kHz or 40 kHz IR beam. However the PICAXE can only do one thing at a time so while sending out the IR signal it cannot also be receiving any reflected signal.

I believe someone on this forum has managed a project to send and receive IR from the same PICAXE chip but you would need to study that or consider two chips – one to drive the IR LED and one to monitor the IR receiver.
 

westaust55

Moderator
Jaycar can sell you the IR LED: http://www.jaycar.com.au/productView.asp?ID=ZD1945
also an IR receiver: http://www.jaycar.com.au/productView.asp?ID=ZD1952

likewise Altronics:
http://www.altronics.com.au/index.asp?area=item&id=Z0880
http://www.altronics.com.au/index.asp?area=item&id=Z1611A

But if the distance you are considering will be more than a couple of metres distance, an ultrasonic sensor may be a better option
as clothing generally will not reflect IR beams well.

For programming there are the options to use the IRIN and IROUT commands or even the SERIN and SEROUT commands.

Have a read of the basic tutorial I posted here:
http://www.picaxeforum.co.uk/showthread.php?17303-Infrared-(IR)-Communications-Basic-Tutorial
this uses the SERIN and SEROUT commnds as it was written before the newer M2 chips became available.
But it will help you to understand more about IR signals in general.
(Remember - if you copy word that is okay but DO also reference where the information was obtained).
 

grim_reaper

Senior Member
Hi Henryhens66,

For detecting humans walking past, as your design describes, I would look at 'passive infra-red detectors' (AKA PIRs) if I were you.
There is a selection here, but they can be obtained locally once you know what you're looking for.
The 'raw' sensors can be tricky to calibrate accurately, so I prefer to use the module versions - most of which have a built in delay timer and/or sensitivity adjustment.
Also, some have an analogue output, but most are digital, simplifying interfacing to a PICAXE no end :D

Grim
 

westaust55

Moderator
With the PIR's as suggested by grim_reaper, again the same electronics store here in Australia can help you:
http://www.futurlec.com.au/Search3.jsp?
http://www.futurlec.com.au/PIR_Sensors.jsp

or more household style products:
http://search.jaycar.com.au/search?w=PIR&view=list
http://www.altronics.com.au/index.asp?search=PIR&area=srch&Submit=SEARCH

Keep in mind that the house security type are considerably more expensive than the basic IR LED and IR receiver, need a 12 Volt supply but have a contact type digital output, but whether you budget or the schools criteria allows higher costs only you know.

EDIT:
since this project is deemed to be URGENT, how long you have to buy the parts and test may be important.
Jaycar and Altronics have all parts in store.
Littlebird Electroncis have some parts in store but beware others are 7 days before sending (while they get them into their store)
Futurlec are cheap but they ship from a warehouse in Thailand and unless you try airmail at greater cost, surface/ordinary mail will take around 10 to 14 days to Sydney.
 
Last edited:

Hemi345

Senior Member
Concerning your weight sensor, I think you could simplify your project by just having a button the person could press once they have put their wallet,keys, and phone on the shelf rather than a 'floating' shelf trying to detect weight.

Neat project, good luck with it :)
 

rossko57

Senior Member
For "passerby detection", as well as PIR you might also consider other devices from security market
e.g. break beam
http://www.ebay.co.uk/itm/Single-Beam-Photoelectric-Detector-Active-IR-Sensor-/360655281729?pt=LH_DefaultDomain_3&hash=item53f8bade41#ht_2120wt_978
pressure mat
http://www.ebay.co.uk/itm/INTRUDER-SAFETY-SECURITY-ALARM-SYSTEM-PRESSURE-ACTIVATED-MAT-PAD-/200928751234?pt=UK_Burglar_Alarms&hash=item2ec8496e82
all depends on the location

Do you need to tell if the passerby is coming in or going out? That is harder, but I don't see a need for it?
 

Paix

Senior Member
Novel project Henry. Behaviour conditioning . . . adolescent conditions parents to place wallet and car keys in memorable place in the hall.
[humour break]
You have omitted the security and wear and tear aspect and a follow up project should be to have the disposable cash held secure in your bedroom. Joking of course, but it could be viewed as a value added service. I don't suppose for one minute that mum and dad would see it that way, but you have to think outside the box to be an entrepreneur :)
[/humour break]
 

gbrusseau

Senior Member
The problem with a PIR is that it can be triggered by turning on the lights in the room or by opening a window shade or even when the heater comes on in the room. You might be able to mask the PIR so only a very narrow viewing angle is seen by the PIR. The good new is that a Dual Element PIR can tell if a person is coming or going. Good luck on your project.
 

SAborn

Senior Member
I used these PIR to control leds fitted into a hallway ceiling for transit lighting, and they work very well.

http://www.ebay.com.au/itm/140630318226?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649#ht_4355wt_1170

The overall size of the complete pir is smaller than the tip of your little finger and can be hidden away rather neatly, they have a fixed 20 second on latch time which works well for my application and would work for the school project, allowing 20 seconds before retriggering again.
The pir with adjustable time and sensitivity are much larger (about a 20c piece size) and are just ugly to work with being so bulky and hard to mount neatly.
 
How do you program a sensor, into a Picaxe? HELP?

Hi just wondering if you would know how to program an in-fared sensor into a picaxe?

Before you read further into my thread, here is some background details on my project on what it is about ,see link below-


http://www.picaxeforum.co.uk/showthread.php?24112-Please-read-need-urgent-help-for-school-project!



Right now on my project I'm stuck on how to actually program my picaxe to read a infa-red sensor. Example someone walks pass the sensor and obstructs the infared laser and from this it then triggers another sensor from a shelf in which if the owner doesn't put their belongings on-top of he shelf , triggered by a sensor located between the platform of shelf in which it will hit contact, if the belongings are placed on the platform. So if nothing is placed onto the shelf in which the platform of the shelf doesn't move to hit contact with the sensor, the picaxe will pick this up and illuminate the shelf with LEDS, warning the owner that they havn't placed their key wallet phone on the shelf...

So if there is any ideas on how to program this behaviour of my shelf if there is any snippets of coding you could post below to help towards my pursuit of my project , it will be much appreciated and hope to talk to you soon :)
 

MikeAusP

Member
Why aren't you following up on the many detailed suggestions given on the original thread.

Not even bothering to make the briefest of replies to any of the suggestions made there, is not the way to get future support on a forum.

EDIT - This comment is going to look weird, unless you know that Post #12 above and this post were a totally new thread . . . then these two got merged into the original one.
 
Last edited:

westaust55

Moderator
Which IR sensor are you seeking to connect to the PICAXE ?
I looked at your earlier thread and there were many suggestions on what IR sensor to use but which did you select?
We need to know so we can tell you what to do to "read" the signal.

If it is a simple PIR with a contact closure for activated and idle state, then you need a pull down resistor on the PICAXE input and the PIR switch contact from +5 Volts to the same PICAXE input. Connections as per PICAXE manual 3 page 26 Then in the PICAXE you monitor the contact state with some IF...THEN commands.

If it is say a TSOP4838 3 leg IR receiver then you need a pull up resistor and a electro capacitor connected as per PICAXE manual 2 page 125. Then you can use the IRIN command.
But this also needs something to send an IR signal to the IR receiver.

Trust that you can see that you need to provide us with information about exactly what parts you have before we can help much more.

Your earlier thread indicated that your project was urgent for a school project.
Then you need to help us so that we can help you with less time lost asking you questions.
 
Jaycar can sell you the IR LED: http://www.jaycar.com.au/productView.asp?ID=ZD1945
also an IR receiver: http://www.jaycar.com.au/productView.asp?ID=ZD1952

likewise Altronics:
http://www.altronics.com.au/index.asp?area=item&id=Z0880
http://www.altronics.com.au/index.asp?area=item&id=Z1611A

But if the distance you are considering will be more than a couple of metres distance, an ultrasonic sensor may be a better option
as clothing generally will not reflect IR beams well.

For programming there are the options to use the IRIN and IROUT commands or even the SERIN and SEROUT commands.

Have a read of the basic tutorial I posted here:
http://www.picaxeforum.co.uk/showthread.php?17303-Infrared-(IR)-Communications-Basic-Tutorial
this uses the SERIN and SEROUT commnds as it was written before the newer M2 chips became available.
But it will help you to understand more about IR signals in general.
(Remember - if you copy word that is okay but DO also reference where the information was obtained).
Ye this looks good thanks very much , i was thinking on using a normal in-fared sensor one which you are used in entry for shops. Does this IR LED a reciever do the same thing? and how would you program this into my picaxe 20m2? im using picaxe program editor and flowchart, as its a new program for the M2 gen picaxes.
 

westaust55

Moderator
@henryhens66,
since you have now gone back and posted in your earlier thread at 12:34 today, I am going to merge the two threads to keep all of this together since it is on the same topic.

Your response in the other thread does not clearly indicate which IR receiver you have settled upon. You do need to be clear about exactly what part you have bought or are going to buy so we can give a clear answer.
 
@henryhens66,
since you have now gone back and posted in your earlier thread at 12:34 today, I am going to merge the two threads to keep all of this together since it is on the same topic.

Your response in the other thread does not clearly indicate which IR receiver you have settled upon. You do need to be clear about exactly what part you have bought or are going to buy so we can give a clear answer.
Yes, im actually new to all this Infa-red stuff , as im only a student so i simply need a sensor which can pick up people walking past it, like a infared sensor, which you suggested earlier , in which shoots a laser out onto a reflector where if anything obstruct it, it then can send a signal to my picaxe, to then trigger a second sensor which is located at the end of the shelf platform in which is sandwiching it so that it can detect any placement of belonging, through the movement of the shelf contacting with the sensor. This whole process is to indicate if the owner has put there belonging onto the shelf when entering their house.
 

westaust55

Moderator
If you use the IR LED and IR receiver as per the links I provided to Jaycar, you will also need another PICAXE chip or some other means to send a burst of signals to the IR receiver component otherwise nothing is detected that the receiving PICAXE can use.

Since your project is urgent (but we do not know the time you have left, I would suggest the easier PIR type devices as per the link given by MikeAUS2 at post 6.

http://littlebirdelectronics.com/products/pir-motion-sensor-module - 7 days to dispatch
http://littlebirdelectronics.com/products/digital-infrared-motion-sensor - available to send out today

These give a low or high signal state depending on whether a warm object (ie a person) is detected in range which should require less work/connections to get it going in view of the time and your experience.

You may need to mount that PIR sensor in something like a short cardboard tube so that the viewing angle of the sensor is reduced and it only detects people more or less directly in front of the sensor.
 
Hi Henryhens66,

For detecting humans walking past, as your design describes, I would look at 'passive infra-red detectors' (AKA PIRs) if I were you.
There is a selection here, but they can be obtained locally once you know what you're looking for.
The 'raw' sensors can be tricky to calibrate accurately, so I prefer to use the module versions - most of which have a built in delay timer and/or sensitivity adjustment.
Also, some have an analogue output, but most are digital, simplifying interfacing to a PICAXE no end :D

Grim
OK ye , is there anything that is more simpler to use as you mention you need to calibrate the sensor accurately ,as i'm a student i don't know how to do that. i just simply need a sensor which can read if someone walks past.
 
If you use the IR LED and IR receiver as per the links I provided to Jaycar, you will also need another PICAXE chip or some other means to send a burst of signals to the IR receiver component otherwise nothing is detected that the receiving PICAXE can use.

Since your project is urgent (but we do not know the time you have left, I would suggest the easier PIR type devices as per the link given by MikeAUS2 at post 6.

http://littlebirdelectronics.com/products/pir-motion-sensor-module - 7 days to dispatch
http://littlebirdelectronics.com/products/digital-infrared-motion-sensor - available to send out today

These give a low or high signal state depending on whether a warm object (ie a person) is detected in range which should require less work/connections to get it going in view of the time and your experience.

You may need to mount that PIR sensor in something like a short cardboard tube so that the viewing angle of the sensor is reduced and it only detects people more or less directly in front of the sensor.
Do you know anything about how to program these sensor into the picaxe, as the programming sector of my project is my major downfall, as im knew to this whole picaxe thing and such as using the programming editor
 
For "passerby detection", as well as PIR you might also consider other devices from security market
e.g. break beam
http://www.ebay.co.uk/itm/Single-Beam-Photoelectric-Detector-Active-IR-Sensor-/360655281729?pt=LH_DefaultDomain_3&hash=item53f8bade41#ht_2120wt_978
pressure mat
http://www.ebay.co.uk/itm/INTRUDER-SAFETY-SECURITY-ALARM-SYSTEM-PRESSURE-ACTIVATED-MAT-PAD-/200928751234?pt=UK_Burglar_Alarms&hash=item2ec8496e82
all depends on the location

Do you need to tell if the passerby is coming in or going out? That is harder, but I don't see a need for it?
Well that was the aim for my project after getting the simple mechanics of the shelf up and running , there was an idea of putting a sensor on the door in order to detect if their leaving the house or coming in as if they walk past the shelf and open the door triggering an order of the detection for the sensors the picaxe will then know the owner is leaving and vise versa
 

westaust55

Moderator
What is your time frame for your project?

You mention you have a PICAXE chip but what other parts do you already have?
A proto-board or development board. Does it have to be soldered for the school project or can you use a breadboard – as a temporary circuit ?

I had mentioned in an earlier post that times from Futurlec will take around 2 weeks by ordinary mail and maybe a 1week by air mail from Futurlec to the east coast of Australia.

That is why I gave links to two part at littlebird electronics above. One could be sent today if you ring/order today.

Next you need to start considering the sensor to detect it the items have been put on the shelf. I recall you were given some earlier comments on this. See what you can find yourself and let us know and folks here can indicate if suitable or offer better suggestions. We would need to know intended size and weight/load capacity required.

I have to get back to paying work now but we will look back later to see how further help can be given.
 

westaust55

Moderator
Do you know anything about how to program these sensor into the picaxe, as the programming sector of my project is my major downfall, as im knew to this whole picaxe thing and such as using the programming editor
Both are very easy to use.

The second sensor I linked to can run on 4.5 V or 5 V (use the same supply as the PICAXE chip) then once powered up, it holds the output high until movement is detected and then the output goes low.

For this you can use:
Checking:
IF <picaxe input> = 1 THEN GOTO Checking: ; wait for sensor to be activated and input to go low (=0)
; here if there is movement detected so do something like turn on LEDs.
 

lewisg

Senior Member
... how to program these sensor into the picaxe ...
This appears to be a stumbling block for you since you have asked it multiple times. You cannot "program a sensor into" a processor. It does not work that way.

In general computers have inputs and outputs. As I understand your project you need two inputs (person detection and object detection) and one output (light up a shelf). A PIR sensor is the easiest way to detect a warm body so that is your first input. Think of the PIR as a switch, someone there it's closed. Detecting objects could be done with a small scale, a photo sensor, a switch or... This is your second input. For the output side if you want to light up more than one small LED you will need some form of power semiconductor or a relay and driver transistor.

At it's most basic the program will look something like this:
Code:
do
  if PIR is high then
    if object is high then
      light LED
    end if
  end if
  pause 1000
loop
That is about it. You don't even need a Picaxe to do this if you use a PIR and a switch to detect object presence. Simply wire the two switches in series between power and your lights.

The forum isn't here to do your homework for you. If you want help you will need to ask questions that demonstrate that you are pursuing the advice given to you.
 
What is your time frame for your project?

You mention you have a PICAXE chip but what other parts do you already have?
A proto-board or development board. Does it have to be soldered for the school project or can you use a breadboard &#8211; as a temporary circuit ?

I had mentioned in an earlier post that times from Futurlec will take around 2 weeks by ordinary mail and maybe a 1week by air mail from Futurlec to the east coast of Australia.

That is why I gave links to two part at littlebird electronics above. One could be sent today if you ring/order today.

Next you need to start considering the sensor to detect it the items have been put on the shelf. I recall you were given some earlier comments on this. See what you can find yourself and let us know and folks here can indicate if suitable or offer better suggestions. We would need to know intended size and weight/load capacity required.

I have to get back to paying work now but we will look back later to see how further help can be given.
My time frame for this project is due in 3-4 weeks as this is for my school expedition but its formally due in by 26 August for final markings.
Yes i do have a picaxe model: 20m2 i also have made my shelf, im still looking for a sensor or some time of infared but motion sensor could be much more easier to use as mentioned in feedback of thread. For the in-fared led and reflector does it do the same thing as a motion sensor to detect something going past it from the perspective of my project , as jar car is much more easier to access for me. Actually from your perspective ,which would be more suitable for my project the Motion sensor or the infared sensor led sensor and reflector? There is also another component to my shelf where the sensor is sandwiching the end of the platform of the shelf in which when someone places their belongings onto the shelf it will then hit contact with the sensor as the platform bends due to weight of object ,with this sensor where can i get one of those if im explaining it clear enough, or is there a more better alternative to this operation?
 
This appears to be a stumbling block for you since you have asked it multiple times. You cannot "program a sensor into" a processor. It does not work that way.

In general computers have inputs and outputs. As I understand your project you need two inputs (person detection and object detection) and one output (light up a shelf). A PIR sensor is the easiest way to detect a warm body so that is your first input. Think of the PIR as a switch, someone there it's closed. Detecting objects could be done with a small scale, a photo sensor, a switch or... This is your second input. For the output side if you want to light up more than one small LED you will need some form of power semiconductor or a relay and driver transistor.

At it's most basic the program will look something like this:
Code:
do
  if PIR is high then
    if object is high then
      light LED
    end if
  end if
  pause 1000
loop
That is about it. You don't even need a Picaxe to do this if you use a PIR and a switch to detect object presence. Simply wire the two switches in series between power and your lights.

The forum isn't here to do your homework for you. If you want help you will need to ask questions that demonstrate that you are pursuing the advice given to you.
OK , thanks is there any website or tutorials you could suggest that could aid me into programming this as i'm just only a student and very new to this picaxe sector.
 

lewisg

Senior Member
OK , thanks is there any website or tutorials you could suggest that could aid me into programming this as i'm just only a student and very new to this picaxe sector.
RTFM for a start. Especially 1 & 3. 2 is handy when you need more specifics
 

SD70M

Senior Member
OK , thanks is there any website or tutorials you could suggest that could aid me into programming this as i'm just only a student and very new to this picaxe sector.
Sorry but I couldn't keep quiet anymore.

You are continually asking for help with the programming. This forum has people who are, IMO, geniuses when it comes to rpogramming the picaxe chips. That's what they have been doing for a long time.

The problem you have, wherever you go for help, is
1) not answering questions posed to you, and
2) not making the decision of which parts to use (despite numerous suggestions and advice).

Once you have decided on the parts and answered the questions requesting this info, then the forum will assist you in getting the thing to work.

Sorry for rant but 2 pages of members putting themselves out to help with no feedback has got to me!!! Maybe it's the shock of sun in the UK!!!!!

GO LIONS ;)

Angie
 

rossko57

Senior Member
there was an idea of putting a sensor on the door in order to detect if their leaving the house or coming in as if they walk past the shelf and open the door triggering an order of the detection for the sensors the picaxe will then know the owner is leaving and vise versa
Yes, that can be done, and as you've figured out the order in which things happen is the key.

A simple switch worked by the door would do perhaps? As used in burglar alarms.

That leaves the 'passerby' detection at the shelf - here a PIR or a break-beam could be used. The choice is up to you, depends on what's available / cost / how you are going to deploy it. PIR are easier to use but more likely to pick up stray movements - pets maybe? Break beam require two parts to be installed. This is your choice.

Counting whatever you use for shelf-occupation (is that really needed?) that makes three inputs and one output for your project.

Your programming is likely to need to involve some timing e.g.
When 'door' is triggered, start a timer for NN seconds
If 'passerby' is triggered when the timer isn't running, are going out.
If 'passerby' is triggered when the timer is running, they are coming in, and we should flash lights.
 

westaust55

Moderator
@henryhens,

There is no need to reply by first quoting the entire post you are responding to.

If you use the reply with quote, remove all but the relevant sentence you are responding to.
Alternatively use the Reply to Thread button at the bottom left of the thread page and you can address a specific person by using the "@" symbol followed by the forum member name (as I have done here).
 
If you use the IR LED and IR receiver as per the links I provided to Jaycar, you will also need another PICAXE chip or some other means to send a burst of signals to the IR receiver component otherwise nothing is detected that the receiving PICAXE can use.
Sorry I'v come back to this post later on, as you said that you need two picaxes for the IR led and IR receiver in which I intended to use in my project, in this case i don't have two picaxes. I have decided to use an alternative of maybe a IR motion sensor provided by a fellow post (see link below)-
http://littlebirdelectronics.com/products/digital-infrared-motion-sensor
or maybe even a radial sensor , also provided as a post-
http://www.futurlec.com.au/PIR_Sensors.jsp
There is also a consideration of maybe a ultrasonic sensor.
What do you think out of the options , IR motion sensor , radial sensor or a ultrasonic sensor would be the best choice to incorporate into my project.
Also for the suggestion how will i program it.
Sorry about wasting your time in helping me before on how to program the IR sensor and receiver ,as iv changed
decision on using a different sensor due to IR led and reciever outcomes of needing to get another picaxe in order for the operation to work.
 
I used these PIR to control leds fitted into a hallway ceiling for transit lighting, and they work very well.
Ye that looks good that's quiet similar to what my project is except with a shelf , as I'm considering to use the IR motion sensor , do you have any idea on how to program this sensor, through the PIC programming editor or maybe through the PIC flowchart for M2 gen PICs?
 
...picaxe themselves are CHEAP....
Well i bought my picaxe from the US , its cheap if your a local buyer over there but when its convert to AU cost me 50 dollars more and a bit, plus postage fee.
Plus i did some research on obtaining one locally in AUS but components needed to bought separately , such as USB programming cables costing up to 30 AUS Dollars! or was generally more expensive.
 

Axel87

Senior Member
Are you talking the Picaxe chips or a kit for 50?
The chips themselves should be cheaper than that, and if youve already got some supplies lying around one can build the download circuit and cable.
The way ive set up my workbench( might not be best practice) but I have the AXE081? not sure number basic kit ,use that to program and test the circuit with a breadboard then just move the chip. 50 bux up front but now for future projects I just need to order another pic.
but the chips themselves are only a couple bux, unless your planing on a 40x2. I am new to these as well, so the snr guys may have better opinions or options to offer.
 

SAborn

Senior Member
Ye that looks good that's quiet similar to what my project is except with a shelf , as I'm considering to use the IR motion sensor , do you have any idea on how to program this sensor, through the PIC programming editor or maybe through the PIC flowchart for M2 gen PICs?


Basically you would connect the sensor output directly to a picaxe input pin (for example C.1), as the sensor output will remain HIGH for 20 seconds after its been activated, then in program you will need to latch this data so it only triggers a action once and not repeditive for the 20 seconds the sensor is high.
One advantage is it will create a 20 second delay before the IR sensor can be activated again, giving time for the person to place items on the shelf and leave the detection area.

As for how to program the sensor or more correctly write the sensor into your code, below is a quick example of using "IF" statements to detect the sensor and latch the data for a once only use, and then reset the latch after the sensor returns low again.

Code:
symbol IR_sensor = C.1
symbol detect =	 b0

main:

	if IR_sensor =1 and detect =0 then
	detect = 1
	goto do_something
	endif
	
	if IR_sensor = 0 then 
	detect = 0
	endif
	goto main
		
do_something:

	'Add your main program here that
	'you want for when an IR detection has be 
	'activated.
	
	goto main
 

westaust55

Moderator
Sorry I'v come back to this post later on, . . . .
I have decided to use an alternative of maybe a IR motion sensor provided by a fellow post (see link below)-
http://littlebirdelectronics.com/products/digital-infrared-motion-sensor
or maybe even a radial sensor , also provided as a post-
http://www.futurlec.com.au/PIR_Sensors.jsp
There is also a consideration of maybe a ultrasonic sensor.
What do you think out of the options , IR motion sensor , radial sensor or a ultrasonic sensor would be the best choice to incorporate into my project.
Also for the suggestion how will i program it.
@Henryhens,

It was myself who gave you a link 6 days ago to that particular PIR at Littlebird electronics which was available off the shelf.
From post 25 also 6 days ago:
My time frame for this project is due in 3-4 weeks as this is for my school expedition but its formally due in by 26 August for final markings.
YOU must make a decision and buy something!
Folks here can keep giving suggestions forever with different makes and models but your project will never be built in time if YOU do not make the final decision and act/buy.

Once you have purchased the parts and advise the forum exactly what you have bought with a datasheet link then, even before it arrives, we can give you some guidance on how to hook it up and some basic code to monitor the PIR.
 
Last edited:
@westaust55

Ye sorry again , Out of the three sensors you suggested which one is the most appropriate for my project?, as I'm not sure which to use.

IR motion sensor, radial sensor or ultrasonic sensor?
 

SAborn

Senior Member
If it was me i would try the "Low Power Mini PIR Sensor Module" from Futurlec as they are almost identical to the sensor i listed some post back.
Although Futurlec have been known to be very slow at posting items from what others have commented, i have never purchased from them to know.
 

westaust55

Moderator
I had also looked at the futurlec options but highlighted the Littlebird module on th basis of delivery time.
I have purchased from Futurlec and delivery times are 10 to 14 days to Perth (from Thailand).
Henry needs to consider higher cost for airmail as time is closing in for him.
 
Top