Upgrating my Boe-Bot to propeller
jvrproductions
Posts: 61
Hello all thanks for reading and sorry for my english.... I am upgrating my boe-bot with a propeller quickstart... what its happening is that i created a 5 volt regulator to connect all the servos, lcd, etc (it's not connected to the quickstart) and went the program start the ping work perfect for about 5 sec and after that just go down (off no reading). I notice that if i conect the 5 volt - from my volt regulator to the - on the quickstart the ping work perfect but if there are not - conection just work for about 5 sec. Why this happen?
Thanks.
Jose
Thanks.
Jose
Comments
I like your idea of using a QuickStart on your Boe-Bot.
You mentioned you have a 5 Volt regulator. You want to make sure the grounds of all electrical systems are connected (it usually best it there is just on point where the grounds are connected).
How are you powering your QuickStart board when you have this problem? You should be able to use 5V from your regulator and connect it to the QuickStart's Vin pin (pin "40") and power the QS with 5V.
You want to use a resistor between the Ping's signal line and the QuickStart. I usually use a 10K Ohm resistor but 3.3K Ohm would also work. The 5V signal from the Ping can damage the Propeller without a resistor.
If you are still having trouble, a sketch (or a photograph) of your setup would help us figure out your problem.
1- I am using one 7805 +5 Volt regulator. The regulator its rate to up to 1 Amp. it's conected to one 12 VDC 500mA. So far if i provide power to the 4 line parallax lcd, one ping and one servo for the ping (+ plus the quickstart) all work fine. but if i start using the two servos for the tires the regulator start heating a lot. It's normal?
2- i am using the "Servo32v7.spin" object. I want two be available to control the object from two diferent PUB's one pub its working on the ping and the servo for the ping (One cog) and the second Pub at this point it's just running the 2 tire servos. The problem is that went i start using the tires, the ping servo work different (Stop and go). I was thinking that its a power problem but if i put the tires code on the same put that the ping servo work all work fine
sensor code:
testing tire servos
thanks for any help
The "1 Amp" rating of the regulator means it can supply 1 Amp but only if you can get rid of the heat. I believe a 7805 just dumps the power from the voltage drop (about 7V in this case) as heat. So if you're using 500ma of current, the regulator needs to get rid of 3.5 Watts of heat.
You have a few options to fix the problem. One option is to use a better heat sink (maybe even a fan). Another option (better) is to use a lower voltage source. Six NiMH AA batteries would give about 7.2 Volts lowering the power given off as heat to 1.1 Watts. Another (best) would be to use a more efficeint regulator. Switching regulator don't don't just dump the extra voltage as heat but they cost more. I've used these in a bunch of my projects. The main problem I've had from the switching regultors is radio interference.
My first guess is the servos are drawing too much current as they start to move and might be resetting the Prop (this happens to me a lot). One thing I've done when using servos with my QuickStart board was to add a 1000uF capacitor across Vin and Vss. This has helped me a lot.
In general servos need to be refreshed 50 times a second. I don't know if it would help much, but I'm adding a few lines to your code. It should at least save a little bit of power since the Prop can put some of its cogs in a low power state (but only for very short periods of time).
Add three global variables.
I'm doing the same thing with the wheel servos.
I'm not sure if Servo32v7 would update the servos more than 50 times a second without the waits or not but I personally think it's a good idea to only update the servo positions at 50Hz.
The above wait examples are covered on page 220 of the Prop Manual v1.2.
If you're not sure a loop will be less than 20ms (1/50 s) you could do this.
If you're still having trouble with your program, it would really help if you posted the entire program. Don't worry about changing variable names to English.
You can use the "archive" feature under the "file" menu to include all the objects in your program.
(Something strange is happening with the forum software, it wont let me fix the small formatting errors.)
this it's my robot so far.....
I have a Boe-Bot chassis that's not doing anything. I think I'll add a QuickStart board to it. I really like this idea.
Thanks for posting the picture.
Check out this pic:
It has a jack for the battery power cable, a 5V regulator, and servo headers...
Merlin just plugs into the Quickstart, no soldering required...
ratronic
i create the following code to set-up the limit for the ping with the qs button but some times work and others do not work.. I thinks it's my code..
I've tried to gather some of the programs for the QuickStart board in this thread.
I also have a servo tester program that uses the touchpads as inputs.
Some programs that seem to read the touchpads reliably for one person don't always work for another person. I think the climate and one's skin moisture can affect how well the pads will respond to being touched.
uhhh thanks Duane i will check your thread and try otherwise i will try with push button.....
Thanks.
Edit(4/26/20): Addington made a demo program using these techniques. The demo is a good place to start using touch pads.
In the servo tester program, I use the object "TouchButtons111029a" to sense when a pad had been touched.
To use this object you need a long and array of eight bytes in your variable section.
You also need the object listed in the OBJ section.
Near the beginning of your program you'll need to define "delay" and start the Buttons method.
Once these sections of code have been added, you can test if a button has been pressed like this (assuming you want to check if pad #0 has been touched):
If the pad isn't being touched it will equal 0.
You can always write a small test program to make sure the pads are being read correctly.
I just found a small example program I had previously written that uses the QS's touchpads to select portions of code to run. It's attached to post #4 here. It uses the same touchpad object as the servo tester program.
Duane i was starting to put my push button. I did try your first post and did work perfect (Your demo) but i did not understand the code. Now with your new explanation it's working perfect.
will be alive soon... (I hope)....
Thanks
Very good. I'm glad it's working.
I really liked your video. Super cool! Thanks for posting it.
It looks like the QuickStart's touchpads are working okay for you. Good.
I don't have time tonight to help with your array question but I'll ask a couple of questions for clarification.
Do you want to find the smallest number in an array of 66 elements ("slots")? If so, this wont be hard. If someone hasn't helped you by tomorrow, I'll help with some suggestions.
You might want to look at the modification I made to the Scribbler 2. I had it look for the farthest distances. The program might to too complicated to find where this comparison happens though.
It looks like you doing great so far.
Don't worry about your English. I'm sure it's better than my Spanish.
Adios,
I called the program "arraySearch.spin". I pre-loaded the array by using the DAT section.
The program waits three seconds to give you a chance to open a terminal window. The program then waits for a key press from the terminal window before continuing.
I highlighted in red the main logic parts of the code. Most of the code is just to display the data.
Here's the output fro the above program.
This next version uses a generic search method. This program is named "arraySearchBetter.spin". It has the same waits as the first program.
And here's the output.
It shouldn't be hard to change the size of the array to 66 elements. You'll also need to fill the array with data from the Ping sensor.
If you want to search for the largest element, I'd suggest changing these parts. (Assuming all numbers are positive.)
Instead of:
Use:
Then start the comparisons one element earlier.
Instead of:
Use:
How many elements are in the array "mide"? Do you have this in your variable section?
I don't know if you need longs or not. Words might be okay.
If you have 66 elements you want your repeat loop to end with 65.
Since you're looking for the smallest element, you need to set "shortestRange" to a number you know isn't smaller than the smallest element.
You could either set it equal to a large number or, as I did, just set it equal to the first element of he array.
What if shortestRange equalled zero before starting the loop and none of the elements equaled zero? You'd end up with shortestRange still equalling zero at the end of the loop (which wouldn't give you the correct answer).
Since we start counting with zero instead of one, the last element of 66 elements is element 65.
When I first started programming, I thought it was a dumb idea to start counting with zero. After I had been programming for a while, I learned that it was a good idea and made math using memory locations a lot easier.
Now what i don't understood at all is how to know how much stack i need to assign to each new cog. I know that it's base on how big its that part of the program but are there any way to check how much memory one cog it's using?
Thanks..
I usually stick with longs unless there's a good reason to use a word or a byte.
I think there are some operations that only work correctly with longs (such as bit rotation).
There is an object call "Stack Length" in the Propeller Tool's library folder. It's used to see how much stack space the cogs are using. Honestly, I've never used it. I usually use 100 long if I think there's a lot going on in a cog or 32 longs if the cog is running a simple method.
Most of my projects don't come close to using all of the Prop's RAM so I just leave the stack larger than I think it needs to be.