Go Down

Topic: attiny85 serial monitor (Read 1 time) previous topic - next topic

hilukasz

I have the monitor working well and everything but some oddities are happening when I try external power. I seem to be able to get readings on serial monitor in IDE when I have it plugged into 3.3v on ardiuno board, but when I try 3v battery (CR2032) it doesn't seem to want to read serial, all I do is disconnect the power and plug in the battery instead, so Tx is still connected to arduino and obviously still connected to USB.

does it need a certain voltage for serial? attiny85 specs say it's rated 2.7 V ~ 5.5 V so I am a bit confused.
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

cjdelphi

I did the same thing except i used a 4.2v Lithium Battery (2.6amp/h).

Got nothing, while using Softserial, as soon as i moved to a regulated 5v in (not a slowly dropping voltage curve from an unregulated battery supply)

My solution this problem.

Use a 5v regulator from a a couple of batteries in series to produce around 7v, then drop the voltage down, you'll find your chip springs to life, these chips really don't like anything but a regulated source.

billroy

There is a limit on the operating clock speed based on VCC.  Higher speeds are not possible at lower voltages.  There's a chart in the datasheet, I believe.

Anyway, it's possible you experimentally determined the limit.  I'd be curious to know what speed are you running the '85.

-br

strykeroz

Like billroy, I'm only speculating but I'm not sure VCC versus clock speed will be it.  My power source of choice for ATTiny85 projects is a single CR2032 and I've never had an issue with them operating at 8MHz (I always burn that speed too).  Though to be fair, I'm not doing serial comms in anything I'm referring to here.

Perhaps it's worth consulting the data sheet to see also what voltage the ATTiny is producing for a HIGH signal at 3V.  You might just find you've gone below where the Uno reads a HIGH, so your serial comms have become a stream of zeroes to the receiving side.

Cheers ! Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Erni

#4
Dec 22, 2012, 02:45 pm Last Edit: Dec 22, 2012, 03:04 pm by Erni Reason: 1
I just tryed:

Attiny85v @8mHz
TinyDebugSerial  at 9600
A  (fresh) CR2032
No problem with Serial.print() in serial monitor

And with SoftwareSerial
Same result, I am able to communicate with the tiny both ways

I am using these Fuses (BOD disabled)

L: E2 H: D7 E: FF

cjdelphi

My issues started when I was using SoftSeriial to com/k with a bluetooth modual @ on atiny85 9600bps @5v - no problem..  I'll try it myself again sometime with a 4.2v lithium and  Zener Diode to clamp it say 3vo.3lts (I don't expect the battery to dip below 3v without it being entirely drained) and repeat the process

hilukasz


There is a limit on the operating clock speed based on VCC.  Higher speeds are not possible at lower voltages.  There's a chart in the datasheet, I believe.

Anyway, it's possible you experimentally determined the limit.  I'd be curious to know what speed are you running the '85.

-br



running at lowest speed (I think?) you can run serial, maybe the only speed...? I have only tried 8Mhz. I did a little post on how I got it to work the other day: http://hellowoo.com/hardware/serial-monitor-with-attiny85-and-arduino/
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

hilukasz


Like billroy, I'm only speculating but I'm not sure VCC versus clock speed will be it.  My power source of choice for ATTiny85 projects is a single CR2032 and I've never had an issue with them operating at 8MHz (I always burn that speed too).  Though to be fair, I'm not doing serial comms in anything I'm referring to here.

Perhaps it's worth consulting the data sheet to see also what voltage the ATTiny is producing for a HIGH signal at 3V.  You might just find you've gone below where the Uno reads a HIGH, so your serial comms have become a stream of zeroes to the receiving side.

Cheers ! Geoff


I have no problems running the chip, it really only has to do with serial output. I've gotten it to even output "PWN" (software on a few pins) on 5 pins, so it seems like it's pushing it hard. But I will check out the datasheet, I didn't think to check if it's outputting enough power for HIGH on arduino.
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

hilukasz


I just tryed:

Attiny85v @8mHz
TinyDebugSerial  at 9600
A  (fresh) CR2032
No problem with Serial.print() in serial monitor

And with SoftwareSerial
Same result, I am able to communicate with the tiny both ways

I am using these Fuses (BOD disabled)

L: E2 H: D7 E: FF


Interesting. I will look into this as well and post what result I get. thanks.
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

fungus

The speed of the internal oscillator varies with voltage. Use a lower baud rate to compensate.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

hilukasz


The speed of the internal oscillator varies with voltage. Use a lower baud rate to compensate.




seems I'm running at lowest possible (9600):

Code: [Select]
In member function 'void TinyDebugSerial::begin(long int)',
    inlined from 'void setup()' at rose.cpp:19:
/Users/lukasz/Documents/Arduino/hardware/tiny/cores/tiny/TinyDebugSerial.h:694: error: call to 'TinyDebugSerialBadBaud' declared with attribute error: Serial (TinyDebugSerial) supports three baud rates: 9600, 38400, or 115200.
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

strykeroz


I have no problems running the chip, it really only has to do with serial output. I've gotten it to even output "PWN" (software on a few pins) on 5 pins, so it seems like it's pushing it hard. But I will check out the datasheet, I didn't think to check if it's outputting enough power for HIGH on arduino.
My suggestion could be a complete red herring, but easy to eliminate by running a sketch that just flips your TX line in a loop and looping with a digitalread at the Uno end.  Will try it tonight myself to eliminate that possibility if you don't get a win first.

I make up these handy 1" square protoboards with a CR2032 holder, socketed ATTiny85, decoupling cap and all the legs broken out to headers...so likely have one of those that's not on Xmas lights duty to check this ;)

Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Go Up