This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TIDA-00151: Self-Driving RC Car

Part Number: TIDA-00151
Other Parts Discussed in Thread: PGA450-Q1, ENERGIA, PGA450Q1EVM

Hello TI, Jared again.

I am currently working with the PGA450 (TIDA-00151) as stated with the Arduino Mega. I am having trouble driving the system. How do I initiate the system to begin giving me data? Do I have to input a specific sequence? I saw the UART commands you suggested but they do not seem to do anything.

Any help at all would be appreciated. I am honestly at a lost as to why it will not produce data.

Thanks.

  • Hi Jared,

    I suspect your targeted address may not match the address stored in EEPROM address 0x1F.

    If you have purchased the pre-programmed TIDA-00151 (EVM-S) reference design, then the following UART commands are available as described in section 2 of the UART Demo Instructional ( http://www.ti.com/lit/ug/sldu019b/sldu019b.pdf ):

    • Command 0—Test UART communication.
    • Command 1—Trigger a short or long distance burst and capture with hard-coded drive and receive settings.
    • Command 2—Read first instance of threshold crossing for closest object detected.
    • Command 3—Update an EEPROM value.
    • Command 4—Read all 768 bytes of FIFO data.
    • Command 5—Burst and capture ultrasonic profile based on EEPROM configuration of drive and receive settings.
    • Command 6—Threshold values report for selected mode of operation (short or long).
    • Command 7—Not used in example firmware. Reserved for custom user defined function.

    The pre-programmed EMV-S is EEPROM register addres 0x1F programmed to a device address value of 0x01 (see Table 3 of UART Demo Instructional). When issuing your UART commands, be sure that byte-2's four LSBs are set to 0x1 in this case.

    For example, using Command0 to test UART communication, send: { 0x00, 0x55, 0x01, 0x00 }, and the PGA450-Q1 will respond with {0x12, 0x34}.

    If the EEPROM of the device was not EEPROM programmed at our contract manufacturer, then the default EEPROM value will be 0x00 or 0xAA.

    • In the case of addr=0x00, try sending: { 0x00, 0x55, 0x00, 0x00 }.
    • In the case of addr=0xAA, you will need to update the value of EEPROM address 0x1F to be between 0x00 to 0x0F since the first LSBs are only checked by the UART command. To update the EEPROM, you will need to use a SPI interface to place the internal RESET state, then manually write and program EEPROM address 0x1F to your desired value. Placing the micro in reset is described in section "7.4.3 RESET" of the datasheet, and the process to update the EEPROM via SPI is described in section "7.5.1 SPI Interface" of the datasheet. Once you have updated this EEPROM value to be <=0x0F, you can then use UART command3 to update the EEPROM moving forward (SPI will no longer be required).

  • Hey Akeem,

    When I click on the link to the demo it does not take me there for some reason. Can you help me out?

    Thanks a ton
  • Hi Jared,
    Sorry, the E2E links can be easily broken when placed in-between parentheses. Fixed link above, and reprinted below.

    PGA450Q1EVM-S User's Guide and TIDA-00151 UART Demo Instructional Appnote: www.ti.com/.../sldu019b.pdf
  • Hi Akeem,

    I appreciate your help. Is this device compatible with the UART for Arduino? Have you had any experience in it? I have tried multiple ways of sending the bytes, I have tried all the different hex addresses between 0x00 and 0x0F just to ensure it was not programmed a different way on accident, and I have tried several different boards of yours and different UART ports on the Arduino (I am currently using the MEGA).

    How does the device respond? Does it send the bytes through immediately after receiving that sequence or does it have a buffer period? The only thing I have left to try is changing the way the arduino reads in the bytes or trying to reporgram it through the SPI ports as your datasheet suggests if I am not getting the correct data back.

    Any suggestions on the matter would be.

    Thanks a ton.
  • Hi Jared,
    The PGA450-Q1 should be compatible with any UART master device, including Arduino. The PGA450-Q1's logic level is at 5V, so the UART port can be directly connected to Arduino without the need for level translation. I have not tested the PGA450-Q1 on the Arduino, but I have confirmed our device is compatible with the MSP-EXP430F5529 LaunchPad in Energia (identical IDE and top-level language as Arudino).
    You can find the Energia demo code for the PGA450Q1EVM-S demo to import into Arduino on the Ultrasonic FAQ page at e2e.ti.com/.../640810 as the "PGA450-Q1 UART Demo Energia Code (Beta Release): PGA450Q1EVMS_UART_Demo.ino" ino sketch file download. You should be able to run this project directly in Arduino (depending on which Serial port you are using - this project using Serial1).

  • Hey Akeem,

    First of all thank you for all the help on this project. I am still having issues. I am currently still not receiving a good test back on the board. It is only sending 255 when i run the test command which is not what it should be sending back according to the datasheet. I would like to go ahead and check the programming. How do you guys suggest interfacing with the computer? Just an SPI to USB connection?

    Let me know and thanks a ton.
  • Hi Jared,

    Yes, SPI must be used to check to the programmed state of the PGA450-Q1.
    When using the TI-GER board from the full-scale PGA450Q1EVM, the process of checking and programming the PGA450-Q1's 8051 MCU is described in sections "8.5 OTP" and "8.6 DEVRAM" of the EVM User's Guide ( www.ti.com/.../sldu007c.pdf ). To connect the TI-GER board to the PGA450Q1EVM-S small form factor module, refer to the TI-GER SPI connection on Figure 2 of the EVM-S User's Guide ( www.ti.com/.../sldu019b.pdf ).

    If you do not have a TI-GER board, you can use a 5V logic level MCU w/ SPI or a USB-to-SPI device to also check the OTP is already programmed by first setting the device into reset, then manually reading OTP address 0x0000, 0x0001, and 0x0002. If the values at these addresses is 0x02, 0x20, and 0x00 respectively, then the device has been OTP programmed to long jump unconditional to DEVRAM, and you should be able to DEVRAM program the device. Refer to section "7.4.3 RESET" of the PGA450-Q1 datasheet ( www.ti.com/.../pga450-q1 ) on how to place the 8051 MCU into the ACTIVE or RESET state. The MCU is always ACTIVE on power-up.

    You can also read out all 8kB of the OTP memory to check if it has been programmed. If all OTP values are zero, then the device has not been programmed at all. Refer to section "7.5 Programming" of the PGA450-Q1 datasheet ( www.ti.com/.../pga450-q1 ) on how to use SPI to program the OTP. Datasheet Table 15 shows the structure of the SPI read/write commands for the various memories (OTP, DEVRAM, ESFR, etc..).
  • Hello Akeem,

    How do I attain the TI-GER board? I am able to get information from the EVM-S board currently through the arduino but it seems random at best. It is currently sending back 0, 34, 83, 255 in that order when sending the test command utilizing the demo program you guys provided.

    I at least know the address is programmed correctly and it sees the data I send it because it does not react with other addresses. However it does not react to the commands the way I would expect it to. For example if I try to read all of the data using command 4 it does not send anything. When I hit command 6 it does not send anything. However it reacts and sends varying bytes when i use command 1 or 5. It also reacts well with command 2.

    Is it possible for me to attain the TI-GER board without having to purchase the full scale EVM? The full scale EVM board will not work in my application as it would take up too much space which is why I am trying to use the EVM-s board with the arduino mega.

    Thanks for any help.
  • Hi Jared,

    Unfortunately, the TI-GER board cannot be purchased separately. Given your device is now responsive, it may not be necessary to purchase this tool for debug.

    To ensure you have configured your Arduino's UART port correctly, see the following UART configuration screen shot for the TI-GER board, and set your equivalent settings to match.

  • Hello Akeem,

    That does seem to be the way my UART communication is set up.

    What would you suggest to accomplish this task? We want to run the car and have 4 sensors detecting objects around it so it can drive by itself. The Arduino does not seem to be working. Does TI have any recommendations?

    Thanks for the help.
  • Hi Jared,

    Just to recap, here is my understanding of your situation:
    1) You have four PGA450Q1EVM-S (TIDA-00151) modules that were OTP pre-programmed with the UART demo code.
    2) You are using an Arduino MCU to communicate to each EVM-S module by 5V logic level UART.
    3) Your UART port is configured for 8-bit data, no parity, one-stop bit, 19.2kBaud.
    4) You have received the response "0, 34, 83, 255" from the PGA450-Q1 when using command-0 (PGA450-Q1 UART test). The response from this command should be {0x12,0x23}, so the actual versus expected results do not match. This indicates that the device is responsive to commands received at the RxD pin, but the actual output or the interpretation of the output is incorrect.
    5) You do not have the TIGER board to run the demo instruction test documented in the EVM-S user's guide, so you are relying solely on the Arduino.

    Here are some additional questions I have which may help with the debug:
    6) What supply voltage are you using to power the PGA450-Q1? The PGA450-Q1 requires 7-18V, so a USB supply will not be sufficient.
    7) Did you reference or port the "PGA450Q1EVMS_UART_Demo.ino" Energia sketch into Arduino to run the PGA450-Q1 UART commands, or did you write your own sketch?
    8) Are you able to capture the logic analyzer output of the PGA450-Q1's TxD and RxD pins when sending command-0?