Pages: [1]   Go Down
Author Topic: attiny85 serial monitor  (Read 1209 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 3
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Offline Offline
Edison Member
*
Karma: 29
Posts: 2367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1121
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1058
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 22, 2012, 09:04:43 am by Erni » Logged

Offline Offline
Edison Member
*
Karma: 29
Posts: 2367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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/
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Offline Offline
Full Member
***
Karma: 3
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Offline Offline
Full Member
***
Karma: 3
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 144
Posts: 5358
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

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

Offline Offline
Full Member
***
Karma: 3
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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.
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1121
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink

Geoff
Logged

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

Pages: [1]   Go Up
Jump to: