Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing a Digital Potentiometer with BS2 — Parallax Forums

Interfacing a Digital Potentiometer with BS2

Orion22Orion22 Posts: 1
edited 2006-04-20 21:36 in BASIC Stamp
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.

Comments

  • Vern GranerVern Graner Posts: 337
    edited 2006-04-19 17:49
    Orion22 said...
    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.

    You might want to have a look here for ideas on balancing a two wheel robot with a Basic Stamp. smile.gif

    Vern

    PS: Why did you make this post a "poll"? confused.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Vern Graner CNE/CNA/SSE    | "If the network is down, then you're
    Senior Systems Engineer    | obviously incompetent so why are we
    Texas Information Services | paying you? Of course,if the network
    http://www.txis.com        | is up, then we obviously don't need
    Austin Office 512 328-8947 | you, so why are we paying you?" ©VLG
    
    
  • BamseBamse Posts: 561
    edited 2006-04-19 18:15
    Orion22,

    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
  • BamseBamse Posts: 561
    edited 2006-04-20 21:36
    And here is the code for the MCP42100... tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
Sign In or Register to comment.