OpenWrt Forum Archive

Topic: My MR3020 Project "brain child"

The content of this topic has been archived on 26 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

MR3020 + internal 4 port usb hub + internal 8G usb flash + 2nd external usb port + internal usb bluetooth v4 + external antenna + internal arduino pro mini + external IDC 40-pin connector passing out arduino data lines & the MR3020's I2C & UART
https://scontent-b-dfw.xx.fbcdn.net/hphotos-prn2/1383669_10151743761322807_275283681_n.jpg
https://scontent-a-dfw.xx.fbcdn.net/hphotos-ash3/1012713_10151743762207807_1530247469_n.jpg
https://scontent-b-dfw.xx.fbcdn.net/hphotos-frc3/1390602_10151736221492807_837451939_n.jpg

(Last edited by sfranzyshen on 4 Nov 2013, 00:18)

wow, this is what I'm doing, you made it so perfectly !

respect !

A few more photos of the usb install ... I used a metal frame from an old usb mount from a atx pc case. I soldered the two usb connectors together at the front using the frame and at the back with a ground strap.

http://i51.photobucket.com/albums/f382/sfranzyshen/usb1.png
http://i51.photobucket.com/albums/f382/sfranzyshen/usb2.png

Here is the layout for the 40-pin header ... I didn't do any level converting on the router side of things ... so becareful!

http://i51.photobucket.com/albums/f382/sfranzyshen/40pin-2.png

I have finished up on the "brain child" project and here is my conclusion. First I want to say that I like how things turned out. Second I want to say I wouldn't do it again. Unless you REALLY need everything in one tiny box. Don't open your router period.

The next approach I will take is everything modular. Instead of opening the router and adding I2c. I'm going to add I2C via a usb device. Instead of adding an external antenna, I'm going to add an external usb wifi adapter with an external antenna. Instead of adding the arduino via UART or I2C ... I'm going to add a arduino nano via usb. Finally, I'm going to connect the rest of the usb devices (usb 8gb & usb bluetooth) via an external (powered) usb hub.

http://i51.photobucket.com/albums/f382/sfranzyshen/DSCN1516.jpg

(Last edited by sfranzyshen on 9 Nov 2013, 18:12)

Successful at programming the arduino with the mr3020 using avrdude.

Here is a shot with the project hooked up to a breadboard with a level converter between the mr3020's uart and arduino's uart. I used the arduino ide to build the sketch from a laptop. Then scp (copied) the .hex file to the router over the network. Finally, I used avrdude on the router to upload the hex file to the arduino. Also I used screen from the router to communicate back and forth with the arduino over uart. I am powering the whole thing with a 5600ah usb battery.

http://i51.photobucket.com/albums/f382/sfranzyshen/DSCN1518.jpg

sfranzyshen wrote:

Successful at programming the arduino with the mr3020 using avrdude.

One problem I have is the arduino needs to be reset before avrdude can upload the hex file. With a normal USB-UART the dtr is connected with reset to reset the arduino before the upload. I was thinking about using a gpio from the router to handle this, but I think I have found a better way. Two ways to reset arduino in software Now this will require any firmware I upload to include a software reset function builtin, but it beats needing to hit the reset button manually.

sfranzyshen wrote:

I have finished up on the "brain child" project and here is my conclusion. First I want to say that I like how things turned out. Second I want to say I wouldn't do it again. Unless you REALLY need everything in one tiny box. Don't open your router period.

The next approach I will take is everything modular. Instead of opening the router and adding I2c. I'm going to add I2C via a usb device. Instead of adding an external antenna, I'm going to add an external usb wifi adapter with an external antenna. Instead of adding the arduino via UART or I2C ... I'm going to add a arduino nano via usb. Finally, I'm going to connect the rest of the usb devices (usb 8gb & usb bluetooth) via an external (powered) usb hub.

Hot-plugging devices via USB is certainly convenient, but if longterm reliability is a requirement, you will probably be more satisfied with the solution you presented here (soldering I2C and UART to the board). Random USB disconnects can be a big pain in the ass.

The discussion might have continued from here.