Sensitivity picaxe voltage

AKil

Member
What is the sensitivity when the picaxe believes there is 1 when there are more than 4v? 3v or more?
 

AKil

Member
I have a CNY70 following line black when it black that is 4.2 and when is white that is 2.02v the input 4 is high and 2 its already high?
 

hippy

Ex-Staff (retired)
You have your electronics connected to VCC (6V..17V) and your motors connected to V+ (5V). That is probably not what you intended.

The PICAXE requires the inputs to be below 0V8 to read as low. You could try reducing the R5 and R6 from 100K to 10K to see if that helps.
 

Dippy

Moderator
Yes, and C1=100K ?

For input levels have a read of the MANUAL 1 Page 7 , section marked 'Inputs'.
This will give you the general idea, but really isn't precise enough over the usable voltage supply ranges.
It needs updating to show TTL and Schottky and voltage ranges.

For more accurate information you need to consult the actual PIC Data Sheet.

For TTL input on the 08M a 'high' detected on an Input will be at about:-
0.25 x Vdd + 0.8V. NB. Calculate with heirarchy i.e. (0.25 x Vdd) + 0.8V
So, at Vdd = 4V the Input pin will be detected as 'High' when the voltage at that pin exceeds 1.8V approx.
Slightly different to 0.8 x Vdd = 3.2V eh?

For TTL 'Low' at 4V the threshold is:
0.15 x Vdd
So, for 4V a 'Low' is detected when the voltage at that pin goes below 0.6V.
And NOT the 0.2 x Vdd as said in Manual.

You can work it out for 3V supply for yourself.

The Manual really only shows the Schottky Input thresholds.
Some brave soul should spend 10 (maybe 15) minutes modifying the entry.
It needs clarifying.

Hippy, get typing! :)

Alternatively use ADC.
 

hippy

Ex-Staff (retired)
For TTL input on the 08M a 'high' detected on an Input will be at about:-
0.25 x Vdd + 0.8V. NB. Calculate with heirarchy i.e. (0.25 x Vdd) + 0.8V
So, at Vdd = 4V the Input pin will be detected as 'High' when the voltage at that pin exceeds 1.8V approx.
Slightly different to 0.8 x Vdd = 3.2V eh?
The intention in the manual was not to say an input becomes high at any particular level but to indicate a level at which an input is guaranteed to be high.

The manual recommends that a voltage should be above 0.8 x Vdd to read high, which holds true in all cases regardless of Vdd or input type; all voltages above 0.8 x Vdd read as high.

The intent was to say the same for input low; a voltage below a stated level is guaranteed to be low regardless of Vdd or pin type, however, 0.2 used should have been 0.15 for a Schmitt input when Vdd is less than 4V5.

I'll suggest the 0.2 is changed to 0.15 and also check how these statements are affected by the new 3V parts.
 

Dippy

Moderator
Haha, I agree; nothing wrong with playing safe. Nice defence :)

BUT, it can backfire and/or confuse. Maybe it has here?
Saying it'll definitely be HIGH at (e.g.) 4V is fine and true - but hey wait a mo (says the Newby) it's giving HIGH at 3.5V.... what's going on? The Manual says....post question .. wait 2 days for solution....

The ONLY answer is an accurate summary.

You did a summary yourself fairly recently. And even that could be cut-down.
Why couldn't that occupy 1 single additonal page in a Manual?
And it would be oh so useful - especially for those who don't want to wrestle with 100s of Microchip pages.

Is it really that difficult?
Open - Cut - paste -edit - -check - save - convert to pdf - upload.
About 20 minutes?

Actually, call it a 'morning' as you would have to mark the chip outline drawings too, to show Schottky and TTL. S and T.

Personally, I can't see a problem with accuracy and clarity . Is there one?
 

hippy

Ex-Staff (retired)
I don't see a problem with what there is, no different to saying "it is recommended that the plane is travelling at least X mph before pulling the stick back to lift-off", thus, it is not recommended to attempt lift-off below X mph, it may be successful, but it may not be in all circumstances.

This is on page 7 of Manual 1, the fourth page of the introductory text and in an "at a glance" section. The statements there are correct ( accepting 0.2 should be 0.15 ) and more complicated text is likely to add confusion rather than reduce it.

What voltages are needed to ensure an input is guaranteed to be read high or low is a separate, and much simpler, issue to what is read when a particular voltage is applied to an input. Even Microchip datasheets do not definitively state what will happen for all voltages which may be applied to TTL input pins.

It may be that additional information is added to one of the manuals - and suggestions are always welcome - but as said before, the processes believed to be required, how easy or difficult things are imagined to be, does not take account of the internal processes which exist for making changes nor other factors which need to be taken into account.
 
Last edited:

Dippy

Moderator
Good idea SS, but it would seem that adding a page to a pdf is as difficult as a hip replacement.

I don't think the aircraft analogy quite holds up there, me old hipster. I think it struggled to take off ;)

Yes, it will certainly 'take off' at 0.8 x Vdd for St and TTL.
However, the Hippy Airways TTL-star will 'take off' at a relativley slower speed. People may wonder why. They may question their calculations or, indeed, their sanity. They may waste hours/days checking and posting.

For anyone vaguely interested, the 12F683 Data Sheet, for example, says a 'High' is >2.0V input for TTL input @Vdd=4.5 to 5.5V.

So, if you designed your threshold circuit based on 0.8 x Vdd you will be miles out!
Your plane will have taken off ages ago.

Or if you are wondering why a 3V digital o/p can 'talk' to some PICAXE i/p pins (@ 5V) and not others then you will have to post a question and wait hours for the answer.

Indeed, based on the Manual, a 3V or 3V3 digital device O/P can NEVER talk to a PICAXE I/P (@ Vdd=5V) and that's plain cobblers.

Never mind. Let's move on as I can see an allergic reaction brewing.




Bottom line to EVERYONE:-
If you want more precise electrical figures then cross-reference your PICAXE pin allocation against the actual Microchip PIC Data Sheet pinout and look it up for yourself.
 
Top