IR Download

Lliam20789

New Member
Has anyone made a cheep wireless download cable???

I tried using the same IR circuit as used for serial communication, but this didn't work.

Any ideas?

 
 

moxhamj

New Member
At a simplest level, PC sends a high signal out of the RS232 port => IR led on => photodetector on => high programming signal on picaxe. But the picaxe also sends signals back to the PC. The real problem is how to have two totally seperate IR systems that don't interfere with each other. I'm sure this is solvable - maybe with different carrier frequencies or headers. Not quite as simple as it first appears!
 

Dippy

Moderator
I'm just think out 'aloud' as I haven't checked.

If it isn't duplex (is it just handshaking?) then maybe an IRDa style link may be possible?
 

hippy

Ex-Staff (retired)
It's not quite that simple, and has similar problems as downloading over a wireless interface does. It's certainly possible, but I don't think anyone's done it. It would be good to see someone at least offer a Proof of Concept demo.

The first thing to note is that the TSOP18 receiver has an active low output, so needs to be inverted to drive Serial In.

As well as sending the serial port data over IR to Serial In, it's necessary to send the Serial Out signal back to the PC, with the extra complexity that IR from the PC mustn't interfere with the IR coming from the PICAXE and vice-versa. The PC can be sending while it is receiving, and if this isn't supported then downloads will not work.

You'll also need IR modulators / transmitters from the PC and PICAXE serial outs. These will have to accurately convey 'line level' informations, not byte data.

It should be possible to transmit both IR streams on the same carrier frequency if reflections and cross-talk are avoided, but it would be better to choose separate, non-interfering frequencies for each. That might be easier said than done. Non-modulated links like IrDA may have some scope here.

A third alternative would be something more active at each end creating a simplex ( one way at a time ) data stream. That would be possible but would require a microcontroller, or one or two PICAXE's, at each each.

An active system like this also overcomes a major 'flaw' in simpler designs - If a TSOP18 connects directly to Serial In ( via an inverter ), whenever someone presses a remote control button, the PICAXE is likely to reset and go into download mode for at least some period of time.
 

Dippy

Moderator
Yes, the final point you make is very important. It would also be a pain if fluorescent lights caused a reset. All in all quite a reliability issue.

I'm not certain whether TSOPs hysteresis may also mess things up (which IrDA doesn't suffer from), it may be fine I'm just being picky. I haven't 'scoped or fiddled so I don't know timing tolerances.

An interesting project nonetheless and I suspect will keep the experimenter off street corners for many a week. But , based on inkjet printers for pcbs, nothing would surprise me!
 

Lliam20789

New Member
You all obviously know a lot more then me!

I built two circuits, identical to an IR transmitter/reviver circuit i designed that fitted into the 08-M project board.
I then simply connected one the computer and the other to the picaxe. They also both had a battery pack.

The boards were tested and worked, but when it came to downloads it had no response at all.

I thought that the data might be sent one way at a time so interference wouldn't be an issue. Also I didn't think the receivers needed inverting... I haven't looked at this project for a while but when I get back to school I'll give you more details.

Thanks!

 
 

manxstamp

New Member
There is such a system for Basic Stamps. I've never used it so can't say if it answers your need. A Stamp expert, Sid Weaver, invented a remote IR programming system called SI-Pro; look on his web page:
http://hometown.aol.com/newzed/index.html
This works with the BS2 but I don't know if it could be adapted for PICAXE use.


 
 

hippy

Ex-Staff (retired)
Thanks for the info manxstamp. That does show that IR programming can be possible, but perhaps with caveats.

Sid's solution involves writing an IDE programming environment which calls the compilers and then takes control of the download process entirely. That makes it relatively straight forward as he can dictate what goes over the air and the protocol involved. This also allows him to select which device he wants to download to.

For the PICAXE, it means having to take what the Programming Editor 'throws out' during downloading and convey that over IR, and that's a more difficult task. What the Programming Editor puts out is not particularly nice for IR, but when writing one's own IDE that isn't an issue.

Sid's Air-Byte and Si-Pro products are what I'd envisaged; a micro at each end handling the interfaces across a common IR medium.
 

Dippy

Moderator
"What the Programming Editor puts out is not particularly nice for IR..."
What does it throw out?
What does it expect back?
 

