HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Nov 02, 2013, 05:44 AM
Registered User
tweety777's Avatar
Vlaardingen, The Netherlands
Joined Nov 2008
1,346 Posts
Finally I tested the demo hoping to read the pots values but got no luck at that too...
Arduino keeps shouting sensor values of 0.
Would I need to add a 5K Ohm resistor to get a sensor reading?

Greetings Josse
tweety777 is offline Find More Posts by tweety777
Reply With Quote
Sign up now
to remove ads between posts
Old Nov 02, 2013, 06:07 PM
Registered User
Dutchraptor's Avatar
The Netherlands, ZH, Hoogvliet
Joined Jul 2008
302 Posts
It would help if you post a schemaic along with your post. Else we can only guess.

Danny
Dutchraptor is online now Find More Posts by Dutchraptor
Reply With Quote
Old Nov 03, 2013, 07:19 AM
Registered User
tweety777's Avatar
Vlaardingen, The Netherlands
Joined Nov 2008
1,346 Posts
Hi Danny,

Here is the drawing.
tweety777 is offline Find More Posts by tweety777
Reply With Quote
Old Nov 03, 2013, 06:32 PM
Registered User
Dutchraptor's Avatar
The Netherlands, ZH, Hoogvliet
Joined Jul 2008
302 Posts
try it with the normal demo file analogInOutSerial. That way you can read the values and test the pot. Not all pots are the same. Perhaps it's a logaritmic version, perhaps wrong pin layout used, etc.

Danny
Dutchraptor is online now Find More Posts by Dutchraptor
Reply With Quote
Old Nov 04, 2013, 04:25 AM
Registered User
tweety777's Avatar
Vlaardingen, The Netherlands
Joined Nov 2008
1,346 Posts
Hi Danny,

I tried that demo and got only 0 as value.
It is a 5K Ohm pot so I can try adding some resistors hoping that will make a difference.

