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-010042: TIDA-010042 Not charging battery

Part Number: TIDA-010042
Other Parts Discussed in Thread: TIDA-00120

Hi,

I replaced the 4 buck converter mosfets with T0-220 package, uploaded code using spy-bi-wire, shorted pins 1 and 2 on header J3 to provide 3.3V to MSP430 but my battery is not charging. I am using a 4W solar panel to test that has a Isc current of 220mA, is this too small? I noticed the battery provides power to the TIDA-010042 by supplying 14mA of current. I am seeing gate signals on the mosfets but the buck converter is not adjusting the solar panel voltage to its maximum power point, it remains at 21V. I know the MPP for my panel is 17V

Also, I see in main.c the min battery current can be changed, how does 3 in the code correspond to 0.5A minimum charging current? I need to set the minimum battery charging current to 20mA for testing.

Thanks,

  • Hi Amar,

    As the current sensing on this design is tuned for higher currents, it may be difficult for the circuit to arrive at MPP with low currents. The effect of change in current may be way too low to sense with the low power panel you are using. For lower currents, the hardware itself has to be modified (esp. the current sense).

    Regards,

    Salil

  • I have changed the buck lower threshold from 400 to 520 in the code and my panel is able to send power to my battery. Can someone please explain what these threshold values (BUCK_LOWER_THRESHOLD AND BUCK_UPPER_THRESHOLD) map too and represent? Also, how they were calculated to obtain a certain duty cycle range the buck converter would operate in?

  • Hi Amar,

    The PWM timer is configured to run in UP count and is configured with a value of 700. (based on 128Mhz clk / 182 Khz switching frequency). Based on this number the duty cycle's lower and upper limits are configured in the software. You can change the lower threshold, but ultimately depending on MPP the duty cycle will change and converge to a optimum value based on where it is initialized (which is done by DUTY_START variable). You can observe the change by placing the variable in a watch window. Please let us know if you have any further questions.

    Thank you

  • Ok many thanks. I am able to access files GUI.c and Config.c through the TIDA-00120 software. Where does the RespndtoGUI(); function call go in main.c?

    Regards

  • main.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /* ****************************************************************************************************** *
    * main.c *
    * *
    * Created on: Jun 25, 2018 *
    * Author: a0233200 *
    * *
    * Copyright (c) 2018, Texas Instruments Incorporated *
    * All rights reserved. *
    * *
    * Redistribution and use in source and binary forms, with or without *
    * modification, are permitted provided that the following conditions *
    * are met: *
    * *
    * * Redistributions of source code must retain the above copyright *
    * notice, this list of conditions and the following disclaimer. *
    * *
    * * Redistributions in binary form must reproduce the above copyright *
    * notice, this list of conditions and the following disclaimer in the *
    * documentation and/or other materials provided with the distribution. *
    * *
    * * Neither the name of Texas Instruments Incorporated nor the names of *
    * its contributors may be used to endorse or promote products derived *
    * from this software without specific prior written permission. *
    * *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, *
    * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR *
    * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR *
    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
    * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, *
    * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR *
    * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, *
    * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
    * *
    * -------------------------- PIN MAP -------------------------- *
    * __________________________ *
    * | | *
    * AVCC -| 1 (P3.6) 38|- *
    * Battery Status 2 -| 2 (PJ.4) (P3.5) 37|- Buzzer *
    * Battery Status 3 -| 3 (PJ.5) 36|- RESET *
    * AVSS -| 4 35|- TEST *
    * Panel_V_Sense -| 5 (P1.0) (P3.3) 34|- Panel_Enable *
    * Battery_V_Sense -| 6 (P1.1) (P3.2) 33|- Load_Enable *
    * Panel_I_Sense -| 7 (P1.2) (PJ.6) 32|- *
    * Battery_I_Sense -| 8 (P1.3) 31|- DVCC *
    * OPT3001 (SDA) -| 9 (P1.4) 30|- DVSS *
    * OPT3001 (SCL) -|10 (P1.5) MSP430 29|- *
    * Load_I_Sense -|11 (PJ.0) F5132 (P3.1) 28|- *
    * -|12 (PJ.1) (P3.0) 27|- *
    * -|13 (PJ.2) (P2.7) 26|- LED 4 *
    * Battery Status 1 -|14 (PJ.3) (P2.6) 25|- LED 3 *
    * OPT3001 (INT) -|15 (P1.6) (P2.5) 24|- LED 2/RX *
    * Buck (Low-Side 1) -|16 (P1.7) (P2.4) 23|- LED 1/TX *
    * Buck (High-Side 1) -|17 (P2.0) 22|- DVSS *
    * Temperature Sensor -|18 (P2.1) 21|- *
    * Buck (Low-Side 2) -|19 (P2.2) (P2.3) 20|- Buck (High-Side 2) *
    * |__________________________| *
    * *
    * ****************************************************************************************************** */
    //-----------------------------------------------------------------------------------------//
    //-------------------------------------- Notes/Revisions ----------------------------------//
    //-----------------------------------------------------------------------------------------//
    // 1. Diode Emulation mode added to prevent boosting of panel side voltage as a protection feature
    // 2. TimerA interrupt added. Refer the sections on TimerA_ISR
    // 3. Include only main.c in build and exclude other files
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    main.h
    GUI.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /*
    * TEXAS INSTRUMENTS TEXT FILE LICENSE
    *
    * Copyright (c) [2012] - [2018] Texas Instruments Incorporated
    *
    * All rights reserved not granted herein.
    *
    * Limited License.
    *
    * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI ("TI Devices"). No hardware patent is licensed hereunder.
    *
    * Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution
    *
    * Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:
    *
    * - No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.
    *
    * - any redistribution and use are licensed by TI for use only with TI Devices.
    *
    * - Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.
    *
    * If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:
    *
    * - any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.
    *
    * - any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.
    *
    * Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.
    *
    * DISCLAIMER.
    *
    * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    #define GUI
    #ifdef GUI
    #include "msp430f5132.h"
    #include<string.h>
    #include<main.h>
    #include<GUI.h>
    //#include<Config.h>
    //#define TRUE 1
    //#define FALSE 0
    //#define TX 1
    //#define RX 2
    //#define DATA_LENGTH 10
    //#define FRAME_LENGTH 15
    //#define LOAD_DISABLE P3OUT |= BIT2
    //#define LOAD_ENABLE P3OUT &= ~BIT2
    //
    //extern unsigned int CC_LIMIT;
    //extern unsigned int CC_TO_CV_LIMIT;
    //extern unsigned int FLOAT_VOLTAGE;
    //extern unsigned int BATTERY_CUTOFF;
    //
    //extern unsigned int Panel_Voltage,
    // Battery_Voltage,
    // Panel_Current,
    // Battery_Current;
    //
    //extern unsigned int Is_Load_On,
    // GUI_Battery_Charge_Current_State,
    // GUI_Battery_Charge_Previous_State,
    // Is_Cal_Load_Management,
    // Load_I_Limit;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    GUI.h
    hal_tlv.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    //*******************************************************************************
    // Provides Functions to Read the TLV Data Section of the MSP430 Devices
    // File: hal_TLV.c
    //
    // Texas Instruments
    //
    // Version 1.0
    // 10/17/10
    //
    // V1.0 Initial Version
    //====================================================================
    /* ***********************************************************
    * THIS PROGRAM IS PROVIDED "AS IS". TI MAKES NO WARRANTIES OR
    * REPRESENTATIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
    * INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
    * FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
    * COMPLETENESS OF RESPONSES, RESULTS AND LACK OF NEGLIGENCE.
    * TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET ENJOYMENT, QUIET
    * POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY
    * INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE PROGRAM OR
    * YOUR USE OF THE PROGRAM.
    *
    * IN NO EVENT SHALL TI BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
    * CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY
    * THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED
    * OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN ANY WAY OUT
    * OF THIS AGREEMENT, THE PROGRAM, OR YOUR USE OF THE PROGRAM.
    * EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF
    * REMOVAL OR REINSTALLATION, COMPUTER TIME, LABOR COSTS, LOSS
    * OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF
    * USE OR INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S
    * AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF
    * YOUR USE OF THE PROGRAM EXCEED FIVE HUNDRED DOLLARS
    * (U.S.$500).
    *
    * Unless otherwise stated, the Program written and copyrighted
    * by Texas Instruments is distributed as "freeware". You may,
    * only under TI's copyright in the Program, use and modify the
    * Program without any charge or restriction. You may
    * distribute to third parties, provided that you transfer a
    * copy of this license to the third party and the third party
    * agrees to these terms by its first use of the Program. You
    * must reproduce the copyright notice and any other legend of
    * ownership on each copy or partial copy, of the Program.
    *
    * You acknowledge and agree that the Program contains
    * copyrighted material, trade secrets and other TI proprietary
    * information and is protected by copyright laws,
    * international copyright treaties, and trade secret laws, as
    * well as other intellectual property laws. To protect TI's
    * rights in the Program, you agree not to decompile, reverse
    * engineer, disassemble or otherwise translate any object code
    * versions of the Program to a human-readable form. You agree
    * that in no event will you alter, remove or destroy any
    * copyright notice included in the Program. TI reserves all
    * rights not specifically granted under this license. Except
    * as specifically provided herein, nothing in this agreement
    * shall be construed as conferring by implication, estoppel,
    * or otherwise, upon you, any license or other right under any
    * TI patents, copyrights or trade secrets.
    *
    * You may not use the Program in non-TI devices.
    * ********************************************************* */
    #include "msp430f5172.h"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    hal_tlv.h

    Here is the code I have so far. I am getting nothing out of the recieve/transmit pins on my MCU. The __interrupt void TX_RX_interrupt(void) is not triggering

  • The RecievedFrame message is not correct. In other words, when the GUI sends data, Is_Valid_Frame gets set at zero because the CRC fails and the reciveved data does not match the header, message id, and footer.

    Could this be caused by the cable I am using? It is found here https://www.adafruit.com/product/954. Does the GUI need to be fixed? Is the source code available for the GUI?

    The CRCcheck is failing and I`m trying to understand why!

    Also, if I comment/bypass the two if statements in the code below, I am able to view the battery voltage on the GUI but it is not accurate. A 12V battery reads 8.16V

  • Hi Amar,

    We could not get help from anyone involved in the GUI design. It looks like the TIDA-00120 GUI may not work with TIDA-010042.

    Regards,

    Salil