Jump to content


Photo

[POTM] dAISy - A Simple AIS Receiver

POTM MSP430 MSP430G2553 RF

  • Please log in to reply
258 replies to this topic

#241 chicken

chicken

    Level 4

  • Members
  • 854 posts

Posted 26 December 2016 - 12:13 AM

What an enjoyable Sunday afternoon.

debug fun.jpg

Seriously, I love debugging! :wub:

 


  • dubnet, spirilis and Fmilburn like this

#242 nazmibojan

nazmibojan

    Noob Class

  • Members
  • 6 posts
  • LocationIndonesia

Posted 19 January 2017 - 10:30 AM

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



#243 StrangerM

StrangerM

    Level 1

  • Members
  • 54 posts
  • LocationSankt-Petersburg

Posted 19 January 2017 - 11:45 AM

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. 



#244 nazmibojan

nazmibojan

    Noob Class

  • Members
  • 6 posts
  • LocationIndonesia

Posted 23 January 2017 - 07:35 AM

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



#245 StrangerM

StrangerM

    Level 1

  • Members
  • 54 posts
  • LocationSankt-Petersburg

Posted 23 January 2017 - 06:23 PM

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)



#246 StrangerM

StrangerM

    Level 1

  • Members
  • 54 posts
  • LocationSankt-Petersburg

Posted 23 January 2017 - 06:29 PM

About pins - It was a long time ago. :-)... As is :-)

Regards, Michael.



#247 nazmibojan

nazmibojan

    Noob Class

  • Members
  • 6 posts
  • LocationIndonesia

Posted 24 January 2017 - 04:15 AM

Thanks Michael! It was very helpful.

 

Regards,

Rian



#248 StrangerM

StrangerM

    Level 1

  • Members
  • 54 posts
  • LocationSankt-Petersburg

Posted 24 January 2017 - 05:02 AM

It`s for TIVA-C. As is...

Attached Files


  • chicken likes this

#249 chicken

chicken

    Level 4

  • Members
  • 854 posts

Posted 25 January 2017 - 05:20 AM

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

https://github.com/a...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.


  • StrangerM likes this

#250 nazmibojan

nazmibojan

    Noob Class

  • Members
  • 6 posts
  • LocationIndonesia

Posted 30 January 2017 - 07:55 AM

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.w...0/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



#251 chicken

chicken

    Level 4

  • Members
  • 854 posts

Posted 30 January 2017 - 05:09 PM

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



#252 nazmibojan

nazmibojan

    Noob Class

  • Members
  • 6 posts
  • LocationIndonesia

Posted 05 February 2017 - 02:40 PM

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.



#253 chicken

chicken

    Level 4

  • Members
  • 854 posts

Posted 05 February 2017 - 09:04 PM

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.



#254 Fmilburn

Fmilburn

    Level 3

  • Members
  • 525 posts
  • LocationSeattle

Posted 07 February 2017 - 11:54 PM

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 “PIXEL” desktop and a 1824x984 monitor.  Reception is great considering I was at my desk in the basement with the antenna behind a wall right at ground level.

 

RPi OpenCPN Image.jpg

 

Thanks to the following links for providing the information needed to get the Pi up and running:

 

The default for the Raspberry Pi 3 is to have BLE active on pins 14 and 15 which dAISy needs for UART.  This can be reconfigured using the following handy shell script: https://github.com/i...er/uart_control

 

There are several other boat utilities at Ilker’s site:  https://github.com/i.../rpi_boat_utils

 

There is a write-up with detailed instructions for building the latest version of OpenCPN on a Raspberry Pi here (I used the basic maps only):  http://www.agurney.c...rry-pi/pi-chart

 

I had some difficulty (cause unresolved but possibly user error) with an older version of Raspbian but the latest Jessie image with the PIXEL desktop and updates works fine.  The original dAISy also works well over USB with this image and OpenCPN.

 

Really nice work @chicken!


  • chicken likes this

#255 StrangerM

StrangerM

    Level 1

  • Members
  • 54 posts
  • LocationSankt-Petersburg

Posted 09 February 2017 - 11:57 AM

Ups...



#256 StrangerM

StrangerM

    Level 1

  • Members
  • 54 posts
  • LocationSankt-Petersburg

Posted 09 February 2017 - 11:57 AM

Ups....



#257 StrangerM

StrangerM

    Level 1

  • Members
  • 54 posts
  • LocationSankt-Petersburg

Posted 09 February 2017 - 11:57 AM

I used HAT with USB/COM  cable and have checked up by RasPI test generator.
Excellent.

Attached Thumbnails

  • 17122016.jpg
  • 09022017(001).jpg

  • chicken likes this

#258 nazmibojan

nazmibojan

    Noob Class

  • Members
  • 6 posts
  • LocationIndonesia

Posted 21 February 2017 - 03:54 PM

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.

 

Hi Chicken!

 

Finally I found the problem of my dAISy. It was the soldering pin between Si4362 and the PCB. I created PCB in the local supplier and soldered the Si4362 IC. Si4362 is soldered by smartphone reparation technician in my town.

He didn't checked the IC pad in the PCB. Obviously, the masking of PCB was hit/impinged the IC pad in the PCB. It caused some pins of IC didn't sticked to the pad and radio_get_chip-status() was became hanging.

Thanks Chicken. I will go to the next step: receive the real AIS signal. Wish me luck.

 

Sincerely,

Rian



#259 chicken

chicken

    Level 4

  • Members
  • 854 posts

Posted 21 February 2017 - 09:58 PM

@nazmibojan thanks for reporting back. Great idea to get a cell phone repair shop to do the trickier soldering work :-)







Also tagged with one or more of these keywords: POTM, MSP430, MSP430G2553, RF

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users