raspberrypi expansion module

Request new hardware or ideas for the controller
cypho
Posts: 13
Joined: Fri Oct 05, 2012 11:01 am

raspberrypi expansion module

Post by cypho »

How about a raspberry pi expansion module?

Hardware wise it should be really easy and inexpensive to produce. All you would need to do is to is order the part and stick it in a plastic box with a RA logo on it. Then it could attach to the head unit with the USB TTL Converter cable.

Software should be just as easy. The arduino api software can be installed on the pi as easy as "sudo apt-get install arduino"

As far as uses, I can see it being very useful:
  • Hard Wired Ethernet
  • Data Logger
  • Web cam
  • Full featured LAMP Web Server
  • Load custom code onto the Reef Angel without having to run a long wire over to desktop/laptop. ( plug thumb drive with code into the pi (or you could send the code to the pi via Eithernet), and it could automatically load the code onto the Reef Angel )
And I'm sure a lot, lot more. All for likely less than the cost of the existing wifi attachment.

Yes, this all of this should be easy enough to be a DIY project, but I'm sure that an official Reef Angel PI would end up a lot nicer.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: raspberrypi expansion module

Post by rimai »

Can you get the pi code for all this? ;)
Or at least some of it?
I like the idea, but not very familiar with the pi coding.
Roberto.
cypho
Posts: 13
Joined: Fri Oct 05, 2012 11:01 am

Re: raspberrypi expansion module

Post by cypho »

The PI runs a full Debian Linux OS. Complete with desktop GUI if you want. You can program it in just about any programming language imaginable.

The existing existing linux version of the RA software should run on it without modification. I'm not sure if that is customized for RA or not. If it is not, it is even easier than that, the Arduino API can be installed with a single command. "sudo apt-get install arduino"
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

raspberrypi expansion module

Post by lnevo »

Would it be able to use wifi from the wifi module or it would replace? I would love it...i could ssh in and recompile my code remotely!!! Arduino programming from my ipad...ill need to learn the arduino cli :)
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

raspberrypi expansion module

Post by lnevo »

Would be easy enough to have a web form to submit code and have it compiled automatically...:) love the idea...just dont want to run ethernet :)
cypho
Posts: 13
Joined: Fri Oct 05, 2012 11:01 am

Re: raspberrypi expansion module

Post by cypho »

lnevo wrote:Would it be able to use wifi from the wifi module or it would replace? I would love it...i could ssh in and recompile my code remotely!!! Arduino programming from my ipad...ill need to learn the arduino cli :)

I suspect it would take some effort to get the RA wifi module to forward traffic to the PI. But you could use a USB wifi dongle plugged directly into the PI.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: raspberrypi expansion module

Post by rimai »

Does the PI have UART?
Roberto.
phrusher
Posts: 65
Joined: Fri May 25, 2012 12:22 am

Re: raspberrypi expansion module

Post by phrusher »

cypho
Posts: 13
Joined: Fri Oct 05, 2012 11:01 am

Re: raspberrypi expansion module

Post by cypho »

rimai wrote:Does the PI have UART?
Yes

Here is a link with lots of info about the hardware. http://elinux.org/RPi_Hardware
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: raspberrypi expansion module

Post by rimai »

Cool.
Yes, it is possible then to use pi to act as wifi bridge for uploading code as well as send data to portal.
The wifi attachment is nothing more than a TCP to UART bridge.
If one can use Java and implement the code for the bridge, it would work.
So, who wants to try? :)
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

raspberrypi expansion module

Post by lnevo »

That would make RA the best thing in the universe!!!
dcartier
Posts: 33
Joined: Thu Sep 20, 2012 2:34 am

Re: raspberrypi expansion module

Post by dcartier »

I would be willing to give this a try. I am a Linux guy in my day job.

Before I bought the RA I was looking at the PI and thinking hmm, a Linux single board computer (with Ethernet and HDMI) would make one heck of a reef controller. I would take the wired Ethernet over WiFi any day.

As it as ARM based it will have way more horsepower for doing the heavy lifting to and from the net than the AVR in the RA. As well all your favourite scripting languages are already available in the package manager (Python, Perl, Java, etc.).
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: raspberrypi expansion module

Post by rimai »

Cool.
So basically, the first thing we need is to have some sort of java or any other application that would read UART and send it straight to the portal server. This would take care of sending data to server.
This is the easy part.
The more complex part would be incoming data. When someone connects to PI, we need the webserver to relay messages to RA over UART too.
So, let's say PI webserver is using 192.168.0.100 and port 2000 and you browse http://www.192.168.0.100:2000/ What PI needs to do is send GET / to RA via UART, read the response from RA and relay the reply to the browser.
Do you think you would be able to get this part done?
Roberto.
dcartier
Posts: 33
Joined: Thu Sep 20, 2012 2:34 am

Re: raspberrypi expansion module

Post by dcartier »

I have put myself on the waiting list for a PI at Adafruit.

No need to wait for the PI though. It is a long weekend here, so I will build a small Linux box to start testing with and we can move to the PI once it is available. Hopefully with a working glue layer already to go.
dcartier
Posts: 33
Joined: Thu Sep 20, 2012 2:34 am

Re: raspberrypi expansion module

Post by dcartier »