hippy

Ex-Staff (retired)
Lliam0002 : <i>I thought that the data might be sent one way at a time so interference wouldn't be an issue. Also I didn't think the receivers needed inverting </i>

Providing reflections and cross-talk do not interfere, it would be possible to use simple IR bridges from PC to PICAXE and back again.

I may be over-estimating the problem, and it may be easier than I imagine. Start by keeping the two channels optically isolated - put them in toilet-roll tubes and cover the ends.

Electrically, the Transmitter should send modulated IR when the input is high and nothing when low. The receiver should go high when IR is received and be low when it it isn't. The TSOP18 is the inverse of that, so needs inverting, your receivers may not.

Once you've proved the hardware works, start by using the Programming Editor Terminal function reading data sent from a PICAXE using SEROUT N2400, and then reading from the PC using SERIN N2400. When that's working use an 08M and use SETFREQ M8 to test 4800 baud comms.

Once that's working, connect the PICAXE IR receiver to Serial In Pin directly ( not to the 10K/22K ) and get the &quot;Firmware?&quot; button working then move on to downloading.

Then take the IR components out of toilet roll isolation.

Take it step by step and you should get there in the end. Trying everything at once, if it doesn't work, it's hard to tell where the problem lies.

It's a very worthy project, and I'm sure you'll learn a lot. Break the project down into small steps to take and it will be much easier to manage and get working. You're well on your way already, so good luck and do ask if you need any help.
 

hippy

Ex-Staff (retired)
Dippy : <i>&quot;What the Programming Editor puts out is not particularly nice for IR...&quot;
What does it throw out?
What does it expect back? </i>

It's the outgoing 'break' signal that precedes a download which is the potential problem. Break gets transmitted until the PICAXE has responded, and while break is being sent, the room is swamped with IR from the PC and that may mask out the response from the PICAXE, and eventually lead to 'Hardware not found'.

Overcome that swamping and it should work. As acknowledged, I may be over-estimating the problem. When I tried it, the 'break' toggled my IR controlled house light on and off !

Other than that break, all other communication seems to be normal serial formatted data.
 

Wrenow

Senior Member
<b>&quot;To the man with a new hammer, all problems appear distinctly nail-like.&quot; </b>

I hate to throw this in, but is IR the best way to handle going wireless in the classroom?

What about XBEE/Zigbee. Yes, a tad more expensive, but it <b>is </b> 2-way, and is available in both a short-range (about 10 meter) for under 10 quid and longer (over 100 meter) range version for a bit more. The default mode is, you guessed it, direct serial cable replacement. The development kits from Maxstream include RS-232 and USB interface boards. I should have mine in next week (just ordered them), so I cannot opine with any experiential reference, but, according to the documents I have downloaded and perused, they look very promising for your application of wireless programming in the classroom.

They even have different topologies you can employ (peer to peer, beacon with slaves, etc.). In <i>theory </i> , at least. ;-) Of course the devil is always in the details....

Wreno

Edited by - Wrenow on 11/03/2007 13:53:32
 

Dippy

Moderator
Hippy, just 'scoped. I see exactly what you mean. I now see the benefits of a couple of interfaces in between. Not impossible with IR or radio I suspect. But a lot of work for limited use.
 

hippy

Ex-Staff (retired)
Wrenow : <i>What about XBEE/Zigbee </i>

It looked promising, but again there's the issue of getting the 'break' signal across the link. This is a long period high on the serial line, so cannot be sent as a normal serial character. Again, it would probably involve additional microcontroller interfaces at each end (*)

An additional problem is the time it takes for the XBee's to switch between receiving and transmitting and vice-versa. If the download comms take too long the Programming Editor or PICAXE may timeout.

(*) This could be simplified for IR and XBee by using a software application at the PC end, a Virtual Serial Port to download to which sends 'commands' to the PICAXE end interface which then does what the download would have over cable. That could simplify things to needing just a single micro in the interface at the PICAXE end.
 

Lliam20789

New Member
Thanks for the info!
Well I'm not sure when i'll get around to it or if i'll have time but thanks for all the help and i'll let you know when I go ahead with it...

Cheers,
Lliam

 
 

moxhamj

