Been seeing few DIYs on how to establish a communication between MATLAB application and Arduino that is hardwired to PC. However, I haven't encountered anything that control Arduino via MATLAB wirelessly using the ENC28J60 compatible Ethernet shield. In this ible', I'm going to show the simplest way to control Arduino using MATLAB wirelessly. 


1) Arduino - You need a controller. I used Arduino since it is supported by MATLAB. For this project however I used, Gizduino, a locally made Arduino-based controller.

2) Ethernet Shield - You need a compatible Ethernet shield for your board. I used the ENC28J60 for my board.

3) Wi-Fi Router - To connect your Arduino which would be the means to communicate to your PC wirelessly.

4) LED - Any components to indicate communication between devices. For this project I used LED.

5) Printer Cable - To connect Arduino to your PC.

6) UTP Cable - To connect your Ethernet shield to the router.

Step 1: Connect Ethernet Shield to Arduino

Carefully connect your Ethernet shield to your Arduino. Avoid bending the pins.
<p>Interesting! =D</p>
<p>Here, I made Weather Station using Ethernet shield</p><p><a href="http://www.instructables.com/id/Arduino-Web-Weather-Server/" rel="nofollow">http://www.instructables.com/id/Arduino-Web-Weather-Server/</a></p>
<p>Is this similar to matlab hardware-in-the-loop (HIL) or processor-in-the-loop (PIL)? </p><p><a href="http://www.mathworks.com/help/ecoder/ug/pil-simulation-for-ide-and-toolchain-targets.html" rel="nofollow">http://www.mathworks.com/help/ecoder/ug/pil-simulation-for-ide-and-toolchain-targets.html</a></p><p>I've read that pid control loops can be finely tuned by having the system communicate to matlab realtime so that the actual model properties can be evaluated in matlab for better tuning. All seems like magic to me, but if you have any thoughts on it that would be great!</p><p> </p>
<p>i have some difficulty in my project which i present here,</p><p>i made program of hand gesture recognition in matlab R2014b. in that i give input images and get output of 1,2....9. now i want to transmit this 1,2...9 to arduino mega 2560 wirelessly and real time. and i connect robotic arm with arduino. so i make programming in arduino accordingly. but pls tell me about how to transmit commands 1,2...9 from matlab to arduino without wire and as fast as possible because according to this output of matlab robot do some action.....</p><p>pls tell me its very important for me</p>
<p>hi nice guidence for my project work</p>
<p>Hello, well this question is not related in this wonderful project. But i would like to ask that does the way you code in arduino is the same as you code in Gizduino.<br>I make a project and I've coded it in arduino, now i want to do it in gizduino, but when I run it, it would'nt work. Thanks in advance.<br>BTW nice project.</p>
hi, trying to understand code <br> urlread(''); <br>what urlread do? led is name for port where is led diode? <br>i want tu use gui to communicate with arudino using ethernet communication but i cant find how to send for example how to send number to arduino, or how to accept data back from arduino...thanks in advance for any help ...
The &quot;urlread&quot; command in MATLAB is similar to hyperlinking since we created web server address for each of the commands that the ethernet shield, as well as the controller understands. It only means reading the assigned web server (url) address. You can compose any web server address you want, in which case I assigned &quot;?led=off&quot; for off mode and &quot;?led=on&quot; for on mode to make things easier. If you want to send information to Arduino via MATLAB, I think you need to integrate the codes available for ENC28J60 and MATLAB support package for Arduino. I haven't figure out how to do this yet, but I'm sure about the coding it's either purely assigning every tasks to a web server or combining the pde for the ethernet shield and MATLAB support package for Arduino. I'll probably post another 'ible for this when I get my hands on an ENC28J60 unit. Just borrowed the ethernet shield from a friend when I did this 'ible.
nice <br>
Salamat Sir! :)
Well my Ethernet Shield is on its way, and when it comes, I will definitely try this ASAP! Thanks!
Thanks for checking this &acute;ible out. Hope you get your Ethernet Shield soon. Enjoy! :)

About This Instructable


54 favorites


Bio: I love internet reading. I think I have acquired more knowledge from the internet than I have and probably ever will from a standard institution ... More »
More by Analogue-Chick: Make Your Images Interesting with Galaxy Overlay Control Arduino Wirelessly with MATLAB Steampunk Bonsai
Add instructable to: