Nick, Please see section 2.4.4 of the Shimmer User manual, "Voltage and Power Measurement"
-Ben On Tue, Apr 24, 2012 at 8:19 PM, Nicholas Hosein <[email protected]> wrote: > My mistake. I enabled AnEX0/7 and now i get the values. Also i sent the > parameter 1 with the SET_PMUX_COMMAND. One question i do have is what is the > difference in VsenseBat an VsenseReg. My guess is i use the formula you gave > the link for in the FAQ to convert VsenseBatt to volts and then calculate > some kind of battery percentage from it. > > Thanks again, > > Nick > > > On Tue, Apr 24, 2012 at 4:12 PM, Nicholas Hosein <[email protected]> > wrote: >> >> Thanks mike that makes sense. As far as interfacing to ADC 0/7 I dont see >> anything in the READ_ME or the shimmer manual which explains how to use the >> SET_PMUX_COMMAND. From the BoilerPlaceC.nc code I can see that >> SET_PMUX_COMMAND needs one argument but it doesnt explain what this argument >> is. >> >> From my limited understanding it seems like after I set the PMUX the ADC >> 0/7 will have the battery voltage which will be sent over bluetooth in the >> same packet as the acc/gyr/mag. >> >> Also from the readme im assuming the packet will look like this: >> >> [PacketType | TimeStamp | BatteryMSB | Acc ... Mag | BatteryLSB] >> >> Or am i confusing the ADC number with channels? >> >> Much thanks, >> >> Nick >> Nick >> >> >> On Mon, Apr 23, 2012 at 12:42 AM, mike healy <[email protected]> wrote: >>> >>> Hi Nick, >>> >>> That is not correct. You cannot sample the AnEx (ADC0 and ADC7) channels >>> at the same time as the battery voltages and would need to be multiplexed. >>> The acceleration data is read on different ADC channels so they can be read >>> simultaneously with the battery data (or close enough). >>> >>> However, one thing to note is that there is some crosstalk between one of >>> the acceleration channels (z-axis) and one of the voltage measurements >>> (VSenseBatt). This can influence the battery reading by 5-6% on average and >>> up to 10% in extreme cases. >>> >>> There are a couple of ways of dealing with this crosstalk (but it's not >>> something I've had a chance to play around with myself): >>> 1. SW averaging (100 to 1000 counts) to the battery measurement as accel. >>> signals are quasi-periodic assuming the user isn't in an elevator or >>> vehicle. >>> 2. VSenseBatt - n * Zaccel = VSenseBatt_correct. The scaling factor (n) >>> would need to be determined experimentally. >>> >>> The other option would be to put the z-axis line into GIO output mode and >>> drive it low when you want to measure the battery voltage. >>> >>> The best solution for you is going to be very much dependent on your >>> application's specifics. >>> >>> Mike >>> >>> >>> >>> On Mon, Apr 23, 2012 at 7:05 AM, Nicholas Hosein <[email protected]> >>> wrote: >>>> >>>> Just to clarify. If the battery monitoring is enabled on the shimmer >>>> with the SET_PMUX_COMMAND and acceleration data is being collected >>>> simultaneously the resultant output should be garbage? In order to get the >>>> battery state while collecting data I need to modify the boiler plate app >>>> to >>>> multiplex the two signals. >>>> >>>> Best, >>>> >>>> Nick >>>> >>>> >>>> On Mon, Apr 16, 2012 at 1:07 AM, mike healy <[email protected]> >>>> wrote: >>>>> >>>>> Hi Nick, >>>>> >>>>> Enabling the voltage monitoring is available in >>>>> ShimmerConnect/BoilerPlate. When you got to Tools->Configure Shimmer you >>>>> will see an option that says "Enable Voltage monitoring". This will change >>>>> the "AnEx ADC0" and AnEx ADC7" channels to "VSenseReg" and "VSenseBatt" >>>>> respectively. Specifically the "SET_PMUX_COMMAND" in BoilerPlate manages >>>>> the >>>>> state of this mux: >>>>> http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/shimmer/apps/BoilerPlate/Shimmer.h?content-type=text%2Fplain >>>>> >>>>> The part that has not been implemented is to toggle this option quickly >>>>> in order to inter-space voltage monitoring with measuring the external ADC >>>>> channels, or any method to convert the difference between the two voltage >>>>> measurements to instantaneous current (as described in the manual). >>>>> >>>>> Mike >>>>> >>>>> >>>>> >>>>> On Sat, Apr 14, 2012 at 1:48 AM, Nicholas Hosein <[email protected]> >>>>> wrote: >>>>>> >>>>>> Does the boiler plate app have this implemented by chance? or does the >>>>>> shimmer connect software use something besides the boilerplate. >>>>>> >>>>>> Much Thanks, >>>>>> >>>>>> Nick >>>>>> >>>>>> >>>>>> On Fri, Apr 13, 2012 at 1:15 AM, mike healy <[email protected]> >>>>>> wrote: >>>>>>> >>>>>>> Hi Nick, >>>>>>> >>>>>>> The battery monitoring is multiplexed with the two ADC channels >>>>>>> exposed on the external connector (i.e. ADC0 and ADC7). So you cannot >>>>>>> sample >>>>>>> the battery voltages and these channels at the same time. But you can >>>>>>> switch >>>>>>> between the two of them quickly if required. >>>>>>> >>>>>>> See section 2.4.4. of the Shimmer User Manual for further details. >>>>>>> See the FAQ page to see how to convert the raw ADC value you receive >>>>>>> back to >>>>>>> battery voltage: http://www.shimmer-research.com/links/faqs#S9. >>>>>>> Remember to >>>>>>> double the value due to the halving of the voltage before it is >>>>>>> measured (as >>>>>>> mentioned in the referenced section in the manual). >>>>>>> >>>>>>> Mike >>>>>>> >>>>>>> On Wed, Apr 11, 2012 at 7:37 AM, Nicholas Hosein >>>>>>> <[email protected]> wrote: >>>>>>>> >>>>>>>> I noticed that the shimmer software can access the batter state on >>>>>>>> the mote. In my experience the battery monitor and data bus share the >>>>>>>> same >>>>>>>> bus so battery updates cannot be made while collecting data (I could be >>>>>>>> wrong about this though). Was there an update to the boiler plate app >>>>>>>> that >>>>>>>> allows battery monitoring (by percentage or voltage) in realtime while >>>>>>>> collecting data? >>>>>>>> >>>>>>>> Much Thanks, >>>>>>>> >>>>>>>> Nick >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Shimmer-users mailing list >>>>>>>> [email protected] >>>>>>>> https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > > > _______________________________________________ > Shimmer-users mailing list > [email protected] > https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users > _______________________________________________ Shimmer-users mailing list [email protected] https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
