Question on StampCI Board
Hello All,
I have a problem with the Stamp CI Board.·· I have it interfaced with a DC Input Module on a Grayhill Relay Board using the 50 pin header. I am using a Javelin Stamp on the Board and the input is·Connected to Pin 1.·· When the input is high the javelin doesn't See it.··· I have checked the diagram and the documenation of the StampCI Board and it should work.·· The input's Logic is at 5v.· I don't think it is a bad input because i have 27 Different units and they all act the same.·· If anyone has any ideas on what i might be missing please let me know.
Thanks
I have a problem with the Stamp CI Board.·· I have it interfaced with a DC Input Module on a Grayhill Relay Board using the 50 pin header. I am using a Javelin Stamp on the Board and the input is·Connected to Pin 1.·· When the input is high the javelin doesn't See it.··· I have checked the diagram and the documenation of the StampCI Board and it should work.·· The input's Logic is at 5v.· I don't think it is a bad input because i have 27 Different units and they all act the same.·· If anyone has any ideas on what i might be missing please let me know.
Thanks
Comments
Sorry there - had code - deleted it by accident back again ..
import stamp.core.*;
public class Sample {
·static int val;
public static void main(){
val=0;
do{
if (CPU.readPin(CPU.pins[noparse][[/noparse]1])== true){
val = val +1;
// more code here ...
}
}while (true);
}
}
when input is received on pin 1 it increments 'val' -
Rgds,
······ Quattro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Post Edited (QuattroRS4) : 4/6/2007 7:41:12 PM GMT
Quattro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Post Edited (QuattroRS4) : 4/6/2007 10:22:49 PM GMT
CPU.readPin(CPU.pins) == false
Quattro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
· private static void checkpulse() {
··· if(CPU.readPin(CPU.pin0)==systemTypeBool) {
····· if(goahead) {
······· goahead=false;
······· // more code here
····· }
··· }
··· else {
····· if(goahead==false)
····· {
······· goahead=true;
·······//·more code here
····· }
··· }
· }
systemTypeBool is either true or false depending on the unit.· either way it still doesn't see the input.
The input module i am using is a Grayhill 70L-IDCNP DC Input.·· 10-32VDC/15-32Vac Input with 4.5 to 28V Logic
The board it is hooked up to is a Grayhill 70LRC8K·IO Board.
hope this sparks someone's·mind because i have been working on these for 3 weeks and can't figure it out.
then change the ==true to ==false and run again..
System.out.println(val);
I don't understand how you have the problem - if you bypassed the ULN2803 and it works - now that you know it inverts the signal as explained - reversing your 'if' conditions should give you the result.
Where you were expecting a 'true' now look for a 'false' and vise versa...that should do it ..
As I don't have a Javelin Stamp at hand or the mentioned circuit - I can only go by the specs. of a uln2803 ... and what you have said..
If this doesn't work Post a link to this problem in the Javelin Stamp forum - I am sure Peter Verkaik will sort out your code issues ..
Regards,
Quattro
EDIT
"I am sure Peter...." typo there - forgot the sure !!! - sorry Peter
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Post Edited (QuattroRS4) : 4/7/2007 12:30:53 PM GMT
The Stamp CI Board uses the ULN2803 to drive the outputs, but for inputs there are resistors that feed back from the output of the ULN2803 to the input for the BASIC Stamp to pick up. Because of this configuration the inputs won’t be inverted, but how they’re driven could explain why they’re not picked up. Also, are you setting your pins as inputs? If so you should be able to measure an input pin with a DMM/DVM to see if it is going high. Are you sure the module itself works?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
http://www.stampsinclass.com/dl/docs/prod/schem/stampci.pdf
Here is the uln2803 datasheet
http://www.tranzistoare.ro/datasheets/90/366828_DS.pdf
The uln2803 inputs have a 2.7k resistor to ground (via transistor base).
If the feedback is large (10k or so), applying 5V at an IO pin, will
give a maximum value of (2.7/12.7)*5 = 1.06V at a javelin pin, not enough for the javelin
to see it.
What is the feedback resistor value?
If the feedback is low (1k or so), applying 5V at an IO pin, will
give a value of (2.7/3.7)*5 = 3.65V, enough for the javelin to see it,
(javelin input treshold value is 2.5V) but then the uln2803 input is driven
which may result in·an additional path to ground via the collector of the uln2803 transistor.
It may even start oscillating.
Since the ci board·was designed for the basic stamp, and these have a treshold value
of 1.4V, the feedback resistor value may need to be changed to 2.7k to get 2.5V
at a javelin pin.
But this may lead to the result just pointed out.
Why not applying an input via the host parallel port (X1)?
regards peter
Thanks for the help guys.
1. Use a basic stamp.
2. Use a javelin and for the inputs use the host parallel port. (Preferred option I think).
3. Use a javelin and for inputs use the IO pins but disconnect the appropiate input and output pins
of the ULN2803 from its socket (if the ULN2803 is directly soldered into the board
you may need to cut these pins) but this only works if you do not use that input
also for·output. Basically, you leave only the feedback resistor between IO and
javelin pin.
regards peter