|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||||
|
|||||
|
ohh man using 2 gyros would be great....
Just like Dave said, sensing your angular position and the ramp would rule. I think we actualy have a very similar setup to what alot of teams used, using the gyro to sense turning. Its very useful and nice once we got it working. We looked into alot of the stuff in future active and digikey and couldn't come up with anything else that could be used other then the gyro other then maybe like some of the compass type stuff but that seems like it would be dificult. |
|
#17
|
|||
|
|||
|
instead of 2 gyros we use tilt sensors
![]() sneses x and y axis |
|
#18
|
|||||
|
|||||
|
all a gyro is is a tilt sensor...
|
|
#19
|
|||||
|
|||||
|
We bought a 2-axis inclinometer (tilt sensor) from Digikey. We wrote a routine on the EDUbot that automatically went straight up the ramp. Unfortunately, the sensor (not the routine) was incredibly slow so it was useless on the actual robot.
|
|
#20
|
|||
|
|||
|
Can anyone either send me or point me to a program that I can load onto a BasicStamp processor so that it detects the gyro and controls a motor? Also, is there any difference between this year's and last year's gyroscope programming?
Thanks! -Admiral Paddon Last edited by Al Skierkiewicz : 22-01-2015 at 08:47. Reason: Poster requested. |
|
#21
|
||||
|
||||
|
Admiral: Are you asking about using a gyro with a regular stamp or with the robot controller? There's a huge difference with respect to the hardware interfacing...
|
|
#22
|
|||
|
|||
|
BasicStamp processor, not the robot controller. SOrry if there was confusion.
|
|
#23
|
||||
|
||||
|
Here's what I would try to do:
I would make a RC (resistor-capacitor) circuit that is charged by the voltage output from the gyro and read into the stamp with the "rctime" command. If you consult the parallax documentation, this information shouldn't be too hard to find. |
|
#24
|
||||
|
||||
|
doesnt the basic stamp have an analog input channel (ADC input) ?
if not, I wouldnt bother with it - get a MicroChip PIC chip, with an ADC and you can program it in assembly or C. |
|
#25
|
|||
|
|||
|
need an ADC
You will need an ADC. PICs are great, but there is an upfront investment in equipment. If you already have a Stamp then you can buy an inexpensive ADC to do the conversion for you.
A suitable part is the ADC0831 8-bit serial analog-to-digital converter. This is the part used by Parallax in their examples. Get an 8-pin socket and solder it straight to the Stamp carrier board. The converted value is passed into the Stamp using synchronous serial communications. The code below will read the converted value: Code:
'This code is for the ADC0831 serial 8-bit ADC 'constants defining which Stamp pins are connected to the ADC ADC_CS CON 0 'CS on the ADC (pin 1) ADC_CLK CON 1 'CLK on the ADC (pin 7) ADC_D0 CON 2 'D0 on the ADC (pin 6) 'variable holding converted analog value ADCVal VAR BYTE '************************************************ ' SUBROUTINE: GetADCVal ' PURPOSE: Shift in the value from the ADC ' connected to the ADC_CS, ADC_CLK, ' and ADC_D0 pins on the stamp. ' OUTPUT: Sets the value of variable ADCVal ' REF: Based on code from Parallax, Inc. '************************************************ GetADCVal: 'pulse the chip select line to start conv. HIGH ADC_CS LOW ADC_CS 'bring the clock line low, then send one 'pulse to wake up the ADC and make it 'ready to shift out LOW ADC_CLK PULSOUT ADC_CLK, 210 'shift in data, most significant bit first SHIFTIN ADC_D0, ADC_CLK, MSBPOST, [ADCVal\8] RETURN |
|
#26
|
|||
|
|||
|
Quote:
Sorry for being such a newb. |
|
#27
|
|||
|
|||
|
I have 2-state relays. Could I use the output voltage of the gyro to operate those? They work on 5V, on/off. Voltage going through, connection. No voltage, no connection.
|
|
#28
|
|||
|
|||
|
Umm, can anyone help? I'd really like to get this done. Thanks!
|
|
#29
|
||||
|
||||
|
Quote:
The gyro outputs an analog voltage, from 0-5VDC. When it's not moving (CW or CCW around the axis of rotation), it outputs 2.5VDC (as far as I know), which is equivalent to 127, when converted to an 8bit value. Now, depending on the thresholds of your relays, and if they use hysteresis, this would cause the relays to switch on when the gyro is under rotation, and off when it is standing still... But the states that the relays would be in are dependant on their thresholds. I have no idea what the application of this kind of system would be, off-hand. If you could explain some sort of project goal, it'd be a lot easier to help you. |
|
#30
|
||||
|
||||
|
If you're still interested in it, you can do this relatively easily with a plain old basic stamp, a resistor, and a capacitor... I could help you out if you are still wanting to do it.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming Compatition | Angela06 | Programming | 30 | 08-04-2005 23:12 |
| Hooking up Controller to computer for programming. | Dragon45 | General Forum | 3 | 30-01-2003 00:22 |
| Pneumatics electrical wiring and programming | archiver | 2001 | 1 | 23-06-2002 23:10 |
| Error found in programming for the pump and pressure switch | sjharobotics | Programming | 4 | 06-02-2002 17:46 |
| pbasic programming | punarhero | Programming | 4 | 21-01-2002 23:32 |