Boron Low ADC Readings

boron
Tags: #<Tag:0x00007fe224768c08>

#6

Exactly. This should be the only connection to A2. The device should not even sit in a breadboard or some antistatic sponge or anything else.

Additionally, how are you powering the device (battery only, USB + battery, USB only)?


#7

Yup that’s how I have it. No breadboard. I was only powering it with USB. Let me add a Lipo that is charged and then test it.


#8

I’ve tried both USB and USB+LiPo and get 4095 in all cases with this code

SerialLogHandler serLog(LOG_LEVEL_WARN, {{"app", LOG_LEVEL_INFO}});

void setup() {
  Serial.begin(115200); //open serial console
  pinMode(D2, OUTPUT);
}

void loop() {
  int adc_value = 0;

  digitalWrite(D2, HIGH);
  delay(2000);
  adc_value = analogRead(A2);
  Log.info("ADC: %d", adc_value);
  delay(5000);
}

#9

so I have plugged in a LiPO and USB and it is still reading around 4030. I swapped out and tried another Boron and now get values around 4060?
0000051476 [app] INFO: ADC: 4070
0000058478 [app] INFO: ADC: 4060
0000065479 [app] INFO: ADC: 4062
0000072481 [app] INFO: ADC: 4062
0000079481 [app] INFO: ADC: 4057
0000086483 [app] INFO: ADC: 4060
0000093484 [app] INFO: ADC: 4057
0000100485 [app] INFO: ADC: 4061
0000107487 [app] INFO: ADC: 4059
0000114488 [app] INFO: ADC: 4058
0000121490 [app] INFO: ADC: 4060
0000128491 [app] INFO: ADC: 4057
0000135492 [app] INFO: ADC: 4062

Do I need to make some sort of adjustment to factor for this difference? The voltage coming into the pin is still 3.3V.


#10

That shouldn’t be required.
Have you tested with my code? I can’t make any of my Gen3 devices report anything but 4095 (occasionally 4094) with that code and a D2-A2 bridge :confused:


#11

Yep I am using your code. I have 3 Borons doing the same thing. BUT I tested the same setup and code on an Argon and it works fine, 4095. Its hard for me to believe I have 3 bad Borons?


#12

That is rather peculiar - maybe @marekparticle can take this one from here.

BTW, can you post a photo of your Boron setup?


#13

Here is a picture of the setup. The USB cable is going to my MacBook Pro.


#14

I see you have no antenna attached - if you have the cell module on you should not do that. These modules are not meant to be running without load on the output stage.


#15

I actually did not know that. I do have SYSTEM_MODE(SEMI_AUTOMATIC); at the top of my code. Does this change things?


#16

When the radio is not on (as in SEMI_AUTOMATIC) it shouldn’t matter.


#17

I’m seeing similar results with a Boron LTE that was shipped recently.
All tests with Cellular Antenna Connected, USB powered, and Li-Po connected.


// Using 3V3 Pin Bridge
0000013954 [app] INFO: ADC: 4079
0000018955 [app] INFO: ADC: 4075
0000023955 [app] INFO: ADC: 4081
0000028956 [app] INFO: ADC: 4082
0000033957 [app] INFO: ADC: 4078
0000038957 [app] INFO: ADC: 4085
0000043958 [app] INFO: ADC: 4083
0000048958 [app] INFO: ADC: 4081
0000053959 [app] INFO: ADC: 4079
0000058959 [app] INFO: ADC: 4079
0000063960 [app] INFO: ADC: 4081
0000068961 [app] INFO: ADC: 4078

// Using D2 Pin Bridge
0000035008 [app] INFO: ADC: 4081
0000040009 [app] INFO: ADC: 4088
0000045009 [app] INFO: ADC: 4079
0000050010 [app] INFO: ADC: 4082
0000055010 [app] INFO: ADC: 4074
0000060011 [app] INFO: ADC: 4071
0000065012 [app] INFO: ADC: 4087
0000070012 [app] INFO: ADC: 4085
0000075013 [app] INFO: ADC: 4079
0000080013 [app] INFO: ADC: 4081
0000085014 [app] INFO: ADC: 4076

#18

Huh? :flushed:

That’s something @marekparticle and @oddwires1 may want to chime in on - that seems rather wrong to me.


#19

Hi @Particle9 - sorry to be getting to you so late, had a break for the holiday weekend (thanks for the ping, @ScruffR). I can’t reproduce this on my own device, so it looks like something must be up hardware-wise. Would you mind creating a support ticket (support.particle.io) and we can determine whether or not a replacement is in order?


#20

@marekparticle, I’m reproducing this with “replacement” Boron’s that were recently shipped to me.
Note: This ADC error isn’t a concern for me personally, but I wanted you to be aware.
Do you have a Boron from a recent production run to try ?

I switched to A3 Pin, and disconnected the Li-Po during the test, no significant change:

// A3 to 3V3 Pin Bridge
0000014060 [app] INFO: ADC: 4088
0000019060 [app] INFO: ADC: 4079
0000024061 [app] INFO: ADC: 4088
0000029062 [app] INFO: ADC: 4079
0000034062 [app] INFO: ADC: 4077
// Disconnected the Li-Po, Boron was Re-Charging previously
0000039063 [app] INFO: ADC: 4075
0000044063 [app] INFO: ADC: 4078
0000049064 [app] INFO: ADC: 4088
0000054065 [app] INFO: ADC: 4082
0000059065 [app] INFO: ADC: 4074



#21

@rickkas7 - should we expect any variance from 4095 when analogRead()ing a pin grabbing 3.3V from itself?


#22

@marekparticle, the ADC reference is the 3.3v rail so measuring 3.3v on an analog pin should result in only a one bit error at most.


#23

@peekay123, understood. But, I’m struck by the fact that this has occurred on more than one Boron. I… must be missing something.


#24

@marekparticle, it is incredibly odd. It may be worth looking at the 3.3v rail to make sure it is clean. It might be worth testing with a known-clean external 3.3v source. You may also want to look at the boards for any manufacturing anomalies like excess flux, etc. My understanding is that all things being equal (DeviceOS, app), “older” Borons work fine but now these “new” ones. So software issues can most likely be eliminated.


#25

@Rftop - can you PM me device IDs so I can check mfg date?