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.

CCS/TM4C123GH6PM: Suitable Chainable Temperature sensor for reading from TM4C123GH6PM as alternative to DS18B20

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: LMT01, TMP117, TMP107, TMP1075, ENERGIA

Tool/software: Code Composer Studio

Hello,

I designed a custom TM4C123 circuit for robotics control. In my initial design I used DS18B20's. I am near code completion, and I figured out there is no one wire support for the TM4C123GH6PM, and one would have to implement it using GPIO's and Timers, and maybe delays, which is not acceptable for this software project, as the main loop is already too busy.

In a similar forum posting, I saw TI made parts that are similar are LMT01, TMP107, and TMP117.

Unfortunately LMT01 has a frequency interface, and the tmp107 and tmp117 are smd devices.

I would like to change my design to using different tempereature sensors. The purpose is to measure temperature of motors.

So do you have recomendations on which temp sensors to use?

Best regards,

Can

  • Dear Can - 

    the Tiva C Driver Library does support 1-wire (see page 401)

    http://www.ti.com/lit/ug/spmu298d/spmu298d.pdf 

    That said, the TMP117, TMP1075 and similar might be good alternatives for you - these are I2C based devices

    Are you using RTOS or non-RTOS? (your comment about the main loop indicates perhaps you are using non-RTOS)

  • The TivaWare library supports 1-wire because it is on the TM4C129XKCZAD device. Unfortunately the TM4C123GH6PM does not have this peripheral.

  • Greetings - we (past) interacted here (w/some success as I recall) several times.   I've a bit different take than those arriving earlier - may prove of use and/or interest to yourself/others.

    My small firm has been increasingly involved in the Control & rather intense Data Acquisition of (relatively) 'Small, land, sea & submersible', autonomous & semi-autonomous vehicles.   And just as you've noted - 'Motor(s), Lithium Battery Packs, and the Semi-based Power Stages' - all require regular & robust temperature monitoring.    (And the implementation of quick & effective  'temperature reduction methods'  - if the craft is to (both) meet performance goals and (even) survive.)

    My group would 'never' consider 'One-Wire' for such task.    While I2C - and its 'too often 'Missing ACK' - often challenge & dismay - that protocol was/is, 'very well designed' - one-wire cannot 'hope' to compete.   Thus I2C enables your expressed, 'Need for device chaining' - while sensing temperature and (many) other vital parameters.

    I do detect a 'flaw' in your (seeming) desire to, 'Chain multiple sensors' and then bus them back to the (assumed) single, Controlling MCU.   As you know - I2C is a short-distance bus - and 'range-extenders' add to your device's Size, Cost & Power demand.

    You note (both) that your 'Main loop is 'already' too busy - and that you plan to measure motor temperature.    Does this not (somewhat) fly in the face of your 'Multiple, chained, I2C bus implementation - and the 'proper' measure of motor temperature?    My group has (earlier) 'bumped against both' and has resolved via:

    • We 'freed' the Main MCU from the (excessive) demands imposed by multiple (we had 7) I2C sensors.    We employed a 'low pin count, (& low cost) ARM Cortex M0' - as the Sensor Manager - and then employed UART rather than I2C - between Sensor & Main MCUs.   Very notable 'Main Loop' improvement.
    • Good as these 'semi-conductor based' temperature sensors are - they (usually) prove challenging to (properly) embed w/in a smaller sized motor.   Our solution saw '06-03 RTDs' and even 'thermocouples' - which were far easier to attach to the 'motors' (more than one motor) hot-spots.'    The 'extremely' low level signals from these devices (surely) demanded the 'close proximity' of our Sensor MCU - which managed the Data ACQ. and communication back to the Main MCU.

    You appear to be 'averse' to the use of SMD.   That's hard to justify today - and to gain the full benefit of your IC temp. sensors - you should not 'heat sink them' (even accidentally) via a (large) DIP style IC and mated pcb.   Those sensors must be placed as close as possible to the 'expected' hot spots - and then well-secured.    Large mass installations (DIP ICs) will sink heat & be more difficult to 'robustly secure!'

    For the record - our (near) autonomous vehicles employ 2 (or more) ARM Cortex M7 MCUs (>200MHz) which 'exchange' w/3 or more ARM Cortex M0s.    Tasking (just one) MCU has (surely) No Chance in our arena... 

  • Bob - thanks for the detail!

    cb1 - Hope you guys can reconnect if needed. 

    Can - 

    So the options here as I see them are: 

    1. move to TM4C129 and continue using the DS18B20, leveraging the one-wire protocol. 

    2. stay with TM4C123 and make firmware example which perhaps follows this application note: https://www.maximintegrated.com/en/app-notes/index.mvp/id/214 and I did find a TI Reference for SDQ / One-Wire host firmware (its from MSP430, but should be able to use as example for yourself)

    Tech Note: http://www.ti.com/lit/an/slaa768/slaa768.pdf 

    example code is here ==> 

    There is also a one wire slave example here: 

    http://www.ti.com/tool/TIDM-1WIREEEPROM

    3. stay with TM4C123 and move over to using TMP117, TMP1075, etc. on I2C (there are six channels of I2C on that device, which should be more than enough hopefully :))

    Let us know how more we can advise or help you!

  • Josh,

    While your guidance IS 'w/in the realm' - how do you answer:

    • Poster's noting that (already) his 'main loop' is 'TOO BUSY!'    A cascade of  'One Wire' and Multiple, Sequential Device Transactions is (almost) certain to 'BLOW UP' his (already) challenged - main loop!
    • How does one 'FIT' the 'Temperature Sensing IC - and its mated pcb - w/in the motor?'   Is it not the motor's interior which must be monitored?    (as the heat collected (internally) must be carefully monitored (and controlled) as it may (drastically) weaken the motor's magnets [while] melting the needed insulation from the Stator Windings!)    Especially so if these are modern motors - employing 'rare-earth' magnets - which prove (especially) temperature sensitive.    Such 'over-heating damage' is NOT reversible - thus the (much) smaller temperature sensors (earlier noted) are (most always) the 'components of choice' for 'serious' Motor Temperature Monitoring.

    In light of the above - can one (really) recommend:

    • A relatively slow (80 or 120MHz) clocked - SINGLE MCU?    Was not the case for  'multiple & higher performing MCUs'  - already cemented?
    • Use of  "One-Wire" which must Sequentially Accommodate multiple Sensor Devices?    (While user's main loop is (already) bursting!)
    • Use of  pcb-mounted - IC style temperature sensors - which (ideally) must 'fit w/in' & robustly attach to the motors' (multiple) windings?

    The fact that a device exists - does not always - elevate it to (clear) 'Suitability and Fitness to Task.'    Indeed reality IS harsh - perhaps best  to 'read of these precautions' - rather than experience them, 'In the Field!'     The 'scent' of  burning motor windings - along w/a 'Significantly Slowed & Torque Reduced Motor' - prove expensive - and (both) are to be avoided!...

    [edit[  09:35 CST - 13 July:    Does it reflect 'well' on those who request design guidance - receive such in detail - and then 'Go Silent?'    (Indeed - 'everyone' IS BUSY!)   Is it improper to (likely) identify fundamental design weaknesses (even flaws) which will surely 'compromise performance' and even worse - lead to (predictable) system failures?   

  • Dear cb1 - 

    this forum is to help folks with their applications, when using TI parts. We do our best to recommend what we know is feasible and works.

    If you have some knowledge or advice that you want to contribute, please feel free to submit your input - but we ask that you please respect the reality here that that someone else is trying to get help here - and that it was given. 

  • I suspect that you've 'misread or misunderstood' my brief edit.   (issued earlier today)

    That  'edit' was directed to the original poster - as he has been 'silent' - for 3+ days now.

    My writing was motivated by the 'keen response' he's received - from  you, Bob & myself.    Is it your opinion that such bulk & focused effort should receive no comment (good or bad)  and the thread (then die) through 'disinterest?'

    You ask, 'If i have some knowledge or advice' - was that not in evidence?    As such Robotics designs grow smaller, and faster, and more precise - higher performance is (always) sought.    And it was that 'reality' which my posts targeted!

    Again - my edit was (rather clearly) aimed at the O.P. - not to those whom,  'Rose to the Aid'  of the inquiring (yet now silent) poster!

  • thanks for the clarification. Please allow us to manage the forum - we do not force posters to respond or acknowledge our responses. 

  • The fact that 'first you' - and then Bob - responded so quickly - provided my motivation to, 'Offer up my firm's experience.'    (We have done such design work for many years now - and (may) have 'some' capability.)

    My 'edit' was deliberately formatted as 'question-based' - not as declarative statements.    Thus - there was no 'hint' of force - instead a (fair) reaction (due to disappointment) was registered.   The poster remains free to 'Do as he/she chooses' - my long history here sought, 'Forum Efficiency.'   (for the benefit of all...)

    I visit this forum only 'rarely' now - and today was my last chance to 'check-in' - and see if this poster had responded.    My 'edit' was as gentle as UCLA Law taught.    As an alternative - as I (always) teach staff - "Provide the client (and/or forum helper) some response and brief thanks - sooner rather than later."  

    Clients especially become concerned when they do not hear back from (usually) small firms.    And that is among the 'Easiest & Least Costly' (defects) to correct.   Clients always wonder:

    • Did they receive our message?
    • Are they interested?
    • Are they capable?
    • Who ELSE can we turn to?

    Clearly - none of the above proves good.   Instead:  "Dear Client,    Thank you - we are in receipt of your request - are presently, 'Up to our ears in alligators' (insert reptile/animal of choice) - require a bit more time to (properly/skillfully) resolve 'complications' w/in your project - and shall be back to you w/in (x number) of days/hours."    

    This strategy - along w/many long days/nights - and (some) smarts - enabled me to co-found, serve as VP Engineering - and then take (past) Tech Firm from Start-Up to PUBLIC.     Young Staff thought such detail proves 'helpful'  ... (even) here!  ...  (we shall see.)

  • Thank you, I will try those solutions one by one. I am writing code for ros_embedded, and although I am aware that a RTOS implementation could easily be solve the busy main loop problem, but I am constrained to rosserial_tivac library, which handles timing itself.

  • hello cb1_mobile: thank you for your recommendations. I had a neck sprain, and I resisted to go to doctors, so I ended up in the emergency room, but now I am fine. that's why I have been silent for few days.

    your recommendations do contain real world operational knowledge. I understand trying to fit everything in a main loop, and even for critical things like motor temperature could be problematic, this is exactly what I am doing. I need to monitor two motors and one battery, and battery is absolutely critical.

    thank you.

  • Thank you guys for all the answers, the amount of support that I get from this forum is enthusiastic over the years. I started coding with energia/tivaC and now I am building my custom design robot boards and coding using ccs and gcc-arm for ros. It all happened thanks to your support.

    Here is a picture of the custom board that I have been asking questions about. It attaches to a raspberry pi over usb, and shows up as /dev/ttyACM0 on the RPI,

    and it provides odometry data, Imu data to the raspberry pi, which uses robot_pose_ekf package in ros to localize the robot, meanwhile accept a speed/direction command, and execute the required motor speed to the pid algorithm.

  • Thank you - it is greatly comforting to now learn of the presence of (another) ARM MCU.   (via the Rasp Pi)    It was 'unfair' to place the entire 'Robotic Task' upon (any) single MCU.    (Even this vendor's MCU!)    That IS a great photo you've included - btw!

    May I urge you to start seriously considering 'just how' you will mount (any) IC based temperature sensor  (likely soldered to its small/mated pcb) - w/in the 'restricted confines' of an (assumed) modern motor.   (Perhaps a BLDC Motor - for  'Higher speed,  power efficiency, & improved heat transfer.)    BLDC 'In-Runner' Motors place their copper  Stator Windings  (i.e. 'heat-generators') in contact w/the motor's metal encasement - which proves a highly effective 'heat-sink' - extending motor life & performance.    (those Stator  Windings are  chemically/barrier, coated/insulated - allowing physical contact w/'adjacent & touching windings'  (while avoiding  'winding to winding' and/or 'winding to (metal) motor case' shorts!) 

    As past written - we found  'smd 06-03 sized RTDs and/or Thermo-Couples -BY FAR - 'Easier to Install and to Survive!'    The motor's environment is often, 'Heated & Shock/Vibration Rich' - adding to the challenge of (somehow) 'fitting an IC sensor & pcb' robustly  - w/in such limited space.   You may note that 'exactly those 2 components' (RTD or thermo-couple)   - appear w/in most all 'serious, modern motors!'

    If sufficient interest exists - I can provide, 'Hi-Res, Close Up Photos' - revealing the (serious) challenges posed in 'Attempting to employ' an IC-style sensor (and pcb) w/in a 'modern' motor.    (likely a BLDC motor)   Should the older motor technology (i.e. Brushed Motors) be 'in play' - the issue may prove 'Even HARDER!'    (that's because the motor windings are now upon the Armature - which rotates - and is central w/in the motor!   Being central - there is no 'Heat Transfer Path' and (again) as this structure rotates - HOW EVER can the: Power, GND, I2C signals (or 1 wire) - attach and remain connected - under rotation?   (ANS:  they clearly cannot - thus the futility of this proposition!)   Note that (even) measuring 'away from the rotating Armature' proves inaccurate & delays response - placing the motor in grave jeopardy!

    Best of luck w/your project...