Discussion forum for the BasicX family of microcontroller chips.
|
Hi there I am trying to read the signals from the Z board of the rotomotion part. It is an accelerometer and a gyro. I connect this board's pins directly to ADC pins on my BX24. My problem is that the signals I get doesn't vary when I move the Gyro/Accelerometer. I have tried with two different Z board's and two different microcontrollers (BX35 and BX25), but the same problem. I have tried with different source code that I have found on the internet and in the examples that comes with the MCU. No difference. I am trying to build at balancing scooter similar to the Spider (See www.globalfusion.com) but it seems that my project stops before it even begins. Do I need any sort of resistors etc. between the Gyro/Accelerometer and the MCU, or can it be connected directly to the ADC pin ? I have also ordered an ADXL202EB Accelerometer to test with the sample code that comes with the BX24. I hope somebody have some ideas that can help. Maybe som source code or technical tips. Thank you. |
|
|
|
Hi... I am the author of spider... the address is : www.fusionglobal.net though :) Ok, i remember when i hooked this babies up, there was an error in the schematics provided by rotomotion. i don't know if they fixed this, but their pinout was screwed up. What i recommend is the following : - using a voltmeter, check for continuity. - tap into pin 4 of the LT1014 (opam) and make sure you are tapping the LT1014 that goes to the gyro. - Then check the main pinout header for continuity (J6 if i remember correctly) for your VCC or +5 Pin. - Now, tap into PIN 11 of the same LT1014 (opam) that goes to the gyro. - Look for continuity in the same J6 or so, main pinout header. This would be your ground pin. - Tap into pin one of the same LT014 opam (the one that goes into the gyro), and search for the counterpart continuity on the main header (j6 i think), and this would be your gyro output. - The remaining pin is the accelerometer tilt output pin. If you still don't get any analog readings it is probable that you had killed the OPAM, but is not very likely. I hope not though :) Also keep this pointers into mind : - Gyros, report half the voltage when they are stable (around 2.5 volts or so), when you rotate the board with some acceleration, they report rate of change (like degs per second), they don't report angle at all!! they report delta theta or the rate of rotation. - Accelerometers report tilt angle, same thing when they are perfectly level they report around 2.5 volts or so, as you tilt it to one side, this starts to go more to the positive side or more to the degative side depending on which side you are rotating, this sensors do! provide angle or true tilt or more precisely a proportional value with respect to the vector of gravity. This is how you know when you have a working sensor, when you get values that make sense, like this ones mentioned. Another thing to keep in mind. Z board from rotomotion requires regulated 5volt supply, so make sure to provide the same voltage line the BX24 is using regulated. There is a pin you can take from the BX24 that its regulated, this would suffice to power the z board. Ground is also very important, make sure you use the same ground from the BX24 and the Zboard so their reference to +5 and their reference to 0 is the same, the shorter the wires from one end to the other the better, however maybe 1/2 a meter would be a fair size to use, provided that you use good quality cable and well shilded. No resistors or anything else is required, just get the correct pin from the z-board to an ADC pin from the BX, use the getadc or respective command and you are done with this. This will however not suffice to get the scooter working, read on the webpage on the filterings required. Accelerometers report errors when they are exposed to linear acceleration in the tilt angle, and gyro integrals have drift, so you need to counteract or filter this signals to make a trust worthy signal. Be very very carefull with this experiment, is really heavy duty and CAN and WILL kill you if you don't extreme cautions. A project this size is really dangerous, so before you ride it, make sure everything is working 100%, no loose cables, batteries 100% charged, were a helmet, use a dead men switch, have someone near just in case, and make sure the algorythm doesn't go crazy at extremeties, and put a failsafe, that if the angle of the scooter goes beyond something manageable then shutdown immediately. Also make sure you understand the system a 100% and you trust your system and code a 100%. Use lower values for allowed motor torque at the begening and DON't attempt speed running in the first 50 tests :).... On the very first test when you are learning to balance, be carefull and avoid the wheels touching the ground unless the system looks stable. Use my code if you want, although i don't make any warranties and i don't encourage riding it at all!, that's why i publish it as a robot and not a scooter. SO PLEASE BE CAREFULL don't get hurt or killedd. AHH.. Ok, any questions, let me know i would be happy to help... I will post some updated code in the months to come. BYE! On Dec 29, 2004, at 11:58 AM, kjellosan wrote: > > Hi there > > I am trying to read the signals from the Z board of the rotomotion > part. It is an accelerometer and a gyro. I connect this board's pins > directly to ADC pins on my BX24. My problem is that the signals I get > doesn't vary when I move the Gyro/Accelerometer. I have tried with > two different Z board's and two different microcontrollers (BX35 and > BX25), but the same problem. I have tried with different source code > that I have found on the internet and in the examples that comes with > the MCU. No difference. > > I am trying to build at balancing scooter similar to the Spider (See > www.globalfusion.com) but it seems that my project stops before it > even begins. > > Do I need any sort of resistors etc. between the Gyro/Accelerometer > and the MCU, or can it be connected directly to the ADC pin ? > I have also ordered an ADXL202EB Accelerometer to test with the > sample code that comes with the BX24. > > I hope somebody have some ideas that can help. Maybe som source code > or technical tips. > > Thank you. > > > Yahoo! Groups Links K-LO ______________ _ I_ (O__)=====-(~) _/_/ |
|
|
|
Thank you very much for your help. I will let you know when I have tested your tips. Kjellosan. --- In , Francisco Lobo <francisco@f...> wrote: > Hi... I am the author of spider... the address is : > www.fusionglobal.net though :) > Ok, i remember when i hooked this babies up, there was an error in the > schematics provided by rotomotion. i don't know if they fixed this, but > their pinout was screwed up. > What i recommend is the following : > - using a voltmeter, check for continuity. > - tap into pin 4 of the LT1014 (opam) and make sure you are tapping the > LT1014 that goes to the gyro. > - Then check the main pinout header for continuity (J6 if i remember > correctly) for your VCC or +5 Pin. > - Now, tap into PIN 11 of the same LT1014 (opam) that goes to the gyro. > - Look for continuity in the same J6 or so, main pinout header. This > would be your ground pin. > > - Tap into pin one of the same LT014 opam (the one that goes into the > gyro), and search for the counterpart continuity on the main header (j6 > i think), and this would be your gyro output. > > - The remaining pin is the accelerometer tilt output pin. > If you still don't get any analog readings it is probable that you had > killed the OPAM, but is not very likely. I hope not though :) > Also keep this pointers into mind : > > - Gyros, report half the voltage when they are stable (around 2.5 volts > or so), when you rotate the board with some acceleration, they report > rate of change (like degs per second), they don't report angle at all!! > they report delta theta or the rate of rotation. > > - Accelerometers report tilt angle, same thing when they are perfectly > level they report around 2.5 volts or so, as you tilt it to one side, > this starts to go more to the positive side or more to the degative > side depending on which side you are rotating, this sensors do! provide > angle or true tilt or more precisely a proportional value with respect > to the vector of gravity. > > This is how you know when you have a working sensor, when you get > values that make sense, like this ones mentioned. > > Another thing to keep in mind. Z board from rotomotion requires > regulated 5volt supply, so make sure to provide the same voltage line > the BX24 is using regulated. There is a pin you can take from the BX24 > that its regulated, this would suffice to power the z board. > > Ground is also very important, make sure you use the same ground from > the BX24 and the Zboard so their reference to +5 and their reference to > 0 is the same, the shorter the wires from one end to the other the > better, however maybe 1/2 a meter would be a fair size to use, provided > that you use good quality cable and well shilded. > > No resistors or anything else is required, just get the correct pin > from the z-board to an ADC pin from the BX, use the getadc or > respective command and you are done with this. > > This will however not suffice to get the scooter working, read on the > webpage on the filterings required. Accelerometers report errors when > they are exposed to linear acceleration in the tilt angle, and gyro > integrals have drift, so you need to counteract or filter this signals > to make a trust worthy signal. > > Be very very carefull with this experiment, is really heavy duty and > CAN and WILL kill you if you don't extreme cautions. A project this > size is really dangerous, so before you ride it, make sure everything > is working 100%, no loose cables, batteries 100% charged, were a > helmet, use a dead men switch, have someone near just in case, and make > sure the algorythm doesn't go crazy at extremeties, and put a failsafe, > that if the angle of the scooter goes beyond something manageable then > shutdown immediately. Also make sure you understand the system a 100% > and you trust your system and code a 100%. Use lower values for allowed > motor torque at the begening and DON't attempt speed running in the > first 50 tests :).... > > On the very first test when you are learning to balance, be carefull > and avoid the wheels touching the ground unless the system looks > stable. > > Use my code if you want, although i don't make any warranties and i > don't encourage riding it at all!, that's why i publish it as a robot > and not a scooter. SO PLEASE BE CAREFULL don't get hurt or killedd. > > AHH.. Ok, any questions, let me know i would be happy to help... > > I will post some updated code in the months to come. > > BYE! > On Dec 29, 2004, at 11:58 AM, kjellosan wrote: > > > > > > > Hi there > > > > I am trying to read the signals from the Z board of the rotomotion > > part. It is an accelerometer and a gyro. I connect this board's pins > > directly to ADC pins on my BX24. My problem is that the signals I get > > doesn't vary when I move the Gyro/Accelerometer. I have tried with > > two different Z board's and two different microcontrollers (BX35 and > > BX25), but the same problem. I have tried with different source code > > that I have found on the internet and in the examples that comes with > > the MCU. No difference. > > > > I am trying to build at balancing scooter similar to the Spider (See > > www.globalfusion.com) but it seems that my project stops before it > > even begins. > > > > Do I need any sort of resistors etc. between the Gyro/Accelerometer > > and the MCU, or can it be connected directly to the ADC pin ? > > I have also ordered an ADXL202EB Accelerometer to test with the > > sample code that comes with the BX24. > > > > I hope somebody have some ideas that can help. Maybe som source code > > or technical tips. > > > > Thank you. > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > K-LO > ______________ > _ I_ > (O__)=====-(~) > _/_/ |
|
Hi again I have tried the things you suggested, unfortunately with no good results. I will wait for the adxl202eb (evaluation board) I have ordered. ( We have plenty of snow here in Norway at the moment so I have a lot time to get the project finished.) If I get the adxl202eb to work, I will continue with the Gyro you have used in your Spider project. I am very thankful that you let other people use your code, so I will will start with it, and I will be careful. PS. I am sorry for the wrong adress of your website. --- In , Francisco Lobo <francisco@f...> wrote: > Hi... I am the author of spider... the address is : > www.fusionglobal.net though :) > Ok, i remember when i hooked this babies up, there was an error in the > schematics provided by rotomotion. i don't know if they fixed this, but > their pinout was screwed up. > What i recommend is the following : > - using a voltmeter, check for continuity. > - tap into pin 4 of the LT1014 (opam) and make sure you are tapping the > LT1014 that goes to the gyro. > - Then check the main pinout header for continuity (J6 if i remember > correctly) for your VCC or +5 Pin. > - Now, tap into PIN 11 of the same LT1014 (opam) that goes to the gyro. > - Look for continuity in the same J6 or so, main pinout header. This > would be your ground pin. > > - Tap into pin one of the same LT014 opam (the one that goes into the > gyro), and search for the counterpart continuity on the main header (j6 > i think), and this would be your gyro output. > > - The remaining pin is the accelerometer tilt output pin. > If you still don't get any analog readings it is probable that you had > killed the OPAM, but is not very likely. I hope not though :) > Also keep this pointers into mind : > > - Gyros, report half the voltage when they are stable (around 2.5 volts > or so), when you rotate the board with some acceleration, they report > rate of change (like degs per second), they don't report angle at all!! > they report delta theta or the rate of rotation. > > - Accelerometers report tilt angle, same thing when they are perfectly > level they report around 2.5 volts or so, as you tilt it to one side, > this starts to go more to the positive side or more to the degative > side depending on which side you are rotating, this sensors do! provide > angle or true tilt or more precisely a proportional value with respect > to the vector of gravity. > > This is how you know when you have a working sensor, when you get > values that make sense, like this ones mentioned. > > Another thing to keep in mind. Z board from rotomotion requires > regulated 5volt supply, so make sure to provide the same voltage line > the BX24 is using regulated. There is a pin you can take from the BX24 > that its regulated, this would suffice to power the z board. > > Ground is also very important, make sure you use the same ground from > the BX24 and the Zboard so their reference to +5 and their reference to > 0 is the same, the shorter the wires from one end to the other the > better, however maybe 1/2 a meter would be a fair size to use, provided > that you use good quality cable and well shilded. > > No resistors or anything else is required, just get the correct pin > from the z-board to an ADC pin from the BX, use the getadc or > respective command and you are done with this. > > This will however not suffice to get the scooter working, read on the > webpage on the filterings required. Accelerometers report errors when > they are exposed to linear acceleration in the tilt angle, and gyro > integrals have drift, so you need to counteract or filter this signals > to make a trust worthy signal. > > Be very very carefull with this experiment, is really heavy duty and > CAN and WILL kill you if you don't extreme cautions. A project this > size is really dangerous, so before you ride it, make sure everything > is working 100%, no loose cables, batteries 100% charged, were a > helmet, use a dead men switch, have someone near just in case, and make > sure the algorythm doesn't go crazy at extremeties, and put a failsafe, > that if the angle of the scooter goes beyond something manageable then > shutdown immediately. Also make sure you understand the system a 100% > and you trust your system and code a 100%. Use lower values for allowed > motor torque at the begening and DON't attempt speed running in the > first 50 tests :).... > > On the very first test when you are learning to balance, be carefull > and avoid the wheels touching the ground unless the system looks > stable. > > Use my code if you want, although i don't make any warranties and i > don't encourage riding it at all!, that's why i publish it as a robot > and not a scooter. SO PLEASE BE CAREFULL don't get hurt or killedd. > > AHH.. Ok, any questions, let me know i would be happy to help... > > I will post some updated code in the months to come. > > BYE! > On Dec 29, 2004, at 11:58 AM, kjellosan wrote: > > > > > > > Hi there > > > > I am trying to read the signals from the Z board of the rotomotion > > part. It is an accelerometer and a gyro. I connect this board's pins > > directly to ADC pins on my BX24. My problem is that the signals I get > > doesn't vary when I move the Gyro/Accelerometer. I have tried with > > two different Z board's and two different microcontrollers (BX35 and > > BX25), but the same problem. I have tried with different source code > > that I have found on the internet and in the examples that comes with > > the MCU. No difference. > > > > I am trying to build at balancing scooter similar to the Spider (See > > www.globalfusion.com) but it seems that my project stops before it > > even begins. > > > > Do I need any sort of resistors etc. between the Gyro/Accelerometer > > and the MCU, or can it be connected directly to the ADC pin ? > > I have also ordered an ADXL202EB Accelerometer to test with the > > sample code that comes with the BX24. > > > > I hope somebody have some ideas that can help. Maybe som source code > > or technical tips. > > > > Thank you. > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > K-LO > ______________ > _ I_ > (O__)=====-(~) > _/_/ |
|
There is an error in the rotomotion pin out schematic. Check the schematics in rotomotion site and compare ir using a volt meter. also gyroscopes report rate of change not angle. For angle you need the accelerometer not the gyro. I hope this helps... |
|
Also be ware you must supply a steady 5 volt power to the z brd. Try using the
regulated output from bx. And use the same grounds for the adc ref to be the same.
good luck also check : www.fusionglobal.net |
|
Hi Fransisco I finally got something to work. I now have an Analog Device 202EB which gives me PWM Signals out. I am able to read this with my BX24. Do you think it's ok to use the PWM mode in a balancing robot like the spider. Do you you have any suggestions to what I need to change in the code you have posted on your webpage. I mean to change from analog to PWM in the algorithms used. Best regards Kjellosan --- In , Francisco Lobo <francisco@f...> wrote: > Hi... I am the author of spider... the address is : > www.fusionglobal.net though :) > Ok, i remember when i hooked this babies up, there was an error in the > schematics provided by rotomotion. i don't know if they fixed this, but > their pinout was screwed up. > What i recommend is the following : > - using a voltmeter, check for continuity. > - tap into pin 4 of the LT1014 (opam) and make sure you are tapping the > LT1014 that goes to the gyro. > - Then check the main pinout header for continuity (J6 if i remember > correctly) for your VCC or +5 Pin. > - Now, tap into PIN 11 of the same LT1014 (opam) that goes to the gyro. > - Look for continuity in the same J6 or so, main pinout header. This > would be your ground pin. > > - Tap into pin one of the same LT014 opam (the one that goes into the > gyro), and search for the counterpart continuity on the main header (j6 > i think), and this would be your gyro output. > > - The remaining pin is the accelerometer tilt output pin. > If you still don't get any analog readings it is probable that you had > killed the OPAM, but is not very likely. I hope not though :) > Also keep this pointers into mind : > > - Gyros, report half the voltage when they are stable (around 2.5 volts > or so), when you rotate the board with some acceleration, they report > rate of change (like degs per second), they don't report angle at all!! > they report delta theta or the rate of rotation. > > - Accelerometers report tilt angle, same thing when they are perfectly > level they report around 2.5 volts or so, as you tilt it to one side, > this starts to go more to the positive side or more to the degative > side depending on which side you are rotating, this sensors do! provide > angle or true tilt or more precisely a proportional value with respect > to the vector of gravity. > > This is how you know when you have a working sensor, when you get > values that make sense, like this ones mentioned. > > Another thing to keep in mind. Z board from rotomotion requires > regulated 5volt supply, so make sure to provide the same voltage line > the BX24 is using regulated. There is a pin you can take from the BX24 > that its regulated, this would suffice to power the z board. > > Ground is also very important, make sure you use the same ground from > the BX24 and the Zboard so their reference to +5 and their reference to > 0 is the same, the shorter the wires from one end to the other the > better, however maybe 1/2 a meter would be a fair size to use, provided > that you use good quality cable and well shilded. > > No resistors or anything else is required, just get the correct pin > from the z-board to an ADC pin from the BX, use the getadc or > respective command and you are done with this. > > This will however not suffice to get the scooter working, read on the > webpage on the filterings required. Accelerometers report errors when > they are exposed to linear acceleration in the tilt angle, and gyro > integrals have drift, so you need to counteract or filter this signals > to make a trust worthy signal. > > Be very very carefull with this experiment, is really heavy duty and > CAN and WILL kill you if you don't extreme cautions. A project this > size is really dangerous, so before you ride it, make sure everything > is working 100%, no loose cables, batteries 100% charged, were a > helmet, use a dead men switch, have someone near just in case, and make > sure the algorythm doesn't go crazy at extremeties, and put a failsafe, > that if the angle of the scooter goes beyond something manageable then > shutdown immediately. Also make sure you understand the system a 100% > and you trust your system and code a 100%. Use lower values for allowed > motor torque at the begening and DON't attempt speed running in the > first 50 tests :).... > > On the very first test when you are learning to balance, be carefull > and avoid the wheels touching the ground unless the system looks > stable. > > Use my code if you want, although i don't make any warranties and i > don't encourage riding it at all!, that's why i publish it as a robot > and not a scooter. SO PLEASE BE CAREFULL don't get hurt or killedd. > > AHH.. Ok, any questions, let me know i would be happy to help... > > I will post some updated code in the months to come. > > BYE! > On Dec 29, 2004, at 11:58 AM, kjellosan wrote: > > > > > > > Hi there > > > > I am trying to read the signals from the Z board of the rotomotion > > part. It is an accelerometer and a gyro. I connect this board's pins > > directly to ADC pins on my BX24. My problem is that the signals I get > > doesn't vary when I move the Gyro/Accelerometer. I have tried with > > two different Z board's and two different microcontrollers (BX35 and > > BX25), but the same problem. I have tried with different source code > > that I have found on the internet and in the examples that comes with > > the MCU. No difference. > > > > I am trying to build at balancing scooter similar to the Spider (See > > www.globalfusion.com) but it seems that my project stops before it > > even begins. > > > > Do I need any sort of resistors etc. between the Gyro/Accelerometer > > and the MCU, or can it be connected directly to the ADC pin ? > > I have also ordered an ADXL202EB Accelerometer to test with the > > sample code that comes with the BX24. > > > > I hope somebody have some ideas that can help. Maybe som source code > > or technical tips. > > > > Thank you. > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > K-LO > ______________ > _ I_ > (O__)=====-(~) > _/_/ |