# Electron TX Input\_PULLUP

**URL:** <https://community.particle.io/t/electron-tx-input-pullup/41236>\
**Category:** Firmware\
**Created:** [April 18, 2018, 8:15pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236 "2018-04-18T20:15:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [April 18, 2018, 8:15pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/1 "2018-04-18T20:15:39Z")

</div>

I am trying to pull the TX pin on the Electron but it only pulls it up to 1volt or so. Other pins pull up to close to 3.3volts.

Does anyone know if this is a known issue for the TX pin?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 18, 2018, 8:17pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/2 "2018-04-18T20:17:00Z")

</div>

How are you trying to do it and are you using `Serial1.begin()`?

---

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [April 18, 2018, 8:18pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/3 "2018-04-18T20:18:32Z")

</div>

Im not using Serial1.

pinMode(TX, INPUT\_PULLUP);

As a side note, im using pinMode(RX, INPUT\_PULLUP); and the RX pin pulls up to around 3.3v

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [April 18, 2018, 9:22pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/4 "2018-04-18T21:22:02Z")

</div>

That’s really weird. I was able to reproduce this on an Electron but not a Photon. Both running 0.7.0 and running this code:

```cpp
#include "Particle.h"

void setup() {
	Serial.begin(9600);
	pinMode(TX, INPUT_PULLUP);
	pinMode(RX, INPUT_PULLUP);
}

void loop() {
}

```

RX is near 3.3V on both devices.

Electron TX is around 1V.  
Photon TX is around 3.3V.

Weird!

---

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [April 18, 2018, 9:34pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/5 "2018-04-18T21:34:22Z")

</div>

Thanks for verifiing! This then appears to be a software of hardware bug or a limitation to this pin.

I am wonder if this could also correlate to excess power consumption during sleep. I’ve been having troubles getting my e0 down under 1mA. Maybe this could be causing something. Just a thought.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [April 18, 2018, 9:42pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/6 "2018-04-18T21:42:27Z")

</div>

The most common problem for getting into really low power modes is the weird edge cases where you can fail to go into SLEEP\_MODE\_DEEP. This post explains what works and what doesn't:

> [@Electron SLEEP\_MODE\_DEEP tips and examples](https://community.particle.io/t/electron-sleep-mode-deep-tips-and-examples/27823):
>
> It’s a little confusing getting an Electron to go into deep sleep, using the 130 µA that it should. These six annotated code examples should hopefully clear things up. All tests were run on 0.6.0 on a Electron G350. AUTOMATIC, no system thread #include "Particle.h" void setup() { } void loop() { // Results in 133 uA power consumption // Modem is turned off, full cellular resync after restart (blinking green, blinking cyan, fast blinking cyan), 5-6K of data usage System.sleep(SLEEP\_MODE\_DE…

Also, you may know this already, but it's really tricky to measure sleep mode currents with an inexpensive DMM. This explains why and how to work around it:

> <https://github.com/rickkas7/particle_notes/tree/master/measuring-electron-power>
>
> //github.com/rickkas7/particle\_notes/tree/master/measuring-electron-power

---

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [April 18, 2018, 9:47pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/7 "2018-04-18T21:47:20Z")

</div>

I'll move my comments to this thread about the battery and sleep.

> [@\[solved - beta electron issue\] SLEEP\_MODE\_DEEP but still using 2,7mA while it should be 0,13mA](https://community.particle.io/t/solved-beta-electron-issue-sleep-mode-deep-but-still-using-2-7ma-while-it-should-be-0-13ma/24277/56):
>
> We need to get this worked up into the Wiring API, but you can get a return value from the cellular HAL. You may not always be able to use the following code, but it should work right now (as of 0.7.0 & 0.8.0-rc.3). Note: these will also block with SYSTEM\_THREAD(ENABLED), which might be a good thing wink if (cellular\_on(NULL) != 0) { Log.error("Could not turn cellular modem on!"); } if (cellular\_off(NULL) != 0) { Log.error("Could not turn cellular modem off!"); }

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 19, 2018, 3:28am UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/8 "2018-04-19T03:28:07Z")

</div>

Could you try calling `Serial1.end()` before setting `pinMode()`?  
Maybe `Serial1` gets enabled by “accident” along with enabling the serial interface used for the radio module.

---

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [April 19, 2018, 4:23pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/9 "2018-04-19T16:23:20Z")

</div>

> [@rickkas7](#):
>
> pinMode(RX, INPUT\_PULLUP);

I just tried the below code and the TX voltage still measures at 1.13V

```cpp
#include "application.h"

SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
  Serial1.end();
  pinMode(TX, INPUT_PULLUP);
  pinMode(RX, INPUT_PULLUP);
  Cellular.on();
  delay(3000);
  Cellular.off();
  delay(2000);
  System.sleep(SLEEP_MODE_DEEP, 20);
}

void loop() {

}

```

---

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [August 22, 2018, 5:45pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/10 "2018-08-22T17:45:30Z")

</div>

Hi @rickkas7 can you try to confrim this on a P1 too. I am only getting 1v on the P1 too.

---

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [August 22, 2018, 6:24pm UTC](https://community.particle.io/t/electron-tx-input-pullup/41236/11 "2018-08-22T18:24:50Z")

</div>

As a hack and since I have a small (1000pF) capacitor and mechanical switch on the line, the below code functions.

pinMode(TX, OUTPUT);  
digitalWrite(TX, HIGH); //Charges the capacitor to 3.3v  
pinMode(TX, INPUT\_PULLUP); //changes pin to input to read  
digitalRead(TX);
