Skip to main content
Topic: IR Toy with web platform (Read 2303 times) previous topic - next topic

IR Toy with web platform

Hi,

I'm new to all this. My idea is to combine the IR Toy with the web platform to be able to transmit IR signals through lan (from a smartphone or laptop). But I don't really know if that would work well. Because is it even possible to connect them together? Both do have USB but the IR Toy uses USB HID while the web platform has a serial to USB converter. Does anyone have an idea? It would be a really nice project, but I don't really know where I should start.

thanks in advance :)

Re: IR Toy with web platform

Reply #1
Hi geegos,

You could make the web platform transmit IR codes using a simple LED and transistor. The firmware would be moderately complex though, depending on your experience level.
Got a question? Please ask in the forum for the fastest answers.

Re: IR Toy with web platform

Reply #2
If we are able to get FreeRTOS running on the Web Platform then it should be much easier to do things like this.  Adding this functionality would be accomplished by running the relevant IR Toy code in a new thread.  This is the kind of thing FreeRTOS makes much easier.  If you already have most of work done as stand alone code then adding it to a FreeRTOS project is usually not too hard and much easier than trying to add the functionality to typical embedded supper loop code.

-Eric

Re: IR Toy with web platform

Reply #3
thanks for the answers. Well I guess it would be too difficult for me to "reinvent" the ir toy. But the FreeRTOS aspect would be nice. But the project isn't that far right now, is it?

But afterall I'm quiet a newbie at microcontrollers ;) Just made really basic things in VDHL at the university. But someone can always learn ;)

Re: IR Toy with web platform

Reply #4
[quote author="geegos"]
Well I guess it would be too difficult for me to "reinvent" the ir toy. [/quote]

It certainly could be done.  I have not looked at the code for the IR Toy or the current Web Platform so I have no idea how hard it would be.

[quote author="geegos"]
But the FreeRTOS aspect would be nice. But the project isn't that far right now, is it?[/quote]

No, it is not very far along.  There has only been one person working on it so far.  I just got the hardware and so hope to start helping out soon.

[quote author="geegos"]
But afterall I'm quiet a newbie at microcontrollers ;) Just made really basic things in VDHL at the university. But someone can always learn ;)
[/quote]

These are actually good projects to learn on because they are small enough and simple enough to get involved with.  Personally, I find microcontroller programming (in C or assembly) easier than VHDL.  But that is just my opinion and my VHDL experience is old and limited.

-Eric

Re: IR Toy with web platform

Reply #5
[quote author="geegos"]My idea is to combine the IR Toy with the web platform to be able to transmit IR signals through lan (from a smartphone or laptop).[/quote]
Quote
But I don't really know if that would work well. Because is it even possible to connect them together? Both do have USB but the IR Toy uses USB HID while the web platform has a serial to USB converter.
USB is not really a peer-to-peer link, at least it wasn't in the beginning.  So, both the web platform and the IR Toy are acting as USB Devices, and thus cannot talk to each other without a computer with custom software in between.  You'll note that they have connectors which would make it difficult to connect them directly with a standard USB cable.

USB 2 has added the concept of USB OTG (on the go), which allows a Device to become a Host.  Unfortunately, the USB IR Toy has a PIC which cannot be programmed for OTG, and the web platform has a PIC which cannot directly handle USB - the FTDI chip cannot be programmed for OTG, either.  If the web platform were redesigned with one of the PIC chips that can handle USB OTG, then it could potentially connect directly to USB Devices like the IR Toy.  Note that this would require custom firmware on the web platform for USB hosting, which is not trivial to develop.

Your remaining solution require custom firmware development, and possibly also some hardware.

As has been suggested in this thread, you can just add IR circuits to your web platform, and then you could write custom software to control the IR through the web firmware.

Without building IR hardware, you could make a serial link between the web platform and IR Toy, but there is no firmware (that I know of) on either end to handle this.  Both firmware projects are open source, so you could add serial support to the web platform (if it isn't already there) and set up the serial link to talk to the IR Toy.  Then in the IR Toy firmware you would have to add support for controlling the IR functions from the serial port instead of the USB port.

Both options are fairly technical, but you can basically choose how deep you want to get into building hardware.  But either way you'll have to write some firmware (I think - at least it looks that way).

Re: IR Toy with web platform

Reply #6
usb host mode would be nice, but yeah didn't even think about the problem with client and host mode ;)

Somehow I believe that it's even more complicated to hook them together via serial link than adding an IR to the web platform. So I think I will go with that.
Does anyone have a good tutorial or datasheet which shows how to wire up a LED to web platform (or sth. comparable) and additionaly a good tutorial to firmware programming? For RC5 and others I found this website: http://www.sbprojects.com/knowledge/ir/ir.htm . But maybe someone has sth. which helps me more? I'm quiet new to low level architecture ;)

Re: IR Toy with web platform

Reply #7
[quote author="geegos"]
Somehow I believe that it's even more complicated to hook them together via serial link than adding an IR to the web platform. [/quote]

I don't know that linking the two via a logic level serial link would be any harder than adding the LED driver to the Web Platform but, having two processors to just send some IR commands would be a bit overkill.

[quote author="geegos"]
Does anyone have a good tutorial or datasheet which shows how to wire up a LED to web platform (or sth. comparable) and additionaly a good tutorial to firmware programming? [/quote]

I would start with the wiki page for the Web Platform.  It has lots of info, the data sheet, and links to other useful information including an introduction to dsPIC33 programming.  Lots of additional info about PIC programming is available via a web search.

 -Eric

Re: IR Toy with web platform

Reply #8
[quote author="geegos"]Somehow I believe that it's even more complicated to hook them together via serial link than adding an IR to the web platform. So I think I will go with that.[/quote]Adding IR involves transistors and resistors.  Connecting the two via serial involves only wires.  Both require firmware programming - the former on one platform, the latter on both.
Quote
Does anyone have a good tutorial or datasheet which shows how to wire up a LED to web platform (or sth. comparable) and additionaly a good tutorial to firmware programming?
There are the schematics for the USB IR Toy, and they show how to wire a PIC I/O pin to a transistor, resistor, and IR LED so that the PIC can control when the 5 V power is applied.  I recommend using a pin on the dsPIC that is capable of PWM.  I'm not sure whether you need IR input, but that's in the schematic, too.

The source for both the USB IR Toy and web platform are available as an example.

It can be easy, or it can be fairly deep.  I am not aware of any tutorials.

Re: IR Toy with web platform

Reply #9
This is the section of the IR Toy schematic that shows the IR transmitter (ignore C3 and C2). It's just a LED, NPN transistor, and two resistors, not hard to assemble on a bread board.
Got a question? Please ask in the forum for the fastest answers.

Re: IR Toy with web platform

Reply #10
I just meant that it's easier to add a led instead of adding a serial link because than I have just one codebase instead of two.
Additionally I can use the IR toy for something else.

Now that I know that everything CAN work, I will order the set :) thanks a lot.

 

Re: IR Toy with web platform

Reply #11
[quote author="geegos"]
I just meant that it's easier to add a led instead of adding a serial link because than I have just one codebase instead of two.
Additionally I can use the IR toy for something else.

Now that I know that everything CAN work, I will order the set :) thanks a lot.[/quote]Sounds good.  You can use the IR Toy to learn and analyze the IR signals that you need, because I assume that your circuit additions to the web platform will be IR output only.  And, yes, I agree that only modifying one firmware will be much easier!