|
|
|
|
|
Communicating with the on-board microcontroller
There is a question nagging at me for a good answer, and I thought many of us might benefit from the right answer. I found myself asking lots of questions in various threads looking for information. So I would like to discuss this collectively and get a consensys. Many of us are working on projects that implement some form of micro-controller (MC) in our boats. The question pertains to getting signals to (and even from) the on-board MC. Not the obvious method, where the MC might monitor events (like transmitter stick position) coming from the receiver, but communicating directly with the MC in order to trigger an event, run a program, operate some on-board equipment, etc. Two way communications would even be better, so the vessel can send back operating and environmental data. Some of you have made great headway in this area, Skystream, tweety777 and Deckie immediately come to mind, and there probably are others that I am just not yet ware of (speak up!). So the real question is, what is a good, reliable method to accomplish this? I think what is needed is "serial communications". At first I thought about utilizing an existing channel on the radio system, but quickly realized that it's only one way and RC systems are designed to handle PPM/PCM communications. With a little research, some possible answers came to light, which in turn present even more questions:
So have you given this any real thought to this, and what do you think is a viable method to accomplish it? If you have implemented a solution, what was it and what were your experiences? Xbee information CAN bus information OpenLRS here, here and here. Thanks, Pete |
|
|
|
|
|
|
|
Hi there,
As you can see in my post, I use NRF24L01 units (Josse's system is based on my system). They come in different forms. Some short range, about 100 metre, some long range, up to 1500 metres. The last one is also depending the transferrate. I use a transfer rate of 115200baud. I have a very small delay in the software to let the 2 units communicate without sending new info and get a bufferoverflow. The delay is about 10 milliseconds. Still faster then the Robbe version (20milliseconds per channel). These unit work on a open 2,4 gHz. range. You can define a channel on which the unit works. I use the NRF-network library. For some reading, specs and library: http://arduino-info.wikispaces.com/N...1-2.4GHz-HowTo grtz. Danny **edit: the only downside is that the i2c function cannot not be used by arduino hooked up to the NRF. A slave unit is needed. |
|
|
||
|
|
Hi Danny,
I saw your post right after I posted this thread. It is an execellent source of information for this topic, thanks for putting it up for all to see. I am slowly wading thru it and the code to get a better understanding. You metioned in your response: Quote:
EDIT: I went thru the receiver code, I see you are using SPI for the bus Pete |
|
|
|
||
|
|
Quote:
Hope this clearifies it a bit. Danny |
|
|
||
|
|
|
|
|
Wiring library for the Raspberry Pi
Beer Gnome,
Getting a handle on the GPIO on the Pi can get confusing because of the way Broadcomm numbers the pins. That being said, I found a great library by Gordon Henderson called wiringPi. It makes adressing the pins the same as its done on the Arduino, and infact offers the same commands found in the arduino's wiring library. It also provides simplified handling of SPI, I2C and PWM. I installed it and have been testing it, with good results. It will make communications between the R Pi and an arduino easier to handle as well. Once I have my arduinos in hand I will start testing that as well. Pete |
|
|
|
|
|
|
Joined Dec 2012
71 Posts
|
I'm controlling the transmitter directly with an Arduino for my ship transmitter. I've replaced the analog potetiometers with digital pots controlled by the Arduino. Instead of "sticks", I have linear sliders that are ready by the Arduino. I've marked different positions as different engine orders (such as Ahead One-Half). The user doesn't control the transmitter directly... the Arduino does. This would actually allow me to program in some automated navigation sequences if I really wanted to. I could make the ship do figure-8's at a push of a button if I wanted to, for example. Anyway, I have a whole build thread going on over on the Scaled Boats forum, complete with video showing one of the motors being controlled.
http://www.rcgroups.com/forums/showthread.php?t=1800914 |
|
|
|
|
||
|
|
Quote:
So, I'm reinstalling Wheezy and starting over.. I've got pi and arduino talking over USB no problem. Keep in mind that since the pi is doing a bunch of multitasking, talking is not in real time. the pi sends instructions to the arddy when it gets around to it. |
|
|
||
|
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Discussion Kadet Senior with a Jazz HDV146 on board | Tipover | Aerial Photography | 0 | Jan 14, 2013 12:06 AM |
| New Product Pinoccio - A wireless, web-ready microcontroller with WiFi, LiPo battery, & built-in | johnorama | UAV - Unmanned Aerial Vehicles | 0 | Jan 08, 2013 01:52 PM |
| Help! Please Help On ESC interface with Basic Stamp Microcontroller | MAX_MN | DIY Electronics | 17 | Jan 20, 2012 03:45 PM |
| Discussion microcontroller- PC usb communication | rocky79 | DIY Electronics | 21 | Feb 19, 2006 10:48 PM |