Let me just say your a beast! How did you figure all that out if you dont even have it?! It is probably very simple, but I have never done anything like this before and I can’t picture the cable connections. I know it is asking a lot, but could you make one of those cool pictures for this, like the pictures you made for “How to drive a small DC load via Digital Out” and “How a Vex can monitor its own battery voltage”. It can be very rough and basic.
It isn’t so hard once you know what to look for in the spec sheets. They are quite intimidating at first, but with practice they start to make sense and you can scan them quite quickly for the important details.
I think I am going to try this project. I am going to order that accelerometer from Spark Fun and then wire it up. I am also going to buy two, 12 inch extension cables from VEX (or any place cheaper) and just cut off one end and solder that according to the diagram made by Quazar. Then I have to start the hard part of programming it. I will tell you how it is going once I begin.
P.S. If anyone knows of any places to get cheap extension cables it would be appreciated.
That’s great, let us know how it works out. You can also test your programming even before you get the accelerometer board by connecting one or two or three Vex potentiometers (POTS) to the corresponding Vex Analog inputs (ADC) as shown in Quazar’s diagrams and use EasyC 2.x Analog blocks to read them.
As for cheap extension cables and “Y” cables, I make my own by ordering long 0.100 pin headers from Digikey and just use Radio Shack wire-wrap wire and tool to connect the red black and white wires to the pins. Electrical tape is used to insulate the connections at both ends (extended connector and Vex motors and servos and sensors).
The parts came and I soldered them together and it looks pretty good, I think. I tried plugging the accelerometer into the microcontroller and controlling it from the on line window. As I turned the accelerometer, the numbers flickered and changed a little! I am not sure how to program it but I am going to keep trying. Of coarse my batteries went dead half way through so I will post more when they are charged. Attached is a link to the picture of the accelerometer in the gallery.
After the batteries charged I started playing with it again. The accelerometer started off well and was working fine but then became almost none responsive. And as I touched the black box in the middle (the actual accelerometer) it was super hot. I dont know if this means it is a bad conection and it over heating or what. I am going to keep on working on it but if any one has any ideas I would like to hear them. Thanks
i just got two very smal accelerometers (0.8cmx0.8cm, including breakout board) and they have a threshold thing where a pin will go high it trggered, i think this would work with vex (although that’s some basic operations only)
The digital/analog ports are spec’d to put out 5V on the red wire, and that can’t be changed by programming. The accelerometer is spec’d to handle up to 5.25V. That should work fine, though it isn’t a lot of margin (which may explain the hot chip).
The main thing to watch out for is shorting the red wires to any other signal, since that can damage the accelerometer. Also, never ever plug this thing into a motor port: that will fry the accelerometer since the motor ports are powered straight from the battery.
One quick way to drop about half a volt is to put a rectifier in series with the red wire. Just insert it along the red wire such that the end with the silver band is pointing towards the accelerometer, and the other end is pointing toward the Vex connector.
Thanks for the pic - please keep us posted. I have a feeling Sparkfun is going to get a small flurry of orders once you’ve got the kinks worked out.
I figured out why it would get so hot. Very dumb but, I had the cable in the wrond way. I don’t know if this was the sole reason, but when i turned the cable around in the port, it didnt get as hot. So the mechanical problems are fixed now I just need to work on programming. I was looking at the analog input part of the on-line wondow and it seems that when the accelerometer is parrallel to the ground the x-axis reads around 340. As you turn it the numbers change. The y-axis is only around 5. I dont know if this is a soldering problem or what. Any programming tips would be very helpful!!
Finally, the accelerometer if finished. The code and the accelerometer works really well. RIght now it is working as a “joystick.” I am starting to work on a new use for the accelerometer and maybe a video later. There is also a picture of the casing I made to protect the accelerometer in the gallery.
Yeah, you can definitely take off that warning. The accelerometer works really well. In fact, I have a video of it in use. Right now it is controlling a turret thing. I plan to attach a laser pointer or some type of rubber band shooter to make it more fun. Thanks for the help.
Nice find. I’d be willing to bet that this is exactly the same as what you just built, fitted into a little black box. I was thinking of fitting one into a quadrature encoder enclosure (which conveniently comes with two Vex cables already!)
Dunno if anyones said this, but you can dissect a wiimote take out the accelerometers then rewire them- someone did this at the trinity robot fire fighting contest, where you need to navigate a maze and find in a random room a candle