Pages: [1] 2   Go Down
Author Topic: pot simulation  (Read 953 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 0
Posts: 342
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

HI

I want to make an automatic RC system for stress testing motors , my plan is to take the readings from the pots in the rc gimbals, establish the limits that i want to reproduce, and then reproduce them with an arduino so that i get the same stress test each time,
right now i just stress the hell out of the motors to see if they have problems or not, but each test is different based on my commands,

i know how to read the pot value and print it to an lcd for establishing the limits,

but i dont know how to simulate that signal and send it back out to the rest of the rc system ready for transmition,
can anyone give me a pointer?
thanks,
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26196
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
my plan is to take the readings from the pots in the rc gimbals

Quote
but i dont know how to simulate that signal and send it back out to the rest of the rc system ready for transmition,
Do you mean read the joystick pots?
Or do you mean read the PPM/PWM stream?
Maybe there's something you can do with the Tx's buddy/trainer port.

Quote
can anyone give me a pointer?
Code:
void* p = NULL;
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 342
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i mean read the joystick pots directly,

i think that would be easier for a novice than decoding the pwm stream, I will use an old RC handset that can be freely hacked and mashed into what i need,

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26941
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The pots just have analog levels at the wipers, yes? Connect those to two analog inputs.
Read them in, send out as digital values, or mimic them with DACs elsewhere if you need analog again.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Dallas, Texas
Offline Offline
God Member
*****
Karma: 31
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Or simply include appropriate digital potentiometers in your device.  Use A2D to determine the limits your interested in, then "swap" in a digital pot and perform your tests with the digital pot replacing the signals from the controllers pot.
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Offline Offline
Sr. Member
****
Karma: 0
Posts: 342
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The pots just have analog levels at the wipers, yes? Connect those to two analog inputs.
Read them in, send out as digital values, or mimic them with DACs elsewhere if you need analog again.

CrossRoads, im still trying to talk to the boss about the other boards, when i know anything i´ll let you know,

back to subject,

will the digital signal look like a difference in resistance to the board that was previously connected to the pot?
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 342
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Or simply include appropriate digital potentiometers in your device.  Use A2D to determine the limits your interested in, then "swap" in a digital pot and perform your tests with the digital pot replacing the signals from the controllers pot.

is a digital pot something physical or coded?
I have no idea what it is,
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26941
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok on the mini1284's.

For this one - I think you want a digitally controlled potentiometer then to replace the joystick's pot.
Many exist, here's one example.
http://www.maxim-ic.com/datasheet/index.mvp/id/1976
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 342
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok ,
so it says 3 wire serial data input, is that to control it? I am going to need to replace 4 pots and a slider, is that going to be possible on a 328u?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26941
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes.
Common INC & U/D to all devices.
Unique CS to each.
Total: 7 pins.

Next step - what is the voltage across the existing pots?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 342
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well the voltage across the exisitng pots has to be tested, i can test it on monday when back at work ,

is the coding to control these digital pots complicated? I am planning to make a set test routine, all it will really have to do is take the digital pots output from the minimum that i have yet to establish from the exisitng pots, up to the max and back down again on each of the pots in turn, and if possible then all of them at the same time,

the plan is to test the motor response on an rc model under heavy stress conditions,
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26941
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would say dirt simple (clarified after reading the datasheet!):

With CS low and U/D high, a high-to-low transition on INC increments the
internal counter, increasing the resistance between W and L.

When both CS and U/D are low, a high-to-low INC transition decrements the
internal counter, decreasing the resistance between W and L.

At either end (maximum or minimum positions), additional transitions in the
direction of the end points will not change the counter value (the counter will not wrap around).

Wiper Increment Control Input. With CS low, a high-to-low transition increments
(U/D high) or decrements (U/D low) the wiper position.

Up/Down Control Input. With CS low, a high-to-low INC transition increments
(U/D high) or decrements (U/D low) the wiper position.

Example: send 8 transitions to the Increment pin to increase the resistance:

digitalWrite (CS, LOW);
digitalWrite (UD, HIGH);
for (int x = 0; x<8; x=x+1){
digitalWrite (INC, HIGH);
digitalWrite (INC, LOW);
}
digitalWrite (CS, HIGH);


And you'd probably want a counter to keep track of where you were.
« Last Edit: July 20, 2012, 02:43:12 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 342
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so basically that little bit of psuedo would have increased the resistance a bit  , by one increment assumedly,

i would just have to make some functions for increase and decrease and implement a counter to give me an order of events based on counter value,

call the functions i want based on the counter, and then reset the counter ready to start the cycle again,

its looking feasible,

since you seem to know what you are talking about, would the digi pots need external circuitry? hopefully they could run on 5v
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26941
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That code would have incremented 8 times.
The pots do run on 5v signals with 5V across the variable part.

With power cycling, the wiper goes to position 16.

There are other pots also, including non-volatile parts that retain their setting.
http://www.maxim-ic.com/products/digi_pot/
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 342
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so cant you set x as an integer inside the IF statement? I have always been doing it at the start of the sketch outside of setup,

thats an interesting thing to know because if you have a lot of seperate statements that dont necccesarily come true you dont need to waste power with a lot of unused variables,

Logged

Pages: [1] 2   Go Up
Jump to: