Interfacing a Digital Potentiometer with BS2
Orion22
Posts: 1
Hello, I am fairly new to the basic stamp. I working on this project and basically I want to controll four motors with the BASIC stamp based on the information I get from the HitachiH48C 3-Axis Accelerometer. I want basically to keep the aparatus balanced. So I will be checking the X, Y, Z axis.
I was thinking of using a digital potentiometer to control the resistance so that if the aparatus tilts left i.e, the accelerometer send a signal to that motor increasing the voltage to that motor to stablize the aparatus.
Simply put, given four motors how do I keep the aparatus stable using the HitachiH48C 3-Axis Accelerometer hooked up to four independently driven motors.
I was thinking of using a digital potentiometer to control the resistance so that if the aparatus tilts left i.e, the accelerometer send a signal to that motor increasing the voltage to that motor to stablize the aparatus.
Simply put, given four motors how do I keep the aparatus stable using the HitachiH48C 3-Axis Accelerometer hooked up to four independently driven motors.
Comments
You might want to have a look here for ideas on balancing a two wheel robot with a Basic Stamp.
Vern
PS: Why did you make this post a "poll"?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I've been using the MCP42100 to control two PWM circuits...
The MCP42100 have two digital pots, 100K ohm with 256 steps, they are also avaialbe in 10K or 50K ohm.
You can Daisy-Chain these which means you can hook up two or more and still control these with only 3 pins.
I have the code at home somewhere, let me look it up and send it to you later tonight...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse