Here is , I guess what I am going to do. I am going to take EVERYTHING apart, even if it is soldered. Then I will put back ONLY the components that are compatible and I will hook them to different pins. I will choose the pins that are in the programs. For instance, I won't put the SD card in unless I can find different pins with everything else working. I could sure use another Propeller protoboard because my wife has made it Clear NO MORE MONEY on this project. So, here I am. I have to work with what I have. If I hook EVERYTHING up according to the schematic in each program, then when I run the stupid program, IT SHOULD WORK! I hope. Then I will take one at a time and add accessories. Right now, I have had all ports filled up and needed three extra pins that I did not have. It is silly to have an 8 clog cpu with only 15 I/O pins available and only 64k or both ram and EEPROM. Why can't they just put 256meg or 1-3 gig or whatever. Sorry, I am a little bit depressed right now. I will update you gentlemen when I learn more if that happens.
The question comes up. Where do I connect the 4 lines to the SD card. If I do the way it was in the tutorial that came with the SparkFun Electronics, I would hook them to P0,P1,P2, and P3. But, that would make the other stuff not work. The Propeller code says that P3,P5 and P7 have to hook to a 100 ohm resistor and then to an LED and to ground.
BoeBasic says pins 0,1,2,3.
FemtoBasic says 8,9,10 and 11.
May I use more than pins 0-15??? because all the pins higher are reserved for VGA, Keyboard, Mouse, EEProm Clock and serial I/O.
Also, when do I change the jumper block from +5 voltsDC to 3.3V??
I am sorry to ask so many questions. But I have read ALL of the documentation I could download and get my hands on. I have studied the codes and I have tried to learn before asking.
I really don't know what to do next. I am stumped!
Maybe you need some "hands-on" help to get you past the rough spots. Do you know any computer or electrical engineering types in your area? Where are you located?
When I ran the heartbeat object, I tried to vary the beat by changing the numbers. It worked as written , but any fluctuation from the orginal code would not light the LED up at all.
said...
This seems odd behavior. Please try to simplify by removing ALL code except for the heartbeat code. Simplify everything possible, and try to concentrate on just getting the heartbeat code to work.
Hang in there. One step at a time. Explain to your wife what is going on and that you are trying to isolate the problem. Deep breaths...
You need to take things one step at a time and make sure you understand what you're doing at each step. If you look at the various tutorials for the Stamps and the Propeller, that's how they work.
You could start with the SD card. BoeBotBasic was done as a modification of FemtoBasic to support a Propeller-based BoeBot, so you should start with that. Only FemtoBasic supports the PS/2 keyboard and the VGA display, but you need to get your "bot" hardware working. You can always load FemtoBasic to experiment with the keyboard and display, but you're not going to get any kind of mobility with a VGA cable attached to the Protoboard.
If you're not using the VGA display or the keyboard or mouse, you can use those I/O pins for other things. Worry about that later.
Learn how to use the SD card. If you're going to store Spin/Assembly programs on SD card files, you'll need to format the SD card with 32K clusters. I don't remember the Windows format command, but others have described it, probably Rokicki. The SD card program loader requires that the entire program reside in consecutive sectors. If you initialize the card with a smaller cluster size than 32K, it's possible for the program to be loaded to be scattered in non-sequential order around the card and the program load will fail. There are ways around this by pre-allocating files, but it's awkward. Don't just try one test to see if the SD card works, learn how to use it. BoeBotBasic essentially calls Rokicki's library routines and any program that you write yourself would likely do the same thing.
Next step would be to get the servos working. You will need to power them from Vin which should be 7.5V or less. You are not going to power anything other than the Propeller and the IR emitters (maybe the Heartbeat) from 3.3V. The PING))) and the IR detectors require 5V. You don't want to power the servos from 5V. They can draw a lot of current and, since there are 3 of them, the 5V regulator can be overloaded. If you're using rechargable batteries, you should be using 5 cells to get a 6V supply. There's a description of this in the thread on my Propeller BoeBot in the Completed Projects forum. Use the servo statements in BoeBotBasic to make sure they work properly.
Next step would be to get either the IR distance sensing or the PING))) to work. BoeBotBasic only allows for one IR detector. Pick one and get it to work properly with the BoeBotBasic statements. Change the connection to the other one, then get that to work. Worry about getting both to work later.
At that point, you should be able to write Basic programs to do simple navigation and you should be certain that most of the hardware works. At that point, you could start trying to duplicate the same functionality writing your own Spin program.
I kind of figured you were in the south or the mid-west. I grew up in Alabama and recognize your efforts to be a good God fearing person. (I moved to California with the Navy.) Surely there are some engineering types in Nashville who might be interested in helping out; ask around at church.
Meanwhile ... do you have a list of your planned device connections? Pin-out is what we normally call it. Most code can be changed to work with the pins you want to use.
Your current approach of starting small and taking baby steps is a good process for anything new or not well understood. The world is made of blocks; make your blocks work and add to them. If you add something new and one of your old blocks breaks, then at least you have an idea of what happened. Being able to analyze things in pieces or flows is a valuable skill.
Thank You guys sooo much. I am going to a Family Reunion early Sat. A.M. When I return, about 6pm, I will start working on doing what you all have suggested. God Bless you All.
From BoeBotBasic:
leftSrv = 0 ' Left wheel servo
rightSrv = 1 ' Right wheel servo
pingSrv = 2 ' PING bracket servo
irDetect = 3 ' IR Detector pin (via 1K series resistor)
irEmit = 4 ' IR LED Emitter pin (two each via 100 ohm resistor)
pingData = 5 ' PING control pin (via 1K series resistor)
xBeeRx = 6 ' xBee serial port receive pin (Martin's xBee protoboard)
xBeeTx = 7 ' xBee serial port transmit pin
bootTx = 30 ' Boot serial port transmit pin
bootRx = 31 ' Boot serial port receive pin
bootTx and bootRx can't be changed because they're just the I/O pins used for the built-in bootloader and connected to the PropPlug connector.
xBeeTx and xBeeRx aren't needed because you don't have an xBee connected there. BoeBotBasic is pre-compiled twice, once using bootTx/bootRx for the "console" and once using xBeeTx/xBeeRx for the "console", that's all. There's a call at the beginning of the program to initialize FullDuplexSerial and that's the only place where the "console" I/O pins are specified.
BoeBotBasic doesn't know or care whether USB or a direct serial connection is used for the "console".
BoeBotBasic blindly tries to initialize the compass. There's no checking, so if there's no compass (or I/O Expander chip), there's no problem. If you don't try to use the compass, it's otherwise ignored.
"what is my next step?" --- Please reread my previous message. I outlined a sequence of steps. Ask questions if you don't understand them, propose something different for discussion, or try them.
A 4GB SD card will not work. FAT16, which is the file system format used by the Propeller SD card routines, only works up to 2GB.
Thank You, Mike. I will get an SD 2 Gig card. Also I do not have an I/O Expander, or whatever you called it. Thanks for all of your help. I am going to my family reunion now. It will be about 7pm my time when I get back. When I get back, I will make all of the changes to the hardware and software and let you know how it worked.
when you get the ready prompt, does anything happen if you type
srvleft = 2500
then hit return ?·( assuming the servo is hooked up )
that should run your servo one way or the other... Statements SRVLEFT {[noparse][[/noparse] <expr> ]} = <expr>
SRVRIGHT {[noparse][[/noparse] <expr> ]} = <expr>
SRVPING {[noparse][[/noparse] <expr> ]} = <expr>
Send a pulse stream to the specified servo with a width (in us) given by the
expression on the right side of the assignment. If a square bracketed
expression is provided, this is the number of pulses to send (at 20ms intervals).
If no pulse count is provided, the pulse train continues indefinitely. If either the
pulse count is zero or the pulse width is zero, the pulse train will stop. The
pulse width must lie between 500us and 2500us.
pardon me if you've already done this.... it looks interesting, now i will have to try it myself.
i will be using the computer serial so my console and keyboard will be attached to the computer.
i'm not sure about compiling...... last time i was playing with the prop we were just figuring out how it worked.
dan
Well, I finally got back from the family reunion. I sure would've like to had another protoboard. I am a computer technician and I can solder really well. It was a beautiful job, but it just did not work. So, I took EVERYRTHING apart and redid the whole thing changing all of the ports to match the boebot basic. I went out and purchased an SD card and hooked it all up and . . . . .
The thing acted pretty much the same as it did before runing boebot basic. I decided to run an object called servo4. The robot came to life and went around in circles. But, that was it. No ping stuff and just the motors turned. So, I am going to test basic stuff like you all told me. I figured since it was wire exactly like it was supposed to be, it would accept boebot basic and do the stuff as I anticipated. But, I guess the motors turning oposite directions at least is something happening after all of the time and hard work.
If what you have is BoeBotBasic, you can't type "FOR I=1 TO 100 PRINT I, NEXT I" and have it work beautifully. That's not a valid BoeBotBasic statement. What program are you running on the PC? What program are you running on the BoeBot?
You should have used the Propeller Tool to download BoeBotBasicPP.binary to your Propeller Protoboard's EEPROM. This is the pre-compiled binary form of the BoeBotBasic interpreter that's part of the archive that you should have downloaded from the Propeller Object Exchange.
Post Edited (Mike Green) : 8/24/2008 4:09:42 AM GMT
After church , I am going to play with it some more.· I realize that it is hard to "FIX" a problem without actually putting your hands on it. I understand. I am starting to believe the ports may have been blown or something.
Please follow my suggestions: Take small steps. Try one thing at a time. Make sure that thing works completely as expected before moving on to the next thing. Communicate well. Describe what steps you've done and what happened at each step. If something happens that you don't expect, stop. Check that other related things are as they should be (like power supply voltages). Check your wiring at that point even if you've checked it before, particularly that part associated with the item not working as expected. Try a simpler test if possible.
Maybe you have "blown" the I/O ports. Maybe you haven't. They're actually pretty robust for some kinds of abuse (current draw), but still pretty sensitive to other kinds of abuse (gross over voltage at significant current). Don't make unsupported assumptions. Using BoeBotBasic, it's very easy to test the I/O ports since they're individually accessible (see the documentation for details).
OK, Mike. I have begun my tests. I checked every port with an ohm meter to insure that they were in fact getting continuity. I made sure that the ports were as per software.
The first test that I have done is the Heartbeat monitor. It was the easiest to do. It passed the test very well. Now I will move on the the servos.
I guess I kinda went full circle. I am back where I started. I load up boebotbasic and run it after changing the ports. Then It just sits there and grunts on the right motor for a split second.· I then loaded femtobasic v2.004. It say READY. When I type in the command SRVLEFT=2500 and hit return, nothing happens. Except a Syntecs Error.·So I make a program
FemtoBasic does not have the BoeBot statements. Only BoeBotBasic has them. If you read the documentation included with FemtoBasic or BoeBotBasic (or DongleBasic), there are sections that describe the specific capabilities of each version.
BoeBotBasic does not use the PS/2 keyboard or the VGA or TV display. It uses either the programming serial port or an xBee Series 1 transceiver connected as described. You can use Propeller Serial Terminal (www.parallax.com/tabid/442/Default.aspx) as a terminal on your PC with the programming serial port.
It's possible to make a version of BoeBotBasic that uses the PS/2 keyboard and TV display, but the VGA drivers take too much memory for the screen buffer for that to be practical. The best way to do a free-roaming BoeBot is to use xBee even though that requires another xBee transceiver on the PC end (along with a USB to serial adapter for the xBee).
Post Edited (Mike Green) : 8/24/2008 10:56:37 PM GMT
OK, I have checked all the voltages going in and on the pins of the jumper block. When jumpered to the 5 volt side, I get exactly 5vdc. When the jumper is on the other side, I get 6 volts dc. The center pin of the 5 volt regulator is exactly 5vdc. The center pin of the 3.3volt regulator is exactly 3.3 volts. Everything else looks good.
can I simply hook up my usb to the board? that is how I have been programming it. I cannot afford to spend any more money, my wife is on my case. I have about $350 in this so far. I guess from what you are saying, I have to do the program, compile it and send it out to the protoboard instead of running from the READY prompt. I noticed that I did not get any terminal with Propeller terminal program.
Assuming that you're using the servo headers ... did you happen to install the 3 pin header & jumper near the big capacitor? Regardless, what is the voltage on the center row of the servo headers? Do you have an o-scope? If you were using spin, you could try Paul Baker's dscope that runs on propeller to check waveforms. Did you ask around for a little help near your home?
1) Yes, you hook up the USB adapter just like you would for downloading a program to the Protoboard. Instead of running the Propeller Tool, you run the Propeller Serial Terminal or any other terminal emulator you have (like HyperTerm if you have it).
2) You're not really doing the Basic program on the PC. You're just using the PC as a keyboard and display. The program is entered directly into the Propeller, partially compiled there and interpreted there when you type RUN. You can save the program to the EEPROM or to an SD card file. When you have an SD card, you can also move the SD card to your PC and write the program there using a PC text editor saving it as a text file to the SD card since the Basic interpreter reads ordinary text files from SD cards.
I do not see propeller serial terminal in the object exchange.· ??
and Steve, the voltage on the center row is 6vdc and 5volts dc depending on were I have the jumper block set. The voltage on the bus is 5vdc and 3.3vdc.
Can you use the propeller for this O'scope without further attachments. I used to have two 15mhz and 30mhz scopes and 1 100mhz scope. But this was eons ago. The 100mhz was a little tiny portable dual trace scope.
I hope that I am not asking too many questions.
Thanks for you guy's help. I am as anxious as you guys to get this behind me.
Comments
Thank You for all of your help and kind words.
Over and out!
BoeBasic says pins 0,1,2,3.
FemtoBasic says 8,9,10 and 11.
May I use more than pins 0-15??? because all the pins higher are reserved for VGA, Keyboard, Mouse, EEProm Clock and serial I/O.
Also, when do I change the jumper block from +5 voltsDC to 3.3V??
I am sorry to ask so many questions. But I have read ALL of the documentation I could download and get my hands on. I have studied the codes and I have tried to learn before asking.
I really don't know what to do next. I am stumped!
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
You could start with the SD card. BoeBotBasic was done as a modification of FemtoBasic to support a Propeller-based BoeBot, so you should start with that. Only FemtoBasic supports the PS/2 keyboard and the VGA display, but you need to get your "bot" hardware working. You can always load FemtoBasic to experiment with the keyboard and display, but you're not going to get any kind of mobility with a VGA cable attached to the Protoboard.
If you're not using the VGA display or the keyboard or mouse, you can use those I/O pins for other things. Worry about that later.
Learn how to use the SD card. If you're going to store Spin/Assembly programs on SD card files, you'll need to format the SD card with 32K clusters. I don't remember the Windows format command, but others have described it, probably Rokicki. The SD card program loader requires that the entire program reside in consecutive sectors. If you initialize the card with a smaller cluster size than 32K, it's possible for the program to be loaded to be scattered in non-sequential order around the card and the program load will fail. There are ways around this by pre-allocating files, but it's awkward. Don't just try one test to see if the SD card works, learn how to use it. BoeBotBasic essentially calls Rokicki's library routines and any program that you write yourself would likely do the same thing.
Next step would be to get the servos working. You will need to power them from Vin which should be 7.5V or less. You are not going to power anything other than the Propeller and the IR emitters (maybe the Heartbeat) from 3.3V. The PING))) and the IR detectors require 5V. You don't want to power the servos from 5V. They can draw a lot of current and, since there are 3 of them, the 5V regulator can be overloaded. If you're using rechargable batteries, you should be using 5 cells to get a 6V supply. There's a description of this in the thread on my Propeller BoeBot in the Completed Projects forum. Use the servo statements in BoeBotBasic to make sure they work properly.
Next step would be to get either the IR distance sensing or the PING))) to work. BoeBotBasic only allows for one IR detector. Pick one and get it to work properly with the BoeBotBasic statements. Change the connection to the other one, then get that to work. Worry about getting both to work later.
At that point, you should be able to write Basic programs to do simple navigation and you should be certain that most of the hardware works. At that point, you could start trying to duplicate the same functionality writing your own Spin program.
Meanwhile ... do you have a list of your planned device connections? Pin-out is what we normally call it. Most code can be changed to work with the pins you want to use.
Your current approach of starting small and taking baby steps is a good process for anything new or not well understood. The world is made of blocks; make your blocks work and add to them. If you add something new and one of your old blocks breaks, then at least you have an idea of what happened. Being able to analyze things in pieces or flows is a valuable skill.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Pi Guy
Pin Assignments:
0. Left Wheel Servo
1. Right Wheel Servo
2. PING Servo
3. IR Detect
4. IR EMIT
5. PING DATA
6. X-BEE
7. X-BEE
8. SD –D0
9. SD - CLOCK
10. SD - DI
11. SD -CS
12. bootTX
13. bootRX
The only thing different with my setup now is:
I use USB instead of Serial.
I do not have an XBEE.
I do not have a compas.
How is this going to change the way I run this program? what is my next step besides Rewiring everything to match the ports?
leftSrv = 0 ' Left wheel servo
rightSrv = 1 ' Right wheel servo
pingSrv = 2 ' PING bracket servo
irDetect = 3 ' IR Detector pin (via 1K series resistor)
irEmit = 4 ' IR LED Emitter pin (two each via 100 ohm resistor)
pingData = 5 ' PING control pin (via 1K series resistor)
xBeeRx = 6 ' xBee serial port receive pin (Martin's xBee protoboard)
xBeeTx = 7 ' xBee serial port transmit pin
bootTx = 30 ' Boot serial port transmit pin
bootRx = 31 ' Boot serial port receive pin
From BB_definitions:
spiDO = 8
spiClk = 9
spiDI = 10
spiCS = 11
bootTx and bootRx can't be changed because they're just the I/O pins used for the built-in bootloader and connected to the PropPlug connector.
xBeeTx and xBeeRx aren't needed because you don't have an xBee connected there. BoeBotBasic is pre-compiled twice, once using bootTx/bootRx for the "console" and once using xBeeTx/xBeeRx for the "console", that's all. There's a call at the beginning of the program to initialize FullDuplexSerial and that's the only place where the "console" I/O pins are specified.
BoeBotBasic doesn't know or care whether USB or a direct serial connection is used for the "console".
BoeBotBasic blindly tries to initialize the compass. There's no checking, so if there's no compass (or I/O Expander chip), there's no problem. If you don't try to use the compass, it's otherwise ignored.
"what is my next step?" --- Please reread my previous message. I outlined a sequence of steps. Ask questions if you don't understand them, propose something different for discussion, or try them.
A 4GB SD card will not work. FAT16, which is the file system format used by the Propeller SD card routines, only works up to 2GB.
This thread discusses formatting SD cards: http://forums.parallax.com/showthread.php?p=742969
Post Edited (Mike Green) : 8/23/2008 2:11:28 PM GMT
srvleft = 2500
then hit return ?·( assuming the servo is hooked up )
that should run your servo one way or the other...
Statements
SRVLEFT {[noparse][[/noparse] <expr> ]} = <expr>
SRVRIGHT {[noparse][[/noparse] <expr> ]} = <expr>
SRVPING {[noparse][[/noparse] <expr> ]} = <expr>
Send a pulse stream to the specified servo with a width (in us) given by the
expression on the right side of the assignment. If a square bracketed
expression is provided, this is the number of pulses to send (at 20ms intervals).
If no pulse count is provided, the pulse train continues indefinitely. If either the
pulse count is zero or the pulse width is zero, the pulse train will stop. The
pulse width must lie between 500us and 2500us.
pardon me if you've already done this.... it looks interesting, now i will have to try it myself.
i will be using the computer serial so my console and keyboard will be attached to the computer.
i'm not sure about compiling...... last time i was playing with the prop we were just figuring out how it worked.
dan
The thing acted pretty much the same as it did before runing boebot basic. I decided to run an object called servo4. The robot came to life and went around in circles. But, that was it. No ping stuff and just the motors turned. So, I am going to test basic stuff like you all told me. I figured since it was wire exactly like it was supposed to be, it would accept boebot basic and do the stuff as I anticipated. But, I guess the motors turning oposite directions at least is something happening after all of the time and hard work.
I will keep you informed.
I can type FOR I=1 TO 100 PRINT I, NEXT I
and it will work beautifully. But, when I typed in what you said to type, it came back with syntax error.
sorry.
You should have used the Propeller Tool to download BoeBotBasicPP.binary to your Propeller Protoboard's EEPROM. This is the pre-compiled binary form of the BoeBotBasic interpreter that's part of the archive that you should have downloaded from the Propeller Object Exchange.
Post Edited (Mike Green) : 8/24/2008 4:09:42 AM GMT
10 for I=1 to 100
20 Print I,
30 Next I
40 END
RUN
But, I was just trying to show you that the BASIC worked.
I did download BoeBot Basic and ran the compiled version after changing all of the ports around. Thanks for your reply.
I
Maybe you have "blown" the I/O ports. Maybe you haven't. They're actually pretty robust for some kinds of abuse (current draw), but still pretty sensitive to other kinds of abuse (gross over voltage at significant current). Don't make unsupported assumptions. Using BoeBotBasic, it's very easy to test the I/O ports since they're individually accessible (see the documentation for details).
The first test that I have done is the Heartbeat monitor. It was the easiest to do. It passed the test very well. Now I will move on the the servos.
10 SRVLEFT=2500
RUN
it comes back Syntec Error.
???
BoeBotBasic does not use the PS/2 keyboard or the VGA or TV display. It uses either the programming serial port or an xBee Series 1 transceiver connected as described. You can use Propeller Serial Terminal (www.parallax.com/tabid/442/Default.aspx) as a terminal on your PC with the programming serial port.
It's possible to make a version of BoeBotBasic that uses the PS/2 keyboard and TV display, but the VGA drivers take too much memory for the screen buffer for that to be practical. The best way to do a free-roaming BoeBot is to use xBee even though that requires another xBee transceiver on the PC end (along with a USB to serial adapter for the xBee).
Post Edited (Mike Green) : 8/24/2008 10:56:37 PM GMT
but, no soap.
:-(
Shucks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
2) You're not really doing the Basic program on the PC. You're just using the PC as a keyboard and display. The program is entered directly into the Propeller, partially compiled there and interpreted there when you type RUN. You can save the program to the EEPROM or to an SD card file. When you have an SD card, you can also move the SD card to your PC and write the program there using a PC text editor saving it as a text file to the SD card since the Basic interpreter reads ordinary text files from SD cards.
and Steve, the voltage on the center row is 6vdc and 5volts dc depending on were I have the jumper block set. The voltage on the bus is 5vdc and 3.3vdc.
Can you use the propeller for this O'scope without further attachments. I used to have two 15mhz and 30mhz scopes and 1 100mhz scope. But this was eons ago. The 100mhz was a little tiny portable dual trace scope.
I hope that I am not asking too many questions.
Thanks for you guy's help. I am as anxious as you guys to get this behind me.
I have made another test. It is called servo4 in the object exchange. I tested and ran the two drive motors. The program worked fine.
Earlier , one of the programs that I ran PINGed the PING unit. It did not do the servo for it, but I could see the little green light flickering.
So, That leaves the servo on the ping to be tested.
But, now to put them all together.
I am trying to give you the information as it happens.
Thanks,
:-)