Previous in Forum: Electrical Troubleshooting   Next in Forum: Differential Protection
Close
Close
Close
7 comments
Rate Comments: Nested
Participant

Join Date: Nov 2014
Posts: 2

Sending Wireless Data Via IR

11/10/2014 11:10 AM

I'm building a POV clock but one of the requirements is to be able to send a message to the clock to display while its spinning (around 10 characters).
I've decided to go with the IR reciever and a few resistors etc and plug that into my PIC micro controller. I was thinking of using an app to send the message from my phone (using the built in IR) to the IR reciever on the POV clock. It this feasible? Any suggestions on how to make the app? Ie code types. I'm a novice and have never written an app before!
I'm using a TSOP 38238 IR receiver. Will this do?

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".
Guru

Join Date: Apr 2014
Posts: 1869
Good Answers: 67
#1

Re: Sending Wireless Data Via IR

11/10/2014 12:00 PM

Yes, it is feasible and actually quite clever of you to come up with this idea.

You're going to be writing code for two processors: your PIC and your phone's. Lessons on writing code for either are something you're going to have to research yourself. This forum is not the place for it, nor is there the space (nor the time - most of us here hold regular jobs which take up most of our time).

An Android phone? An iPhone? Apps for which one?

At some point you're going to be working at the register level; fiddling with bits. Ask Microchip for advice on your PIC (there are plenty of examples on their website) and look up books on writing apps for your Android/IOS/Other-powered phone.

You've some research to do. For someone new at writing phone apps, there's a bit of a learning curve. There's a lot of overhead you have to master that is not directly related to transmitting a bitstream over IR. Your apps user interface, for instance. It's going to need a user interface for you to interact with it, yes? This is common to all phone apps so, once you master this part, you can use this knowledge for other apps should you wish to write them and so it's not 'just overhead.' Take the time to master this part, it'll be well worth it.

Register to Reply
Participant

Join Date: Nov 2014
Posts: 2
#5
In reply to #1

Re: Sending Wireless Data Via IR

11/10/2014 1:17 PM

I will need to write the app for android as the HTC one m8 is android.

I have some experience with C programming so will be writing the code using this.

I was mostly just curious as to whether the IR blaster on the HTC one m8 will send data over the same frequency as the TSOP 38238 IR receiver which is 38khz.

Register to Reply
Guru

Join Date: Apr 2014
Posts: 1869
Good Answers: 67
#6
In reply to #5

Re: Sending Wireless Data Via IR

11/10/2014 11:29 PM

I liked my HTC One from a hardware standpoint, but the drivel and crap that Sprint piled into it rendered the phone nothing more than an expensive brick in my pocket. By the time I switched to another provider, Sprint had three class-action lawsuits against it for deceptive practices - like billing everyone nationwide for 4G ('premium data services' or something) when 4G was available in only 28 states and not everywhere within the state (like in Modesto, CA, but not in L.A., San Diego, San Franscisco or any other major California city. Go figure). Where I lived in Colorado they'd been promising 4G every single month for over two years. They still don't have it, AFAIK, whilst AT&T's billboard announcing its own 4G's arrival was old and faded.

Sprint's 3G? I had 15 seconds of Internet access every seven minutes, on average. Needless to say, I am no longer a Sprint customer and never will be again. Ever.

Register to Reply Off Topic (Score 5)
Guru

Join Date: Mar 2007
Location: by the beach in Florida
Posts: 33392
Good Answers: 1817
#2

Re: Sending Wireless Data Via IR

11/10/2014 12:20 PM

__________________
All living things seek to control their own destiny....this is the purpose of life
Register to Reply
Guru

Join Date: Apr 2014
Posts: 1869
Good Answers: 67
#4
In reply to #2

Re: Sending Wireless Data Via IR

11/10/2014 12:27 PM

I built some of those back in the 90s that were self-powered, using stepper motors from old printers as four-phase alternators. The neighborhood kids came out of the woodwork when my son rode it down the street.

Register to Reply
Guru

Join Date: Apr 2014
Posts: 1869
Good Answers: 67
#3

Re: Sending Wireless Data Via IR

11/10/2014 12:25 PM

I know you're using a PIC microcontroller but at some point you may wish to acquire and fiddle around with an Arduino. There's a boatload of good stuff out there - both code and hardware - and the hardware is dirt cheap (I bought a complete development system for fifty bucks, new. Can't beat the price and it's got everything; protoboard, dot-matrix LED displays, discretes, the works).

Register to Reply
2
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#7

Re: Sending Wireless Data Via IR

11/11/2014 5:39 AM

Brilliant, and very interesting.

I don't want to rain on your parade, but as IR is very directional, how will you receive it on a revolving receiver diode.....I am sure there are possible ways, but surely that will make an already steep learning curve vertical. The software will become more complicated....

There are so many different IR transmitters around, blocking them might not be easy either!!!

As you are probably using brushes to get power to the unit, have you ever considered modulating the power to transfer data to the moving part?

But if you want to still do it in a "contact-less" way, read the following:-

My thoughts are that a radio link will probably also not be easy, but far more likely to work in such revolving situations as the aerial can be vertical and receive from any direction.

You only need a short distance and you appear to want to use a phone, so what about Bluetooth?

Read here for some ideas:-

Bluetooth 1

Bluetooth 2

Bluetooth 3

Even buying a cheap Bluetooth headset to use as a receiver and then taking it apart would allow you to send tones (music!) and receive them and decode them into characters for example....

Also, for attaching to PICs and the like, there are ready built RF units that can provide a reliable connection and can be bought or even made quite easily and cheaply.....but you will not need the phone really as a simple keyboard attached to the transmitter will suffice....maybe an old mobile phone can be gutted and used with its battery and charger...?

FCC or equivalent may be needed.....

I found a website here that looks promising:-

Getting-started-short-range-radio-design

Even if you stay with IR, you may need contact bounce elimination code (many, many ways and easy to do) to allow any of these ideas to work with interrupted signals....

Best of luck what ever you do......I personally favour the Bluetooth method most of all and I am sure that someone somewhere has connected Bluetooth to a PIC and also published online!! Have a look around.

Do keep us informed.....thanks.

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Good Answer (Score 2)
Register to Reply 7 comments

Good Answers:

These comments received enough positive votes to make them "good answers".
Copy to Clipboard

Users who posted comments:

Andy Germany (1); europium mkII (4); SolarEagle (1); thetallstumpyone (1)

Previous in Forum: Electrical Troubleshooting   Next in Forum: Differential Protection

Advertisement