I am transmitting data from ATTiny85 to ESP8266(NodeMCU v3). I am powering NodeMCU using USB cable. It works fine when I power up ATTiny using 5V.
However I'm planning to transfer my project to ESP32, which is not 5V tolerant. Therefore I have to run ATTiny at 3.3V (which is possible according to datasheet). However I'm not getting intended results when I'm using 3.3V power to ATTiny85. I'm getting some nonsense. Using level converters is one alternative but I like to know what I have done wrong.
To clarify, Only change I'm doing is powering ATTiny with 3.3V instead of 5V.
I have prepared the following demo to demonstrate my situation. Thanks in advance :)
I'm using Ardiono 1.8.10
NodeMCU core : 2.7.4
ATTiny85 is running using 8MHz internal oscillator.
NodeMCU code
char rx;
void setup()
{
Serial.begin(57600);
}
void loop()
{
if (Serial.available()){
rx=Serial.read();
Serial.print(rx);
}
}
ATTiny85 code
#include "SoftwareSerial.h"
SoftwareSerial Monitor(5, 4);
uint8_t x=0; //temp
uint8_t y=128; // ECG
void setup() {
Monitor.begin(57600);
}
void loop() {
Monitor.print("E"+String(int(y)));
Monitor.print("T"+String(int(x)));
x=x+1;
y=y-1;
delay(10);
}
Serial monitor od NodeMCU when ATTiny is running at 5V from Arduino UNO
T95E32T96E31T97E30T98E29T99E28T100E27T101E26T102E25T103E24T104
Screen-Shot 1
Serial monitor od NodeMCU when ATTiny is running at 3.3V from Arduino UNO
⸮qxt⸮q99⸮qx5⸮q9x⸮qx6⸮q97⸮qx7⸮q96⸮qxx⸮q95⸮qx9⸮q9t⸮q9`⸮q93⸮q9q⸮q9r⸮q9r⸮q9q⸮q93
Screen-Shot 2
Serial monitor od NodeMCU when ATTiny is running at 3.3V from ESP8266
3x⸮rtv⸮q37⸮rt7⸮qsv⸮rtx⸮qsu⸮rty⸮q3t⸮r5`⸮q3s⸮r5q⸮q3r⸮rur⸮q3q⸮r5s⸮q3`⸮r5t
Screen-Shot 3