Pic based temperature alert alarm triggering the heating pad (i call it a bodywarmer)

Discussion in 'The Projects Forum' started by gmkrishna, Feb 2, 2014.

  1. gmkrishna

    Thread Starter New Member

    Feb 2, 2014
    5
    0
    Before all please note that i am a beginner in doing projects. (i.e) I am fledgling learner but the one who's gotta lot of interest.

    Now, I am planning to do a project which in its basic function can be divided into two blocks namely: A PIC BASED COLD ALERT TEMPERATURE SENSOR ALARM and A WARMING CIRCUIT using the DC operated heating Pads that is planned to be bought from Sparkfun(i have attached the image of the pad). The PIC-based alarm is exactly as the one published in the "Everyday Practical Electronics" Magazine in July 2010 authored by David Clark.(uses PIC 16F627A and it's circuit is also attached for your kind clarification)

    Because of my interest, to incorporate my own idea , I have added my own idea to switch on the above mentioned heating pad (i.e) "electrically" (not physically by relay etc) by electrically connecting (short circuiting to pass current) the heating pad to the battery and that too by wirelessly sending a trigger (or) control signal (or) whatever signal suitable to achieve the intended purpose from an RF transmitter on the Alarm side by detecting the alarm state (at a particular temperature set by programming the PIC) to the RF receiver module present on the heating pad side (whose output is used to "electrically" connect the battery to the heating pad.) For this, i have bought the WS TX-01 and WS-RX-01 modules working at 433MHz(uses ASK mod and demod) in the hope that it may fulfill my requirement.

    In short, the most important requirement is to provide a continuous DC supply (not intermittent as we pass a square wave as input to the heating pads) to the heating pads during alarm conditions and to entirely open circuit the heating pad from the battery "electrically" under no-alarm conditions. (i.e) I need to have some control to provide a constant DC supply to the heating pads as we would simply connect the battery directly to the heating pads to initiate its warming at the 'alarm condition' and to completely be switched OFF when there is no-alarm condition.

    Though i had thought many ideas for this control action such as using a 2 input AND gate with battery connected at one i/p and the control signal at other i/p (or) using a tristate buffer (or) a schottky diode rectifier etc, they encountered bottlenecks at some point on the circuit as I am quite unsure of how to control the "warmer" side exactly at the same time when the alarm state is detected by the PIC microcontroller.

    FOLLOWING ARE SOME EXAMPLES FOR THIS:
    Originally, for such a constant supply of DC to the heating pad during the alarm condition, i had planned to use the signal from the "RED LED" (giving a visible indication of the alarm) which according to the program (i ve attached the .asm file in .txt format) was made to blink (i.e) with an OFF interval of .5 seconds probably to reduce power consumption of the microcontroller as it is said in the magazine.

    Suppose that I transmit that signal to act as a control signal, say, to a 2 i/p AND gate where one i/p is always connected to a 5V supply to operate the heating pad and the other i/p is the signal that drives to the RED LED(see ckt dia attached). Which means that 1 AND 1= Logic 1 for the 'ON' period of the control signal. But, during the 0.5 s OFF period, the AND gate would produce LOW output thus cutting-off the supply of 5V to the heating pad for .5s which i need to eliminate.

    Even if i use a "Transistor-switch circuit", the OFF period may drive the transistor to Cut-OFF leading to non-availability of CONSTANT supply to the heating pad for .5s.. Any rectifier related may solve this problem (or) any other simple logic ???

    That said, I am in critical need to implement the circuit practically as it is going to be, for sure, my final year project. But, still i could not arrive with a technically-correct circuit or idea of how to implement the"wireless switching of the heating pad" circuitry.

    Please Please consider this post as a humble request to you all to help me out with a possible idea (or) suitable circuit to implement it practically as it would mean a lot of my heartfelt blessings for you. I am confident after posting in this forum that I will succeed in finding the answer because of it's excellent tech-savvy user base..
    Thank you for all..
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,421
    3,355
    Welcome to All About Circuits. May you find many helpful ideas and advice here.

    Do you work in the patent office?
     
    spinnaker likes this.
  3. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988
    You think you can boil your post down into one or two questions??? And without all of the flowery words? Just get to the point please. Who is going to take the time to read all of that?
     
    Brevor likes this.
  4. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    I just did! :)

    I think the op's post is quite detailed in what he needs to accomplish, although he may need 2 microcontrollers for this project, one for the alarm controller side and another to switch heaters on and off.

    A mosfet on the heater control side will work to "connect" the heater to the battery.

    Although I do not see the necessity of having a wireless controller when It would just complicate things. One uC. Should be sufficient in detecting the "cold" alarm, and to switch the heaters on or off.
     
    gmkrishna likes this.
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988
    This same exact post is on other boards. Sorry to tell you. :(
     
  6. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    Well apparently, everyone else on those boards have the same viewpoint towards the op's project. And unfortunately just because others don't want to take the time to help the op because of his detailed, does not mean I am gonna treat him the same way. Maybe we need to spend more time actually helping others rather than pointing out the obvious. I mean when an op posts a single sentence, everyone tells them to elaborate more, and when they do, we have people like you saying its too long, as much time as you apparently spent trolling this op, you could have spent the time to actually say something constructive about his project. Or just not have said anything at all. No offense to you, but you could have spent those minutes searching other forums for thist post, to just read his post and move on if you can not help.
     
    gmkrishna likes this.
  7. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    I think the schematic is overly complicated.

    The LM35 temperature sensor outputs 10mV change per degree C, and the PIC ADC base resolution is 5v /1024 = approx 5mV per ADC count. So you can eliminate the opamp and still get temperature reading to approx 0.5'C resolution.

    Q2 is not needed, the LM35 uses low current so it can be powered from a PIC output pin directly, assuming you need to turn the LM35 off at times to save power.

    And Q1, R1, R4 are also not needed, they seem to be an irrelevant addition?
     
    gmkrishna likes this.
  8. gmkrishna

    Thread Starter New Member

    Feb 2, 2014
    5
    0
    I SALUTE U NOT ONLY FOR TRYING TO HELP ME BUT FOR BEING "PRACTICAL".:)
    btw, I am a beginner sir.. So, to be frank, I require help to achieve the "Switching" of the heating pad wirelessly without using another uC on the other side and by using only the PIC used for the Alarm ckt as given in the image.. Some suggest me to use the UART to transmit a digital stream of info bits to achieve the control by modifying the code i ve attached.. But, again, I am a fledgling to handle(understand and create) codes for the PIC.. Any possible ideas by using a ckt using active/passive cmponents or ICs without using another uC???
    Thanks for helping.
     
  9. gmkrishna

    Thread Starter New Member

    Feb 2, 2014
    5
    0
    only after a "frantic but hopeful search", a man comes to realize the existence of "God" in the long run..
     
  10. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988
    If I understand what you need correctly then not having a pic on both sides would be a huge challage. Far easer for an mcu to do it. You would need something to recieve the signal then interrpret it,
     
    gmkrishna likes this.
  11. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    A 4 bit latching encoder/decoder (only 1 bit is needed but I think a 4 bit is the smallest encoder decoder pair you can get) setup would work, the tx side will be connected to the pic, and the decoder will connect its output to a mosfet or relay to turn the heater on or off.... it sounds pretty simple to me.

    But one question though, how would the pic "know" what temperature the heater is at? You will need a way to tell once the heater has reached a limit, so the pic can turn it off.
     
    gmkrishna likes this.
  12. gmkrishna

    Thread Starter New Member

    Feb 2, 2014
    5
    0
    Btw, What is the suitable signal that u have assumed to be given as an input to the TXR of the transmitter module and from which pin of the PIC-microcontroller????:)
    Regards
    Muthukrishnan
     
  13. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234

    A suitable signal would be a logic level input, high or low depending on the TX module you choose.... any pin you choose to use.
     
    gmkrishna likes this.
  14. gmkrishna

    Thread Starter New Member

    Feb 2, 2014
    5
    0
    I had in my first post mentioned that I thought of using the WS TX-01 and WS RX-01 which uses ASK it seems and the signal that powers the RED LED during "alarm" from the port RB4 (as shown in the ckt dia in my first post)..
    But while going through the code (also attached with the original post), the above said signal to the red LED during alarm is not a typical binary bitstream of 50% duty cycle but consists of some .5s off period probably to reduce power consumption of the uC (U experts please go through the code to ascertain it because I am not so efficient in understanding and writing codes of PIC).
    For such a signal, can u plz say what would be the best way to implement the controlling action for turning on and off the heating pads without using another PIC on the other side??
    Thanks for helping.. :)
     
Loading...