Greetings Josse
tweety777 is offline Find More Posts by tweety777
Reply With Quote
Old Nov 04, 2013, 06:54 AM
Registered User
tweety777's Avatar
Vlaardingen, The Netherlands
Joined Nov 2008
1,346 Posts
Just to try I added 5K Ohm resistance (5 1K Ohm resistors to be precise), then checked the demo and got nothing.
Then I realised that I might have connected the plus and minus the wrong way so I changed that and then checked again.
The result is a sensor reading of 1024 resulting in an output of 255.
After having turned the pot to 1 end I came up with a sensor value of 1019 with an output of 254!!!
The conclusion is that the wiring is now correct, now I only need to finetune the sensor readings to get a useful range and that preferably means that 180 degrees of turn in the pot represents an output range of 0-255 (probably it will turn out to be a smaller range with it's midpoint somewhere halfway through the range from 0-255).
I now did get a step closer!!

Greetings Josse
tweety777 is offline Find More Posts by tweety777
Reply With Quote
Old Nov 04, 2013, 03:32 PM
Registered User
Dutchraptor's Avatar
The Netherlands, ZH, Hoogvliet
Joined Jul 2008
302 Posts
My best guess, try a new pot. Looks like your pot is burned on the inside.

Danny
Dutchraptor is online now Find More Posts by Dutchraptor
Reply With Quote
Old Nov 04, 2013, 03:35 PM
Registered User
tweety777's Avatar
Vlaardingen, The Netherlands
Joined Nov 2008
1,346 Posts
Don't like the sound of that...
Could that be due to wrong connection?
If that's the case I'll be stuck with 270 degree pots for quite some time, the other 10 turn pot is still connected the wrong way around...

Greetings Josse
tweety777 is offline Find More Posts by tweety777
Reply With Quote
Old Nov 05, 2013, 02:40 AM
Registered User
Dutchraptor's Avatar
The Netherlands, ZH, Hoogvliet
Joined Jul 2008
302 Posts
If you take the time to look at some example codes, you'll see that the raw range can be set. If you have a pot range A you map it to a range B for servo's or other things like this: ValueA = map(ValueA, 0, 1023, 0, 255);

If you want to reverse the range: ValueA = map(ValueA, 0, 1023, 255, 0);

As simple as that. You don't have to take the wiring apart.

PS: I made a little box for my stuff on my 3D printer. Why? read:
http://www.rcgroups.com/forums/showp...&postcount=111
Dutchraptor is online now Find More Posts by Dutchraptor
Reply With Quote
Old Nov 05, 2013, 02:42 AM
Registered User
Finland
Joined Feb 2006
5 Posts
Hi,

A 10-turn pot requires you to turn the pot for 10 turns to go from no resistance to full resistance. You can't get it to output 0-1024 for 180°. What you need is a rotary encoder. Check here. They can do in infinite number of turns and give you an absolute value.
mikaelgu is offline Find More Posts by mikaelgu
Reply With Quote
Old Nov 05, 2013, 04:01 AM
Registered User
tweety777's Avatar
Vlaardingen, The Netherlands
Joined Nov 2008
1,346 Posts
Thanks for the advice guys!
The rotary encoder sounds good, I'll check it out soon, should the second 10 turn pot still be alive...

Just for the sake of trying to find a way into the future plans, what kind of code is needed to control a stepper motor?
That is what will steer the schottels at some point in time (better sooner then later to my taste...).

Greetings Josse
tweety777 is offline Find More Posts by tweety777
Reply With Quote
Old Nov 05, 2013, 09:25 AM
Registered User
Blackpool, Lancs
Joined Feb 2006
2,967 Posts
Any pot is easy to check out with a multimeter. just connect to one end and the wiper, switch on set to ohms, turn the pot, observe results while turning the pot spindle. Then repeat connecting to the other end and the wiper.
In this instance it is being used as its name suggests, as a POTential divider. When in circuit, assuming a linear law device, the voltage at the wiper will be proportional to its position relative to the voltages at the ends. With +5 at one end and ground at the other, looking with a voltmeter based on the ground line, turning through half the available travel should show 2.5 volts. Anything significantly different indicates a dead pot. Connecting the wiper to ground and one end to +ve, with the wiper too near to +ve will do the damage.
mfr02 is offline Find More Posts by mfr02
Reply With Quote
Old Nov 06, 2013, 12:54 AM
Registered User
Finland
Joined Feb 2006
5 Posts
Quote:
Originally Posted by tweety777 View Post
Thanks for the advice guys!
The rotary encoder sounds good, I'll check it out soon, should the second 10 turn pot still be alive...

Just for the sake of trying to find a way into the future plans, what kind of code is needed to control a stepper motor?
That is what will steer the schottels at some point in time (better sooner then later to my taste...).

Greetings Josse
Arduino has a built in stepper library but it's blocking so you can't do anything else while the motors are moving. AccelStepper is much better.
Also check ot Tom Igoe's site and StepperWorld's tutorials
or just Google stepper arduino

Edit: need to clarify my writing in post #145. Rotary encoders actually have no idea of which direction they are pointing, but know how much you've turned them. So you'd have to make the assumption that it's pointing to 0° at startup. Another option would be a magnetic angular sensor. Just google magnetic angle sensor.
mikaelgu is offline Find More Posts by mikaelgu
Last edited by mikaelgu; Nov 06, 2013 at 01:00 AM.
Reply With Quote
Old Jan 02, 2014, 05:31 AM
Registered User
tweety777's Avatar
Vlaardingen, The Netherlands
Joined Nov 2008
1,346 Posts
At this moment I'm in the process of designing a new hull as the current 1 turned out to be to bad to continu with.
That means that the control issues are in a sidetrack at the moment.
The new hull does come with some other homebrew hack issues.
For starters there's the ballast tank issues.
What kind of pump could I best use to fill 4 tanks in less then 5 minutes whilst not requiring all too much room?
Also power use should not be very high.
I'd prefer to use 4 pumps, 1 per tank in order to prevent unequal filling of the tanks.
Or does someone advice a different number of pumps?
Also, can I use 2 pumps both to fill a ballast tank or after turning over a valve powering the fire monitor?

Greetings Josse
tweety777 is offline Find More Posts by tweety777
Reply With Quote
Old Jan 02, 2014, 06:51 PM
---o-O-o---
blutoh's Avatar
United States, NJ, Livingston
Joined Mar 2012
1,603 Posts
Hi Josse,

How about windshield washer pumps from a car? They are usually 12 volt, if you are using auto batteries for power in your boat it should be straight forward to connect and control.

BTW, what type of hull construction are you going to use, foam and fiberglass, wood, or other?

Pete
blutoh is offline Find More Posts by blutoh
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Build Log Diving supportvessel Well Enhancer 1:75 tweety777 Scale Boats 1670 Oct 09, 2014 09:03 AM
Discussion KK Plus 5.5d/e Best value Enhanced KK Controller And MEMS/ACC Module dt8666 Multirotor Electronics 3396 Aug 27, 2014 12:07 PM
Discussion High Tech High Senior Project - Looking for Help & Suggestions! hth.uav Electric Plane Talk 13 May 16, 2012 07:32 AM
Discussion General rules for control surfaces ratios for aircraft? As well as CG's? GreenAce92 3D Flying 27 Feb 07, 2010 02:15 PM
My obscenely low tech, yet somehow high tech, camera mount eBird Aerial Photography 29 Dec 31, 2004 06:49 PM