Author Topic: PIC24fj128ga010 Measure absolute voltage  (Read 3711 times)

0 Members and 1 Guest are viewing this topic.

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
PIC24fj128ga010 Measure absolute voltage
« on: September 06, 2016, 07:30:47 am »
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
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #1 on: September 06, 2016, 07:40:19 am »
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. 
« Last Edit: September 06, 2016, 08:17:21 am by 22swg »
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Online jaromir

  • Supporter
  • ****
  • Posts: 338
  • Country: sk
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #2 on: September 06, 2016, 08:43:32 am »
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.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
PIC24 Measure absolute voltage
« Reply #3 on: September 06, 2016, 09:57:22 am »
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 reference

What was I thinking!

Thanks for the replies.

 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #4 on: September 06, 2016, 11:09:56 am »
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. 
or just use the comparator + a voltage divider. triggers an interrupt when voltage is lower than the bandgap reference
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #5 on: September 06, 2016, 12:38:21 pm »
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
Just 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.
We Are The Watt - Resistance Is Futile!
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #6 on: September 06, 2016, 01:27:50 pm »
Just 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.
I 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.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #7 on: September 06, 2016, 01:33:47 pm »
or just use the comparator + a voltage divider. triggers an interrupt when voltage is lower than the bandgap reference
Due 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.
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #8 on: September 06, 2016, 04:00:43 pm »
Just 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.
I 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.
Linear 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.
We Are The Watt - Resistance Is Futile!
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #9 on: September 06, 2016, 09:18:45 pm »
Linear 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.
I'm a newbie so probably got this aspect wrong.  I was following the design at http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=MCP1640RD-4ABC which 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.
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #10 on: September 06, 2016, 10:02:34 pm »
Linear 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.
I'm a newbie so probably got this aspect wrong.  I was following the design at http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=MCP1640RD-4ABC which 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.
I 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.
We Are The Watt - Resistance Is Futile!
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: PIC24fj128ga010 Measure absolute voltage
« Reply #11 on: September 07, 2016, 12:07:41 pm »
PSOC 3 or 5LP has -

1) Onchip Vref
2) 20 bit DelSig A/D
3) Digital Filter Block to filter out noise, unwanted.....
4) DMA to run A/D and Filter in background
5) LCD support
6) OpAmps, Comparators, Muxes
7) Routable like FPGA
8) Free GUI based IDE and design tools
9) 12 bit SAR if you need fast A/D
10) Tons of logic components like LUT, gates, counters, PWM, SR, COM.....see attached
11) Drag and drop components with attached APIs prewritten


Regards, Dana.
« Last Edit: September 07, 2016, 12:11:04 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf