Assigning input 0 for infrain on 28X

Kushal901

New Member
Im using a picaxe 28X for my infrared night light project. On the prototype board, I am able to solder in the infrared components, but when i make my own board, there is no space for the infrared components. I therefore made another board for the infrared receiver as shown on the infrared datasheet (http://www.rev-ed.co.uk/docs/axe040.pdf) After connecting all my components, I connected my output for the infrared board, to the digital input 0 on my main circuit board. Do i have to assign pin 0, so that it knows that it is looking for an infrared input? And if so, how? :confused:
Kush
 

kmp24

New Member
yes , gubbins is right, you should have foreseen the issue with the infrared receiver, more planning needed ;)
 

Kushal901

New Member
COuld someone please help me rather than just telling me to restart, if i replaced the space for the infrared reciever with a separate PCB wired into the same place, i shouldnt have to restart should i?
 

Gubbins

New Member
1I think you should get started unless time is not a problem for you. unless kmp24 can't see a way around this then i'm sorry, but you're pretty much on your own. Sorry :(.
 

kmp24

New Member
well, i think that you should just follow gubbins advice and restart your board, unles you find some faults in your current one,
look out for bridging between poorly soldered joints:)
 

eclectic

Moderator
Kushal.
This program DOES work, if your circuit
is wired correctly. (See the Axe040 pdf or Manual 2 page 78).

#picaxe 28X
main:
infrain
sertxd (#infra,cr,lf)
pause 500
goto main

It will show the value of the keys you press.

And, if it doesn't work , check the wiring.

e.
 

hippy

Ex-Staff (retired)
when i make my own board, there is no space for the infrared components. I therefore made another board for the infrared receiver ... After connecting all my components, I connected my output for the infrared board, to the digital input 0 on my main circuit board. Do i have to assign pin 0, so that it knows that it is looking for an infrared input? And if so, how?
Having your IR components on a separate board is electrically no different to having put them on the main board to start with. Your IR components go to Pin 0 just as they would have with a single board, so just do the same as you were planning to if there had been enough space to fit the components on the main board.

Simply use INFRAIN just as you would have, nothing special needs to be done to use Pin 0 this way.

If you've put anything else on your separate IR board other than the components which should have been on the main board then it could be a different story. If you've done something other than just move the IR components off-board let us know, otherwise just go ahead and use it as if the boards were a single board.

If there are any problems it may be necessary to add some extra power supply filtering and smoothing on the IR board but with fingers crossed, assuming it's not on half a mile of cabling, you should be okay.
 

Nimz

New Member
wise words by gubbin and kmp24. maybe yous should check if uve got pin 1 and 3 on the infrared reciever connected correctly. its an easy mistake to make. also, if you check the ground rail, tht might make things better also....;)
 

hippy

Ex-Staff (retired)
wise words by gubbin and kmp24
As in 'you've got it wrong, throw it away, start again' ?

Engineering is littered with mistakes along the way and electronic design is no exception. It is quite common to discover something has been left out of a circuit, only later find that something necessary wasn't included and it may not even be realised something is necessary when the circuit is first designed. This is the 'prototyping' all projects and products go through.

The circuits we find in electronics we use today will invariably be the result of a long process of 'getting it wrong' and modification to make them work. Soldering on extra components, connecting separate boards, cutting tracks and all sorts of 're-work' are part and parcel of the design process, and there's nothing wrong with that.

Where a board can be modified to make it work that's just as legitimate as starting again and is often more cost-effective and quicker than restarting, especially if PCB's or other boards have already been designed and built.

One wouldn't necessarily consider it wise to demolish a multi-million dollar building and start again because something fundamentally important was overlooked, it would be much wiser to consider how what exists can be modified to deliver what should have been included. If the end result is what was required in the first place it doesn't really matter how that is achieved.

Likewise, one doesn't usually throw their entire dinner in a bin because some of it burnt.

While there can be merit in restarting, it's not always necessary to do so immediately. Even with a restart more unexpected problems may arise which require further changes. It is usually better to get as much working as possible before a re-design or restart; that minimises both effort and cost and the number of restarts there may be.

Kushal901 undoubtedly "got it wrong", but has shown good initiative in the approach to working round that mistake. Sometimes there's no choice but to restart but other times it's not necessary to do so.

If you asked a room full of electronic engineers to put their hands up if they'd never made a mistake there would be very few who could. Many would say that anyone putting their hand up hadn't experienced enough to truly call themselves an engineer :)
 

Dippy

Moderator
I agree with hippy, though I may have said it just a single paragraph.

I made this kind of mistake yestrday - not leaving enough space for a heatsink.

Kush has done exactly the right thing to breakout from board with a sub-board.
After all, no point making another board if something else is wrong...

There are exceptions, of course, where a whole new board has to be made i.e. where track lengths and impedances are important - but not in this case.

"Many would say that anyone putting their hand up hadn't experienced enough to truly call themselves an engineer :)" - slightly snobby but I get the gist. They could be new-boys, geniuses, liars or simply deaf.

There, all in one paragraph.
 
Top