PIC24fj128ga010 Measure absolute voltage - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 06, 2016, 07:30:47 am
content: Hi,I am considering using PIC24fj128ga010 in my non-profit Weigh Scale app (basically I'm pimping my bathroom scale).The device looks good, it has 2 op amps, a reasonable A/D and the LCD driver I need. It has USB as a bonus.However, I hoped to use it in a mode that powers it from a charged capacitor whilst in sleep, occasionally waking up when the voltage falls to near minimum to charge up the capacitor again. I would also really like to be able to measure battery condition too to give a change the battery warning.I was happily designing the circuit when I came across the fact that this device does not appear to have a voltage reference! I'm used to 16F PIC and almost all of these always have some kind of band-gap.Any suggestions on how I can measure absolute voltage using this device?Thanks in advance,Nivag

author: 22swg
author_rank: Frequent Contributor
timestamp: September 06, 2016, 07:40:19 am
content: Do you need to measure voltage while PIC in sleep mode. is AD active during sleep ? , Interrupts will wake PIC24 from sleep, so use the RTCC alarm interrupt to wake periodically whatever is required to keep power going.

author: jaromir
author_rank: Unknown
timestamp: September 06, 2016, 08:43:32 am
content: PIC24FJ128GA010 has no USB. It is fairly old device.If you'd use something more recent, like PIC24FJ128GB610, you could find USB as well internal bandgap reference, for approximately the same price. It should be pin compatible with PIC24FJ128GA010.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 06, 2016, 09:57:22 am
content: Apologies. I think I might have temporarily lost my marbles with this thread.PIC24fj128ga010 doesn't even have LCD driver... I must have got my part numbers scrambled.So after some reflection PIC24FJ128GC006 seems like the job and this does have an internal referenceWhat was I thinking!Thanks for the replies.

author: JPortici
author_rank: Super Contributor
timestamp: September 06, 2016, 11:09:56 am
content: Quote from: 22swg on September 06, 2016, 07:40:19 amor just use the comparator + a voltage divider. triggers an interrupt when voltage is lower than the bandgap reference

author: tatus1969
author_rank: Super Contributor
timestamp: September 06, 2016, 12:38:21 pm
content: Quote from: NivagSwerdna on September 06, 2016, 07:30:47 amJust wondering why you would want to have a supply (ultra?)cap inbetween, if your device always seem to have the capability to recharge that from another source. Why don't use that other source permanently? That would surely improve energy efficiency.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 06, 2016, 01:27:50 pm
content: Quote from: tatus1969 on September 06, 2016, 12:38:21 pmI had premised my design on the basis of working from a single AA primary cell so I would need some boost to keep alive , I could top-up every now and again to keep the level >2V to stop the PIC browning out. When measuring I need the bridge to be as excited as possible hence pumping up to 3v3 for that period.I guess that if I could find a power source >2V then I could just connect direct during sleep.My power budget comprises driving the bridge and LCD during measurement and transmitting via RFM69 once done. I'm guessing the radio is going to be the driving factor for consumption.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 06, 2016, 01:33:47 pm
content: Quote from: JPortici on September 06, 2016, 11:09:56 amDue to brain fade I was looking at a device without a FVR. Now I am recovered I found the pic24fj128gC010 which does have an internal reference.I note that this device consumes an incremental 15uA when running the HLVD so even with this I might deep sleep and intermittently wake up to check rather than waking for a HLVD interrupt. I haven't used a device with an explicit HLVD before... this will be fun.

author: tatus1969
author_rank: Super Contributor
timestamp: September 06, 2016, 04:00:43 pm
content: Quote from: NivagSwerdna on September 06, 2016, 01:27:50 pmLinear tech has boost converters with 10uA quiescent current and burst mode. Eg LTC3539. If your solution can go below that number then it could outperform that, otherwise I doubt that you get off better with your two stage design. Leakage of electrolytic caps can be in the range of 5uA, gold caps much worse.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 06, 2016, 09:18:45 pm
content: Quote from: tatus1969 on September 06, 2016, 04:00:43 pmI'm a newbie so probably got this aspect wrong. I was following the design athttp://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=MCP1640RD-4ABCwhich seemed pretty interesting. I planned to use a tantalum at the output, so probably less leakage than an electrolytic but considerable all the same (and there is loss through the feedback divider too)Maybe that part of the design needs more thought. Thanks for the LTC3539 reference, I'll check that part out.

author: tatus1969
author_rank: Super Contributor
timestamp: September 06, 2016, 10:02:34 pm
content: Quote from: NivagSwerdna on September 06, 2016, 09:18:45 pmI did a quick check with LTSpice on the LTC3539. With 1uA load @ 3.3V, it trickle charges a 10u output capacitor every 50ms and draws ~30uA from a 1.5V cell. Although I don't like relying on software for a holdup circuit like this (I would use an extra circuit), the technique described in the app note is superior to this with its stated ~10uA. You will need to use a ceramic output cap to use its full potential, as their leakage is negligible.

author: danadak
author_rank: Super Contributor
timestamp: September 07, 2016, 12:07:41 pm
content: PSOC 3 or 5LP has -1) Onchip Vref2) 20 bit DelSig A/D3) Digital Filter Block to filter out noise, unwanted.....4) DMA to run A/D and Filter in background5) LCD support6) OpAmps, Comparators, Muxes7) Routable like FPGAFree GUI based IDE and design tools9) 12 bit SAR if you need fast A/D10) Tons of logic components like LUT, gates, counters, PWM, SR, COM.....see attached11) Drag and drop components with attached APIs prewrittenRegards, Dana.