tag:blogger.com,1999:blog-63678183710732000602018-03-06T03:00:38.479-08:00EHuBe ProjectsI'm an electrical engineering student and I use this blog to publish my personal projects. I hope this can help you in your projects. Good Luck!Fialhonhttp://www.blogger.com/profile/00391119812049397285noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6367818371073200060.post-56679535417640143992011-01-08T14:18:00.000-08:002011-01-08T14:27:30.605-08:00Arduino Wireless SwitcherThere are some rumors out there telling&nbsp;about&nbsp;the diseases around wireless signals!<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_XBOLdKicbzY/TSjhDNVyptI/AAAAAAAAAA0/menlBvjbOdM/s1600/29122010115.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/_XBOLdKicbzY/TSjhDNVyptI/AAAAAAAAAA0/menlBvjbOdM/s320/29122010115.jpg" width="320" /></a></div><br />Since the wireless router is in my bedroom and I think like "better safe than sorry", I built a device to switch on or off my wireless feature from my router.<br /><br />It was a lot easier if the router has a button to do that, but&nbsp;unfortunately&nbsp;it doesn't have!<br />I read about some way to control wireless feature through 'telnet' on 23 port. But again,unfortunately, my router doesn't allow any incoming connection unless on port 80 which is the default port browsers use to HTTP.<br /><br />So, let's create a HTTP bot to simulate a human to enter the router web site and switch the wireless option<br /><br /><a name='more'></a><br /><br /><b>What we need:</b><br /><br /><ol><li>Arduino</li><li>Ethernet shield</li></ol><div>Obviously, we can create the bot on our computer but this will limiting&nbsp;the switch.</div><div>With Arduino, the change can be made even if the pc is off.</div><div><br /></div><div><a href="http://3.bp.blogspot.com/_XBOLdKicbzY/TSjdlXANLtI/AAAAAAAAAAw/e8hB25SZ7Ug/s1600/iremote.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/_XBOLdKicbzY/TSjdlXANLtI/AAAAAAAAAAw/e8hB25SZ7Ug/s320/iremote.JPG" width="233" /></a>Another feature that i want to add to this project is the capability to switch the router with a common InfraRed remote control ( from my tv for example).</div><div><br /></div><div><b>Components:</b></div><div><ol><li>A IR Receiver ( I choose one of the TSOP22 family)</li><li>100ohm resistor</li><li>Status led</li></ol></div><div><br /></div><div>This project is too simple:</div><div><br /></div><div>Pick an example of IRemote from Arduino libraries.From IR Receiver connect pin 2 to 5V with the 100ohm resistor to prevent over current, pin 3 to GND and pint 1 will be our RECv pin for Arduino example code.Test it! It should work at first!Then do the changes you like!</div><div><br /></div><div>Now,just pick a client example of Ethernet from Arduino libraries see how this works. Connect it to port:80 as I said before, and ip address from your router and let's send to router some code!</div><div><br /></div><div>What is the code do we need to send to router?</div><div><br /></div><div>In the router web page, to change the option of wireless feature I need to check or uncheck a check box inside a form and click on submit button to post the form.Ok, let's sniff the connection and search for a HTTP POST command.</div><div><br /></div><div>I installed a HTTP sniffer "HTTPAnalyzer from IEInspector" and start recording while I perform the task of switch on and off. I got two different codes under the HTTP Header.I copy them to arduino and send through the example from the ethernet library.&nbsp;</div><div><br /></div><div>It Worked, but not in the first try!. Now just we need to join the codes from iRemote and ethernet together and test pressing the button from remote control.</div><div><br /></div><div>It is the best for me, now every time i want wlan I just need to pick up my remote control and when I'm done I pick it up again.</div><div><br /></div><div>Hope you enjoy</div><div><br /></div><div><br /></div>Fialhonhttp://www.blogger.com/profile/00391119812049397285noreply@blogger.com6tag:blogger.com,1999:blog-6367818371073200060.post-58980145012894769332011-01-05T18:36:00.001-08:002012-04-15T07:01:07.361-07:00Connecting Nokia phone to arduino ( USB Cable)<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_XBOLdKicbzY/TSUYUVvmuwI/AAAAAAAAAAQ/W4a8OBiG8cA/s1600/nokiatousbhostbynfsp.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="http://3.bp.blogspot.com/_XBOLdKicbzY/TSUYUVvmuwI/AAAAAAAAAAQ/W4a8OBiG8cA/s200/nokiatousbhostbynfsp.jpg" width="200" /></a></div>The moment I started using Arduino, I realized that to expand its capabilities I would need to spent quite a lot of money purchasing wifi shield, gps shield, BT shield and so on. I soon&nbsp;realized&nbsp;that it would be a good idea to connect my arduino to a&nbsp;modern&nbsp;cell phone since the phone&nbsp;already&nbsp;has many of these desired features built-in. One way to accomplish this would be to use a BT shield, but it is a waste of&nbsp;wireless&nbsp;features, and so I decide to use BT or wifi just for remote control.After a lot of googling, I found a USB Host Shield from Circuits@home which gives to arduino the&nbsp;<span class="Apple-style-span" style="font-family: arial,sans-serif; font-size: 13px; white-space: nowrap;">ability to "talk" with almost every usb&nbsp;</span>devices. In their web site they already get the arduino talking with some other usb devices.<br />When I saw this, I thought that this would be the shield I need to get my mobile phone talking with arduino through cable. And that is what this post is about.<br /><br /><a name='more'></a><br /><br /><b>Parts needed:</b><br /><br /><ol><li>Nokia phone ( anyone with usb port, i used n95)</li><li>cable</li><li>Arduino</li><li>Usb Host Shield form <a href="http://circuitsathome.com/">Circuits@home</a></li></ol><div><b>Phone side:</b></div><div><ol><li>Firstly, i installed the "glass term" example program from Symbian SDK, which is an good example of Serial communication.</li><li>I tested the communication with HyperTerminal on windows. it worked! The phone side is done!</li></ol>source files: GlassTerm (included in your nokia sdk)<br /><ol></ol><div><b>Arduino side:</b></div></div><div><b><br /></b></div><div>This side is s little more tricky&nbsp;because you need to have some knowledge of USB protocol. I use this document to get the information i needed:<a href="http://www.beyondlogic.org/usbnutshell/usb-in-a-nutshell.pdf">usb-in-a-nutshell</a></div><div><br /></div><div><ol><li>When doing step 2 of phone side i sniff usb communication, using snoopPro to get how information flows back and forth between arduino and pc, and to check from what endpoint the data leaves the phone. This endpoint is controlled by an interface which by turn is controlled by a class interface.</li><li>Supposing that the endpoint number was known, i used an example from circuits@home which allow me to get device descriptor to make sure if it exists in arduino configuration speed. The configuration speed in the connection between the phone and the pc is one, and between the phone and the arduino can be another. And the configuration speed can change the struture of interfaces and endpoints.</li><li>Luckly, the configuration speed was the same, so the endpoint number also will be the same. I used a Bt dongle code example from circuits@home and modified some instructions, as to configure the class interface.</li><li>After all this work, i test it. it worked, but not in the first try :S</li><li>My worse problem was to understand usb protocols and configurations.&nbsp;</li></ol>source file:<a href="https://github.com/Fialhon/Ehube/blob/master/Arduino%20usb%20program/usb_nokia.pde">usb_nokia.pde</a> <br /><ol></ol><div>My Video:</div><div class="separator" style="clear: both; text-align: center;"><iframe allowFullScreen='true' webkitallowfullscreen='true' mozallowfullscreen='true' width='450' height='450' src='https://www.youtube.com/embed/P3CbAZm0fws?feature=player_embedded' FRAMEBORDER='0' /></div><div><br /></div></div><div><br /></div><br />Hope you enjoy.Fialhonhttp://www.blogger.com/profile/00391119812049397285noreply@blogger.com33tag:blogger.com,1999:blog-6367818371073200060.post-69865685533024781432010-12-31T06:50:00.000-08:002010-12-31T06:50:32.681-08:00My first postHi everyone! This is my first post! I gonna use it to tell you about what projects will be posted here.<br />Since i discover the arduino board and their shields i dont stop to prototype with it.<br />A few years ago, when i was in the very beginning of my course i made a very nood IR distance sensor.Now, after this years getting knowledge, i think that project is so unworkable.<br />I've 2 subprojects concluded waiting to be posted.<br /><br />Hope you enjoy<br />Best regardsFialhonhttp://www.blogger.com/profile/00391119812049397285noreply@blogger.com0