Serin serout problem


Closed Thread
Results 1 to 40 of 337

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    y amaybe , but the +655 is annoying, I'm almost there,
    OK it stick the whole unit outside, Its giving a steady -7 C

    Got rid of the +655:
    added this:

    IF temperature.11 = 1 Then goto Zerotemp
    if temperature = 0 then goto Special
    .
    .
    .
    Special:
    lcdout $FE,1, "TempC: ", dec 0 , ".", dec 0," ",$DF,"C"
    lcdout $FE,$C0, "TempF: ", dec 32 , ".", dec 0," ",$DF,"F"
    goto loop
    Last edited by lerameur; - 31st December 2006 at 00:45.

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    and lastly,

    i want to use a 9v battery to power the system. I want to add a led to signal when the battery need to be changed. would you know at what voltage this would be ?

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    It will depend wich regulator you use and wich voltage your PIC run.

    For battery operated device i will suggest a LDO regulator instead of those grandpa 7805.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default How about solar?

    Quote Originally Posted by lerameur View Post
    and lastly,

    i want to use a 9v battery to power the system. I want to add a led to signal when the battery need to be changed. would you know at what voltage this would be ?
    Watch those sales you can get a solar yard light for < $8.00 US complete with rechargeable batteries you would have solar panel, batteries, housing and an LED to flash!, you would have to settle for 3 volts though.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    and lastly,

    i want to use a 9v battery to power the system. I want to add a led to signal when the battery need to be changed. would you know at what voltage this would be ?
    For one thing, I don't know what your system is made of (I know bits and pieces, that's it, not the whole thing). And another thing, a 9v battery would be dead in a short matter of days running this system, especially if you're using a linear regulator (7805 type), even if you set it up to spend most of it's time sleeping and only waking up like once a minute or so.

    Better idea would be to go with a 4 cell (AAA or AA, doesn't matter) NiMH pack and skip the regulators altogether, then charge it up for about 12 hours using a 9v wall wart and an inline 200-ish ohm series resistor (less resistor = quicker charge at the expense of battery life). 4 2000mAh NiMH batteries would last a LOT longer than a 9v battery.

    But if you insist on a 9v battery, I'd hook it up to an unused A/D input thru a voltage divider consisting of 2 equal resistors. Get the A/D input working and displaying correctly, then turn on the 'change battery' light at about 6.5v. Anything below that and the regulator won't regulate (if you're using a 7805 type).

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    ok so i guess I will chucking those LM7805 out of th house...
    I have four 2300 nimh AA for my digital camera, guess I could use those for now, not need for voltage regulator right, just want to double check .
    but with this setup , how would I have a regulated voltage to compare the batteries voltage, , How would I implement my blinking led for low voltage ?

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    ok so i guess I will chucking those LM7805 out of th house...
    I have four 2300 nimh AA for my digital camera, guess I could use those for now, not need for voltage regulator right, just want to double check .
    but with this setup , how would I have a regulated voltage to compare the batteries voltage, , How would I implement my blinking led for low voltage ?
    What are the implications is the unit's power runs out? (might help to figure that bit out if I knew how badly the unit had to stay powered up).


    How about this? Use a 2.5v reference chip from Microchip, MCP1525. Use that as Vref+ for an A/D input on the PIC. Take your battery pack, put a v-divider on it, say 2:1 ratio, 10K & 10K, or whatever, pluck the signal off the middle of that, read that to an A/D channel, and presto...instant voltage reading...with some math of course.

    Ground on Vref-, 2.5v (from MCP1525) on Vref+.
    Batt+ to one side of 40K resistor, Batt- to one side of 10K resistor. Other 2 ends of resistor connected together and fed to A/D input (say AN0 for example).
    Do a read on AN0 A/D input. I forget what PIC you're using, but say it has a 10 bit A/D converter. That means that your 10 bit A/D converter would have a resolution (based on the 2.5v Vref+) of 2.44xxx mV. Since the voltage going into the converter is divided by 2, the real resolution of the total voltage across the battery is 4.8828125mV.
    If you're project doesn't drain much current, you could probably run it down to about 3.6v (.9v/cell). So, while reading the A/D, your reading is going down. When it hits 737 (737 x .0048828125 = 3.598v), turn on the low battery light. Actually, you'll probably want the light on sooner to give yourself some time to get them charged up. And the MCP1525 comes in TO-92 & SOT-23 packages. Easy to use.
    Last edited by skimask; - 31st December 2006 at 03:27.

  8. #8
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    my father cuts meat and has a cold room in the garage, This unit is wireless receiver that will give him the temperature. It is not crucial if there is a downtime to charge the battery, (or a downtime of a few hours if the compressot breaks down) but at least a warning that they are running low.

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    my father cuts meat and has a cold room in the garage, This unit is wireless receiver that will give him the temperature. It is not crucial if there is a downtime to charge the battery, (or a downtime of a few hours if the compressot breaks down) but at least a warning that they are running low.
    The transmitter is in the room and it's wireless/battery powered? And the receiver is elsewhere, plugged into the wall or something?

    Ya know for that matter, you could (and probably are but I'm not sure), transmit the transmitter's battery voltage along with temperature data to the receiver.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44
  4. Replies: 11
    Last Post: - 13th July 2005, 19:26
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts