Tuesday, February 26, 2013

Arduino and Radio-SkyPipe

A New Start

 This is my new effort at blogging.  This will replace the Radio-Sky Journal which I never was able to be productive at.  I am hoping for better now.  My current intent is to make this blog more than just an amateur radio astronomy place.  All sorts of amateur science will be incorporated.  This can run the gamut from biology to hardware hacking.  Sometimes, content will be directly related to my products, however, often it will not. 

Arduino and Radio-SkyPipe


Lets get started with something I am really excited about, connecting Radio-SkyPipe (RSP) to Arduino devices.  I will describe the details of the project on a static web page, but let me introduce you to the basic ideas here.  Radio-SkyPipe is my data-logging PC based strip chart program..  It is written in VB6 which for now still seems to work on Windows computers.  Originally, the program only allowed for input via the sound card or a homebrew analog to digital converter connected to the parallel port (remember those?).  In 2009, I created a open source protocol for other devices to send chart data to RSP.  I called this the UDS (User Data Source) model.  The protocol requires the recognition of few commands and proper formatting of the data being sent to RSP for plotting. 


For every UDS that I had created, I wrote corresponding UDS executable program that stood between the data collection device (usually an analog to digital converter or ADC) and RSP.  I was using whatever protocol was native to the device to communicate with it and translating to feed RSP.  The data flowed between the UDS execuatable file and RSP over a simple TCP connection in which the UDS exe acted as a server. 

Last year I began working with Arduino hardware for a privately contracted project.  We ended up abandoning Arduino because of speed concerns, but I was taken by these devices and all of the inexpensive hardware that could be easily interfaced to them. Several weeks ago I received an email from Jonathan Rawlinson regarding a project he was working on in which he was communicating with an Arduino to Radio-SkyPipe not by the serial line directly but via a TCP-RS232 converter program.  The Arduino was handling the protocol and the converter program simply acted as the TCP route to RSP.

I decided to use a little different approach than Jonathan and to generalize the code so that it could be used by anyone writing an Arduino sketch (program).  I decided it was a practical thing to remove the TCP-Serial converter program and talk directly to the Arduino via its com port connection.  So RSP now has a com port associated with it and may exchange UDS commands and data over the serial connection without the aid of TCP.  If you have a TCP UDS, don't worry.  Both connection types are supported.

The old UDS method is shown on the left. RSP 2.5.0 provides a direct connection via a serial port to devices like the Arduino.


  The hookup details and code are given here.  I am sure that improvements can be made and that many different approaches could be taken to facilitate the UDS protocol in Arduino.  I welcome your contributions to this effort. 

2 comments:

  1. Hi, I have been trying to use your UDS Sketch to communicate with RSP. I've got the latest versions of the Arduino IDE and RSP. and I've triple checked the baud rate and sample rate matches. But here is a typical log sequence when I start RSP:

    150116 (YYMMDD) UT
    17:22:24 Closed All Connections
    17:22:24 Server Connection Socket Listening: False
    17:22:24 Enter Stand Alone Mode
    04:22:44 Chart Started 150116042245
    04:22:44 Connecting to UDS on Com : 3

    I made sure the RSP connection dialog boxes for UDS were config'd to your recs.

    If I disconnect from RSP and run the Arduino IDE serial monitor the sketch responds as if it is working but there is a funny letter at the end...here is the result of a channel number query:
    ^^20131ÿ

    Is the last character the 255 "end of message" signal? or does this look like a problem to you? I am at a loss ... the connection is made but I can seem to get samples through to RSP.

    I have tried pushing to and pulling from ...all sorts of combos so I'm thinking I need to adjust the sketch send dat protocol. Thanks for doing this ... together arduino and rsp would be soooo powerful in my lab.

    ReplyDelete
    Replies
    1. Coacervate, I am terribly sorry it took me so long to respond. I was away when you commented and just now saw the comment.

      Yes the char 255 is supposed to be there. If you haven't fixed your problem drop me a email : radiosky at radiosky dot com. I would be happy to help you sort out the problem if I can.

      Delete

RF Noise Source NF-1000 SZ evaluation

  I have been working on an automated step calibrator project in recent months, so I was excited when I saw the device shown above on eBay. ...