Jump to content
chicken

[POTM] dAISy - A Simple AIS Receiver

Recommended Posts

As is.... :-)

Hello StrangerM! I just want to configure my own dAISy using Si4362 and Energia based on your code.

But I have one question, why did you comment this part? 

 

// configure WDT

  WDTCTL = WDTPW | WDTHOLD;       // stop watch dog timer

 

  // set clock to 16MHz

  BCSCTL1 = CALBC1_16MHZ;

  DCOCTL = CALDCO_16MHZ;

  BCSCTL2 = 0;        // MCLK and SMCLK = DCO = 16MHz

 

How did you ensure the MSP430 clock's 16 MHz?

 

Regards,

Rian

Share this post


Link to post
Share on other sites

Hello, Rian. Yes, I am sure. But full part of the text is 

 

/*
    // configure WDT
    WDTCTL = WDTPW | WDTHOLD;                // stop watch dog timer

    // set clock to 16MHz
    BCSCTL1 = CALBC1_16MHZ;
    DCOCTL = CALDCO_16MHZ;
    BCSCTL2 = 0;                            // MCLK and SMCLK = DCO = 16MHz
*/

You can see /*.....*/ . This part of the text does not work. Energia is a cross platform. It works with every launchpad.

Regards, Michael. 

Share this post


Link to post
Share on other sites

Thanks for the fast response StrangerM!

I didn't know that MSP430 has the different way to set the system clock before.

 

Btw, I have another question. In your hardware configuration, do the pin configuration still like this:

 

  • SEL -> P1.4 (SPI chip select)
  • SCLK -> P1.5 (SPI CLK)
  • SDO -> P1.6 (SPI MISO)
  • SDI -> P1.7 (SPI MOSI)
  • GPIO0 -> P2.0 (I/O unused)
  • GPIO1 -> P2.1 (I/O clear-to-send)
  • GPIO2 -> P2.2 (I/O RX clock)
  • GPIO3 -> P2.3 (I/O RX data)
  • SDN -> P2.4 (shutdown / reset)
  • IRQ -> P2.5 (I/O channel-clear)

Because I see a little difference configuration in pin configuration at packet_handler.c:

 

// pins that packet handler uses to receive data
#define    PH_DATA_CLK_PIN        RADIO_GPIO_0    // RX data clock
#define PH_DATA_PIN            RADIO_NIRQ    // RX data
#define PH_DATA_PORT        2

 

 

Thank you StrangerM.

 

Regards,

Rian

Share this post


Link to post
Share on other sites

Thanks for the fast response StrangerM!

I didn't know that MSP430 has the different way to set the system clock before.

 

.......

In Energia - Tools/Board/LaunchPad w/ msp430g2553 (16MHz)

Share this post


Link to post
Share on other sites

For those with a dAISy USB or BoosterPack, I just published a new firmware version 4.11 on GitHub.

https://github.com/astuder/dAISy/tree/master/Firmware

 

It introduces the greatest incremental improvement since firmware 4.02. Turns out, slower channel hopping works A LOT better. Same range, but in my tests the change results in about 25-30% more messages received.

 

I also fixed bug in serial communication that only occurs when you try to connect dAISy to an Android device. That bug was introduced a month ago, and impacts only a few customers that ordered units between December 20 2016 and January 18 2017. :(

 

As always, please let me know if you run into any issues.

Share this post


Link to post
Share on other sites

Hello All,

 

I'm very impressed for the development of dAISy in this forum since 3 years ago.

But I just started to built my own dAISy and Launchpad MSP430G2553 as below.

 

https://nazmibojan.wordpress.com/2017/01/30/ais-receiver/

 

I need help to finish this dAISy soon :D

My dAISy stopped running at radio_configuration() function was executed. If I remove dAISy from Launchpad, it works and launchpad gave red led blinking sign. But when I attached dAISy to Launchpad, it didn't even show any sign (including red blinking for error get chip status).

Can you help me where the problem is?

(ph_start() didn't worked too when dAISY attached)

 

Regards,

Rian

Share this post


Link to post
Share on other sites

Hi Rian,

 

Are you using CCS to develop your dAISy project? I highly recommend CCS and the original project shared on Github, at least until you get that working. Energia is very limited in its debugging capabilities and may interfere in other unexpected ways.

 

If your code hangs inside radio_configuration(), then it's very likely that there is an issue with the wiring or pin configuration. In particular RADIO_CTS (GPIO1) is critical. The radio uses this line to signal when it's ready to receive more commands from the MCU. Also RADIO_SDN (radio shutdown) needs to be set to low to turn on the radio.

 

A simple test is to call radio_part_info() and see if

  1. the call completes or hangs.
  2. after the call radio_buffer.part_info.part_msb and part_lsb contain the part number (e.g. 4362).

 

If it hangs, double check wiring and pin configuration for RADIO_CTS and RADIO_SDN. If the call completes, but radio_buffer does not contain useful data, verify the SPI connections (MISO, MOSI, SCLK, CS).

 

Edit: Corrected name of RADIO_CTS pin

Share this post


Link to post
Share on other sites

Halo Chicken!

 

Thank you for your advices. It really helped me. I can solve some problem like radio_configuration() and ph_start().

But now, I'm stucking at radio_get_chip_status(0). Either radio_part_info() and radio_get_chip_status(0) hang.

I have been checked the wiring and pin configuration for RADIO_CTS and RADIO_SDN. It was OK.

Can you help me to find where the possibility problem now?

How to ensure the RADIO_SDN is set to be low? By using 100kOhm resistor?

 

Regards,

Rian

 

P.S.: I'm using Launchpad v1.5 and print the original dAISY's PCB design in GitHub.

Share this post


Link to post
Share on other sites

Hi Rian,

 

The packet handler interrupt routine will send SPI commands to the radio IC. This means that you cannot make calls to the radio from the main loop after ph_start(). If you want to test communication with the radio IC, comment out ph_start().

 

radio_setup() does configure all the pins. One could argue that I should also have set RADIO_SDN to low in there. Instead the first few lines of radio_configure() reset the radio by setting the SDN high for a few milliseconds and then low.

 

If you want to put a resistor on the SDN line, I'd use a pull-up to keep the radio in reset until the MCU explicitly turns it on. Either way works though. I'd go with a smaller resistor, maybe 10K.

 

Double check the connections with the defines in the source code. I may have shuffled things around in later revisions.

Share this post


Link to post
Share on other sites

dAISy Hat for the Raspberry Pi

 

I have been using the new dAISy hat for the Raspberry Pi for a while now with OpenCPN and thought I would make a post.  I find it very usable on a RPi 3 (much improved over the RPi 2) and have seen improved reception with the two channel dAISy receiver as well.  Below is a screenshot of the most recent version of OpenCPN (4.5.0) running on a Raspberry Pi 3 with the latest Raspbian and

post-45284-0-59931800-1486509915_thumb.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×