Anyone know the pinout for the TTL UART port on the RA? I assume it is 5V rather than 3.3V? I was just thinking that connecting my FTDI board to the RA might be the easiest method of gaining access to test some stuff.
cypho
Posts: 13
Joined: Fri Oct 05, 2012 11:01 am

Re: raspberrypi expansion module

Post by cypho »

dcartier wrote:Anyone know the pinout for the TTL UART port on the RA? I assume it is 5V rather than 3.3V? I was just thinking that connecting my FTDI board to the RA might be the easiest method of gaining access to test some stuff.
http://elinux.org/Rpi_Low-level_periphe ... .28GPIO.29
The production Raspberry Pi board has a 26-pin 2.54 mm (100 mil)[1] expansion header, marked as P1, arranged in a 2x13 strip. They provide 8 GPIO pins plus access to I²C, SPI, UART), as well as +3.3 V, +5 V and GND supply lines. Pin one is the pin in the first column and on the bottom row. [2]
GPIO voltage levels are 3.3 V and are not 5 V tolerant. There is no over-voltage protection on the board - the intention is that people interested in serious interfacing will use an external board with buffers, level conversion and analog I/O rather than soldering directly onto the main board.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: raspberrypi expansion module

Post by binder »

dave and i started on something that would interface a computer to the controller via the serial interface. feel free to look through it and use the code if you want.

https://github.com/curtbinder/rawebserver

it may be helpful or not. doesn't matter to me if you use it, just trying to help prevent you from reinventing the wheel if possible. :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: raspberrypi expansion module

Post by rimai »

Yes, UART on RA is 5V.
Roberto.
topjimmy
Posts: 146
Joined: Tue May 08, 2012 8:16 am

Re: raspberrypi expansion module

Post by topjimmy »

This should take care of that problem

https://www.sparkfun.com/products/8745?
Image
fatman
Posts: 121
Joined: Wed May 30, 2012 10:44 pm

Re: raspberrypi expansion module

Post by fatman »

So, when will it be in the store? I'll sell my beer cans and order one! ;-)
Image
symon_say
Posts: 119
Joined: Sun Oct 09, 2011 6:04 am
Location: Dominican Republic
Contact:

Re: raspberrypi expansion module

Post by symon_say »

If i get hard wire internet, put my in, I hate the wifi module.
Image
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: raspberrypi expansion module

Post by 00Warpig00 »

symon_say wrote:If i get hard wire internet, put my in, I hate the wifi module.
I'll second that!!
180G FOWLR
20GH QT#1
29G QT#2

Image
User avatar
bondolo
Posts: 14
Joined: Fri Nov 23, 2012 2:59 pm

Re: raspberrypi expansion module

Post by bondolo »

I am interested to hear more about mixing ra and pi as I have been playing with programming both.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: raspberrypi expansion module

Post by rimai »

You could connect both UART ports together and use a java app on PI as a ethernet packet relay.
Technically, you could even run a remote shell to run avrdude and upload codes remotely.
Roberto.
Amos Poh
Posts: 107
Joined: Sun Jul 22, 2012 4:51 am
Location: Singapore

Re: raspberrypi expansion module

Post by Amos Poh »

Looking forward for this to be in stores! :)
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: raspberrypi expansion module

Post by binder »

has anybody made any progresson this? i ask because i own 2 pi's now and a usb wifi module for the pi. of course i have all of my extra ra equipment for testing as well. if anybody has anything coded up, please let me know so i can start helping out on it. who knows, maybe i can get what we want done for some remote programming or data logging or something.
dcartier
Posts: 33
Joined: Thu Sep 20, 2012 2:34 am

Re: raspberrypi expansion module

Post by dcartier »

I did eventually get a Pi, but my unit proved to be flaky. It would only run for 10 minutes regardless of the power supply I used. I am just waiting to get another.

I started on a Python program running on a laptop over a FTDI breakout to the RA. I got it to the point where it could update the portal and was working on getting it handling requests from the portal when I got busy with work. Hopefully I will get back to it in the future and have something for when I finally get a working Pi.

Dennis
cypho
Posts: 13
Joined: Fri Oct 05, 2012 11:01 am

Re: raspberrypi expansion module

Post by cypho »

I have been thinking about this more and begun to wonder about another approach to it, instead of having a PI talk to the RA head unit, could a PI replace the head unit entirely?

Is there any reason why one could not connect a RA expansion hub directly to a PI and then connect various RA Expansion Modules to the hub?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: raspberrypi expansion module

Post by rimai »

You can do that too :)
Roberto.
thekameleon
Posts: 137
Joined: Sat Feb 16, 2013 7:44 am

Re: raspberrypi expansion module

Post by thekameleon »

rimai wrote:Cool.
So basically, the first thing we need is to have some sort of java or any other application that would read UART and send it straight to the portal server. This would take care of sending data to server.
This is the easy part.
The more complex part would be incoming data. When someone connects to PI, we need the webserver to relay messages to RA over UART too.
So, let's say PI webserver is using 192.168.0.100 and port 2000 and you browse http://www.192.168.0.100:2000/ What PI needs to do is send GET / to RA via UART, read the response from RA and relay the reply to the browser.
Do you think you would be able to get this part done?
Would the easiest way to push the querystring to RA or instead create a Serial library that can read/write data in a simpler format?
Post Reply