Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Measuring voltage of supply while keeping power use low.

Status
Not open for further replies.

bigal_scorpio

Active Member
Hi to all,

Greetings to Eric and Nigel et al.

After an illness I'm finally back in the saddle and starting to get the itch to build things again.

At the moment I am trying to make a device that simply sits doing nothing most of the time and wakes up every few seconds and checks if a pin is high.

I was planning on using a pic12F629 at first until I decided I needed to check the voltage of the battery every now and then and raise an alarm if it is low, so I was then nudged towards the 12F683 with its analog capability.

I am wanting to run the device from a 2032 3v lithium cell so I need to keep the power usage as low as possible and keep the device asleep as much as poss.

My main puzzle is how is the best way to measure the battery voltage periodically and keep the power as low as possible.

Any ideas guys, all thoughts welcome and by the way I am using PicBasic Pro to write the code as I still can't get my head around assembly.

Thanks for looking.........Al
 
Have you looked at battery managment chips, made for laptops and cellphones and sutch?
 
Last edited:
Have you looked at battery managment chips, made for laptops and cellphones and sutch?

Hi mate,

I don't really want to use any more parts than I have to, basically trying to make a single chip design. Al
 
Some of the PICs can be put into sleep mode and awake on interrupt. Here is an example.
https://www.electro-tech-online.com/custompdfs/2011/10/00552e-1.pdf

Some power saving tips.
https://www.electro-tech-online.com/custompdfs/2011/10/01146B_chapter202-1.pdf

Hi Mike,
Thanks for the very interesting links! One of the tips in the power use is "TIP #20 Use LVD to Detect Low Battery"

And indeed I have located some 12F1822 or 12F1840 pics that have that feature. However I cannot find any reference to it in the datasheet, how to implement it or even its existence. So has anyone ever used it to detect battery low and if so how?

It seems that LVD would completely solve my problem if I could only discover how to use it.

Al
 
hi Al.
Anything suitable here.
**broken link removed**

Didnt you know you had been poorly.!

E
 

Attachments

  • 01267a.pdf
    259.9 KB · Views: 169
Last edited:
hi Al.
Anything suitable here.
**broken link removed**

Didnt you know you had been poorly.!

E

Hi Eric,

Had months of numbness, tingling and really bad pain in my right arm, had physio, painkillers and allsorts to no avail.

Then they discovered it is refered pain from my neck! Need an op to sort it but odds not too good on outcome, but at least now I know what is causing it I can control it better (have to keep my head bent forwards all the time) doh! Still pain but bearable until they op to replace bad disc between c5 and c6 (almost sounds like a bit of programming) hehe. Hope you are well.

Anyway as to what you sent, there is some C language stuff that refers to HLVD, is this the same as LVD which I am still trying to research to no avail?

As you know I am only just getting the hang of PicBasic pro and the C language has me baffled, but thankfully the example seems to be doing much more than I would be. I only need a low warning beep or something. What really puzzles me is the lack of ANY info on LVD in the 12F1822 datasheet, the single reference being that it should work in Real Ice and even that refers to LVDS, is that something different to LVD?

Getting more baffled by the minute.........Al
 
Then they discovered it is refered pain from my neck! Need an op to sort it but odds not too good on outcome, but at least now I know what is causing it I can control it better (have to keep my head bent forwards all the time) doh! Still pain but bearable until they op to replace bad disc between c5 and c6 (almost sounds like a bit of programming) hehe. l

Good luck with it - you probably don't want to know that as martial arts instructors we train students to strike the seventh cervical vertabra, as it's one of the 'killing points' on the body.

I know a number of people who have had similar operations, no idea which vertabra though?, but all have gone well.
 
Bigal!! I think LVD they are talking about is on the new XLP micros pic16lf18xx

Hi Ian,

I used the Microchip Advanced Part Selector and typed in prefix "12F" then in more options, system management I ticked LVD and it give me PIC12F1840 and 12F1822.
If I use prefix 16F it gives a range of chips from PIC16F1823 through 29.

Since the part selector is Microchips own I assumed it would be right, no mention of XLP. Puzzled!

Al
 
I have also gone through the datasheet for LVD.. It seems you can set up a comparator and a FVR to detect power levels and interrupt IF the level falls below.. there is an on board stepup convertor to do this...I wonder if that's what they are on about.

Sorry!! I should have mentioned the XLP is on the chip part no. (A logo floating above it)
 
Last edited:
Good luck with it - you probably don't want to know that as martial arts instructors we train students to strike the seventh cervical vertabra, as it's one of the 'killing points' on the body.

I know a number of people who have had similar operations, no idea which vertabra though?, but all have gone well.

Hello Nigel,

Thanks mate, I also know someone who had it and is OK now, its just that the specialist I saw said that the chance of total success is about 30% no difference is around 50% and only a small percentage are made worse!

Even then I immediately said I wanted the op. I am losing feeling in my fingers now and its getting worse all the time, so I just have to take the chance!

Al
 
Wow, C-5 damage could be serious. Hope all goes well. For your application an interrupt routine seems the way to go.
 
Status
Not open for further replies.
Back
Top