TTGO T-Deer

Another topic makes me nervous: J40
For me it seems that this jumper decides how the ATMEGA328P is being powered.
Let’s assume i want to connect the whole board via J37 to a CP2102 based USB 2 Serial board with 5Volts. Then the whole board get’s powered via USB. If J40 is set to 3V3 the CP2102 would output 5V levels on RXD/TXT but the ATMEGA328P would be powered with 3V3. Is this still working?
Otherwise if i set J40 to 5V, how do the periferals like W25Q32FVSS or HPD13A behave?

This is the chip factory default, to ensure it will be programmable at almost any voltage…
On an Arduino it will typically be flipped so that the avr runs at the clock frequency

Mmmmh… I always use my FTDI at 3.3v…

Right… These are powered in 3v3, but get 5V logic level from the Arduino – that doesn’t sound right to me either…

So only 3.3v would make sense, but then why 16Mhz :roll_eyes:

So, FTDI and CP2102 are all on 3.3V, no need to care about the level…
But then the jumper J40 is completely useless…

Regarding the 16MHz i would say: simply change Arduino to prescale by 2 and result finally in 8MHz.

1 Like

Just ordered 6 to have a play with, has anyone else actually got one tested yet?

Ordered yesterday a bunch…

Wait and see :grinning:

For the time being I stick to @Charles Mini-Lora nodes – I have more than enough parts for my current needs :nerd_face:

But still curious to see these can get power under control…

1 Like

While waiting for the board i start creating a suitable bootloader. The 16MHz are not what i want to have in bad battery conditions. So I want to modify to run optiboot on 2MHz (CKDIV8 fuse)
The main program shall switch the Clock Division Factor back to 2 to run finally on 8MHz.

2 Likes


Sorry for my bad English
When I connect the Pro mini_LORA to a TTL, messages are immediately output to the Serial Monitor. There is obviously a demo sketch. Unfortunately, this assignment of RX / TX can not play a new sketch. I have not succeeded with ISP either. Does anyone have the part to run?

  • do you have a problem with the TTGO T-Deer as mentioned in the topic title ?

Pro mini_LORA 20180926 TTGO 868/915
as shown above.

ok, as I understand you can not upload another sketch.

maybe there is someone that speaks German and can help you … please use PM the forum is english only sorry

I can help in german :wink:

1 Like

Have new insights. With the antenna connected, errors occur during writing and also when reading the flash memory. (When using ISP). The factory demo prevents the proper writing of the flash memory. After removing the antenna and connecting an Accus 3.7V, the description of the flash memory works.
I know, not good English.:wink:

Mine have arrived, will take a look tomorrow

That SPI flash module isn’t going to like getting 5V on its IO pins, assuming the board is jumpered to apply 5V to the mega328. I couldn’t find a datasheet on the specific LoRa module to see if its IO pins were 5V tolerant. Can’t imagine why the designer put a 16MHz oscillator and the ability to fry the flash module by installing a jumper. The 8MHz internal oscillator is probably accurate enough to run the LoRa stack without burning up power with an external oscillator module. As others have said, you can’t “legally” run the mega328 on 3.3V at 16MHz. The deal breaker for me is using PB0/D8 to operate the CS line of the flash module, that’s the input capture pin I love to use for super accurate timing, and it can’t be remapped. It might be interesting to see how low you can get the sleep current though.

I use Atmel ICE. Set the jumper to 5 V. Remove the antenna and supply the board with 5 V external power. After I transfer the Lora Sketch, I remove the external power supply. And connect a 3.7V battery. And put the jumper on 3V. Now the Loramodul sends.
The gateway is at a comfortable distance of 10 meters. In sleep mode I use 4.5 mA. When sending 10 mA.
Before I send the first time, sleep mode uses only 2.5 mA. After the first send the sleep mode goes to 4.5 mA. Maybe I’m doing something wrong in the source code. I will investigate this evening.
I’m also unsure if I should remove the red LED.

After removing the red LED. 3.6 mA sleep mode, 9.5 mA during transmission.
With LMIC_shutdown(); 1.1 mA sleep mode.

So, my order was delivered by today. I will start playing around on the weekend.
I think the 5V is defenitely not really good - 3.3V with the matching CP2102 adapter should work.

Mine arrived yesterday and all but worked out of the box, no errors on uploads either.

Using VS/Platformio, set to 5v on usb converter (3v did give errors at the end of uploading code but it did still work), disconnect any battery, make sure lora device is set to 3.3.v - as most ppl have said this is important. Connect DIO1 to D5, DIO2 not needed.

// Pin mapping

const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 5, LMIC_UNUSED_PIN},
};

PlatformIO/ libraries uses too:-

[env:atmega328pb]
platform = atmelavr
board = pro16MHzatmega328
framework = arduino
upload_speed = 115200
monitor_speed = 9600  
board_build.mcu = atmega328p

lib_deps =
;    https://github.com/matthijskooijman/arduino-lmic
     MCCI LoRaWAN LMIC library
     https://github.com/rocketscream/Low-Power
     https://github.com/sparkfun/SparkFun_HTU21D_Breakout_Arduino_Library
     https://github.com/enjoyneering/BH1750FVI
     https://github.com/LowPowerLab/SFE_BMP180

Don’t ask me about current usage, don’t have kit to measure on battery only. Sleep is working but because there are two leds on, plus the charger circuit too my USB current tester is mostly useless.

I’ve never burt a new bootloader so re the 16mhz/8mhz issue, I’m looking to others for guidance on this :slight_smile:

I still think they are a nice cheap device, wants to drop to 8mhz, remove leds, then it need to be tested re current on battery only.

Red led always on when powered up.
Blue led always on when 5v applied, even with no battery, assume once change complete it drops off.

PS clean upload log below

Linking .pioenvs\atmega328pb\firmware.elf
Checking size .pioenvs\atmega328pb\firmware.elf
Building .pioenvs\atmega328pb\firmware.hex
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [========  ]  77.4% (used 1586 bytes from 2048 bytes)
PROGRAM: [========  ]  83.2% (used 25572 bytes from 30720 bytes)
Configuring upload protocol...
AVAILABLE: arduino
CURRENT: upload_protocol = arduino
Looking for upload port...
Auto-detected: COM12
Uploading .pioenvs\atmega328pb\firmware.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file ".pioenvs\atmega328pb\firmware.hex"
avrdude: writing flash (25572 bytes):
Writing | ################################################## | 100% 9.59s
avrdude: 25572 bytes of flash written
avrdude: verifying flash memory against .pioenvs\atmega328pb\firmware.hex:
avrdude: load data flash data from input file .pioenvs\atmega328pb\firmware.hex:
avrdude: input file .pioenvs\atmega328pb\firmware.hex contains 25572 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 8.59s

avrdude: verifying …
avrdude: 25572 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you.

1 Like

So, you set the jumper to 5V for upload?
Any other connections (than the mentioned DIO1)?