New Member
Re: &quot;At school we have few PICAXE computers and little desk space.&quot;

Dude, that is no good at all! Just going off on a tangent here, but even though I have heaps of XP computers, my picaxe programming computer is an old 300Mhz Win98 PC worth all of $50 including the monitor. Old laptops of that speed are not much more. Would they let you bring your own laptop to school?
 

demonicpicaxeguy

Senior Member
assuming all comunication with the picaxes in the programming department are 8 bit
why not just make up a pair of 08 based transcievers to handle the ir stuff
 

manuka

Senior Member
I heartily endorse the old laptop approach, &amp; regularly encounter suitable machines in P200-500MHz range (usually with dead batteries) that are often free to a good home. An immediate benefit to the school is that kids can then work at a spot where there IS good bench space- library etc. All my SiChip articles are still rustled up on a Y2K Toshiba 475MHz that refuses to die. It's the tactile response of the keyboard &amp; familiar hot plastic smell that sets my creative juices going ...

I've done a lot with ZigBee &amp; have to say it's several orders of magnitude more involved than a wired D9 or wireless 434MHz serial link- &amp; that's just for data exchange...



Edited by - manuka on 12/03/2007 22:00:16
 

Lliam20789

New Member
Manuka:

I would love to have access to a laptop like this, I have asked all of the teachers and almost go an 5-8 year ild thinkpad... almost. since then i've had no luck.

 
 

Wrenow

Senior Member
Hippy,
I see your point on the break. Looking at the timestamps, I think I was typing mine while you were typing yours, so I missed seeing that comment. :(

Lliam,

I think they are suggesting you try and scrounge an old laptop, not necessarily get the school to supply you one. There are lots of used computer places around. One in Dallas has a sign that they have laptops available for $98. Yes they would be several generations old, but would work for Picaxe. I almost got my daughter's old Pent 400 Armada (great computer at the time, lots of nice features, just slow by today's standards), but she decided to keep it after I cleaned up the hard drive and made it work properly again. Even though she has two other, far more advanced and faster laptops. Drat. You may have a friend/relative in a similar situation? Old spare languishing in the cupboard? Don't know how likely it is that a school would keep its old ones (different schools may well have different policies) or would loan/give them out to the students.

Just my .02, ymmv.

Wreno



Edited by - Wrenow on 12/03/2007 20:18:54
 

Lliam20789

New Member
Wrenow:

It was not the actual school I asked it was individual teachers and no unfortunately i don't have any family members in this situation...

I guess i'll just keep searching...

 
 

hippy

Ex-Staff (retired)
One doesn't necessarily need a modern Pentium-era PC; an old 386 or 486 may do the job providing it's got enough RAM and a big enough disk to run Windows 95.
 

demonicpicaxeguy

Senior Member
try the local trash and treausre markets and pawn brokers places i've pulled all sorts of stuff out of them pda's laptops,
once got 5X17&quot; screens for $15 only 4 of them worked the other one

then you have ebay..... full of cheapies

another very good place is to goto some of the small non branded computer shops and ask them if they have any old laptops

you'll be suprised what some of them throw out as well
 

manuka

Senior Member
Liam- just where are you in UK &amp; how &quot;handy&quot; are you in fixing minor tech. problems? Donated PCs can often be full of woes for the unwary &amp; a certain degree of tolerance &amp; improvisation is ESSENTIAL. Over the years I've passed on all manner of free PCs to folks here in NZ, &amp; am only too familiar with them phoning up a few days later to moan about the lack of speed, features &amp; software.

Put a free advert up in your local supermarket etc. Check Ebay? Ask friends dads if their work is upgrading etc. HOWEVER best ask your folks first if it's OK to take in the resulting ejunk that'll surely result...
 

moxhamj

New Member
There are laptops on UK ebay for under 60pounds around the 1G mark, and the 300Mhz ones are sitting at 1p (with 20pounds shipping) and only a few hours to go.

I'm thinking that building an IR link is harder if you want to send a precise replica of an RS232 signal inlcuding long high and low pulses. How do you send a continuous high signal via two leds at the same time and not have them interfere? The only solution I can think of is two completely different frequencies with two bandwidth filters tuned to those frequencies.

An old laptop could stay at school as only a loony would nick a really old laptop.
 
Top