Show Posts
Pages: 1 ... 4 5 [6] 7 8 ... 374
76  Using Arduino / Motors, Mechanics, and Power / Re: RC car servo with 6 wires ;;; on: March 10, 2014, 04:05:16 pm
Yeah the best will to replace it with an 3-wire servo. The thing that piss me of is that i took it from modeling shop and told them
"i want a car with a real servo" !!!!!! I paid 100euro for that sh1t.

Well - technically you did get a "real servo" - it's just that the control electronics weren't in the servo, but on the external control board...  smiley-razz

I guess next time specify a three wire hobby-grade replaceable servo, and either bring along or link to an example of the servo or something.


That's a good servo to use; there's only likely to be a couple of potential issues, since this is the steering servo:

1. You may need to custom mount the servo - hopefully both the original servo and this new one are the same size or close, and that the existing mounting points can be used. Otherwise, you will need to do some custom fitting to get it to work properly.

2. It's unclear whether the original servo (or the vehicle itself) had a "servo saver" shock absorber mounted; sometimes it's part of the steering mechanism, sometimes it's a special spring-loaded control horn that's mounted to the servo. If the car is small enough, or is meant to be driven on flat surfaces - then it may not have anything. The purpose of such a device is to act as a spring-loaded shock absorber so that if the front steering wheels are bumped by an external force, the servo control horn (or the gears in the servo) aren't damaged. You typically see such a device used on larger 4WD buggys/truggies and such.

The first item will be the real potential issue here; the second I wouldn't worry about too much (just something to be aware of).
77  Using Arduino / Motors, Mechanics, and Power / Re: RC car servo with 6 wires ;;; on: March 09, 2014, 01:50:44 pm
Yeah i allready read all posts on forum about 6wire servo, but my car is new .. maybe i can control this by sending some values to its chip?

The 6 wires from servo going to an chip which has those info on it : 2609A / JCB / U4001D

i didnt find any info about that chip, but you find if i use an oscilloscope and check all wires..  i will can send with arduino some values to the right pin so i can have the steering ;

This is a possibility - certainly worth a try, but don't be surprised if you end up burning something out or whatnot with your hacking.

Honest, the best approach would be to simple replace that toy servo with a standard hobby servo; that, or return the vehicle and purchase one with a real hobby servo (3-wire).

If you wanted to use that servo, as already has been shown the other thread posted shows how the wires are more or less connected inside - you would probably want to verify the wiring for yours (in case wire colors are different or connected differently).

So - you have six wires - three of them are for the motor (two for the motor terminals, the third going to the capacitor common connection - you might be able to ignore that wire), the other three to the internal potentiometer.

The motor terminals would need to be connected to a suitable h-bridge driver circuit; I won't elaborate further on this, other than to say that the h-bridge needs to be rated for the motor in the servo.

The other wires to the potentiometer would need to be connected so that the "outer" terminals of the potentiometer connect to 5 volts and ground, while the wiper terminal gets connected to an analog input pin on the Arduino.

Then - the following pseudocode should help you write some real Arduino code to control the servo's motor:

Code:
moveToPosition(toPosition):

error = 5

done = FALSE

while (!done):

atPosition = readPosition()

if (atPosition > toPosition - error && atPosition < toPosition + error):

done = TRUE

else:

if (atPosition > toPosition - error):

motorCCW()

if (atPosition < toPosition + error):

motorCW()

motorStop()

To explain this code - first off, if you implemented this code as-is (but translated to work with the Arduino) - it would be "blocking" - that is, it would stay within the loop until it finished, then exit; you would really want to implement something better - non-blocking, and likely based on a timer interrupt to keep the "servo" updated; this code is just to give you an idea of how a software servo can be implemented, nothing more.

1. So - you would pass in to the code the position you want to move the servo to (0-1023).

2. An error value is set - this is to establish a "window" for the position comparison; real analog servos do this as well, but it is done electrically using a comparator circuit. This window is needed to be set to eliminate oscillation, "hunting" by the servo, and to cope with inaccuracies of the potentiometer. It may be increased or decreased as needed (larger values make the servo less positionally accurate).

3. A flag is then set to FALSE that controls when the loop can be exited, then the loop begins.

4. In the loop, we read the position of the potentiometer (0-1023).

5. We then compare it to the position we want to be at - within the "error window"; if the position falls within that window around the position we want to be at, then we set the flag to exit the loop, stop the motor, and exit the function.

6. Otherwise, depending on whether the position we are current at is greater than (or less than) the position we want to move to, we activate the motor to turn counter-clockwise or clockwise.

Those are basically the steps. You could expand it to pass in a "speed" parameter (then pass those to the motor actuation functions to PWM the motor at a particular speed if you wanted). You could also implement the system using a PID control algorithm (if you wanted more accuracy).

As can be seen, though, this is a much more complicated system to implement for a cheap RC car chassis robot; really only worth it if you have no other choice. But note, this kind of code could be used to create a large-scale steering servo system - especially if the Arduino (or more likely, a standalone ATTiny or something) was dedicated to the task, in which case the while() loop would just sit inside the "loop" structure, while listening for data being read from the serial port, or from some other communication method.

Anyhow - again, I think you would be better served by a different chassis, or by replacing the servo - unless as one of your goals you wanted to educate yourself on how a servo really works...

Good luck, and I hope this helps.
78  General Category / General Discussion / Re: ARDUINO MEGA on: March 06, 2014, 07:26:01 pm
Yes you can use Mega in place of Uno.  Not all shields will be compatible, you may need to add a couple jumpers to pick up signals from other pins.

Some won't work at all; for example, the NooTropic Design VE shield won't work on the (standard?) Mega, because one of the pins that is needed (which is on the ATMega2560) isn't brought out to the jumper block!

This is discussed on the NooTropic site:

https://nootropicdesign.com/ve/whynotmega.html

The "workaround" would either be to "hack" the official board (soldering a jumper to the uC - probably not very easy given the pin spacing) - or (as noted in the above link) purchasing a Seeeduino Mega and adding some wire jumpers between the shield and the jumper blocks on the Seeeduino Mega.

So - ultimately, you have to be very diligent with your selections, and read over the description of the shield/board to make sure it can be used "as-is" (or if there is a workaround). I would say boards that flat-out won't work because of "missing pins" (maybe "unallocated pins" would be a better description?) might be in the minority, though.
79  Using Arduino / Project Guidance / Re: Switching servo control between a receiver and an Arduino? on: March 06, 2014, 07:03:33 pm
IE if I waggle the control sticks on my transmitter a lot, the Arduino just kind of freezes for a few seconds and so do the servos

This -might- be because pulseIn() is a blocking function - taking a bit of time to "decode" the PPM signal.

There are a few (?) alternative libraries out there for RC decoding (and servo output) - for instance:

http://sourceforge.net/projects/arduinorclib/

...or you might be able to write your own non-blocking decoder - you'd basically be starting with the "blink without delay" sketch, and working from there - to take input from multiple pins, sampling it, decoding it, then outputting the signals to the servos on other pins. Ultimately doing it all so that the code is non-blocking, while keeping everything as fast as possible (it wouldn't be an easy feat, I will say that).

If you wanted to implement your option, I would use digital logic ICs to shunt the signals around, and likely shift registers of some sort to control the needed pins (because there probably wouldn't be enough pins on a standard UNO for this kind of system otherwise - but with a Mega it might be possible).
80  Using Arduino / General Electronics / Re: Good quality cheap multimeter on: March 06, 2014, 12:42:31 am
And I strongly suggest that you do NOT buy any Cen-Tech meters. The last five I bought there were filled with solder balls and bits of wire. Sad, because they used to have some decent cheap DMMs.

You buy them? I always wait for the "free" coupon...

That said, I've never had a problem with them - at least for the purpose of using them as "throwaway" meters - when I am doing something where I just need an extra readout, or where I think I might kill my "better" meter. For around the house stuff, quick continuity checking, and automotive work - they seem to work fine for me.

That said - I might crack open one my "newer" ones and see what the build quality looks like (I expect to be disappointed).
81  Using Arduino / General Electronics / Re: Which electronics book? on: March 04, 2014, 10:03:48 pm
On the other hand, I don't want a 1000-page reference tome for my first introduction.

Well - if you -do- decide to go that far, the two best out there are Horowitz's "Art of Electronics" and Grob's "Basic Electronics". Both are basically EE101 level books - and as such command hefty prices for a current edition. Save your money, and instead purchase an older edition.

You might also check out Forrest M. Mimms III's "Engineer's Mini-Notebook" series:

http://www.forrestmims.org/

He also has a few other good beginner electronics books out there; well worth looking into.
82  Using Arduino / Motors, Mechanics, and Power / Re: Attempting to make a computer controller Power Wheels toy, but new to electronic on: March 04, 2014, 03:25:28 pm
Besides a motor driver, something like this could be used to control the motors forward and reverse but you wouldn't have speed control.

Something like that could be used - but I wouldn't recommend it. Why? Because 12 volt PowerWheel ride-on toys have motors (there are usually 2 motors - one for each rear wheel - the 6 volt toys use a single motor) that can easily draw well over 10 amps of current; you'll quickly fry those small relays on that board. That said, you could use those relays to activate a larger pair of SPDT relays.

carpetfizz:

First off, I hope you included the 25 amp fuse (I believe it is a slo-blow fuse) when you switched out the battery; if you didn't - add it back in - connect it as close as possible to the battery's positive terminal - a small 6 inch pigtail holder like this is best:

http://www.superbrightleds.com/moreinfo/led-vehicle-replacement-bulbs/waterproof-mini-automotive-fuse-holder/768/1741/

That, or re-use the one that came with the original battery.

Secondly - I would drop using the car battery - especially if it is a standard wet-cell starter battery; while you'll get longer run time initially, in a short amount of time you'll destroy the plates on the battery as it wasn't meant for deep-cycle use. Instead, purchase a larger AGM or gel-cell SLA deep-cycle battery. They are more expensive, but are designed for running loads long-term like this toy.

I would also suggest getting a smart battery charger for the battery (instead of the one the toy came with) - a quality CTEK charger for SLA batteries (or something similar) is best - while more expensive, it will keep your battery in tip-top shape long term (do not use a car charger battery on SLA batteries - the charging current tends to be too high).

Since the fuse is rated at 25 amps, you want a motor driver of at least that much (and actually more), because those motors will pull that much when stalled (that's why the original fuse is rated in such a manner). As I said before, there are two motors, one for each rear wheel. In the PowerWheels toy, the two speeds (high/low) are governed via a clever switch arrangement on the speed "shifter" - the switches basically switch the motors between being connecting in serial vs being connected in parallel across the battery (I can't recall which arrangement is high speed and which is low speed).

I would recommend a couple of other places/items to look into which will be helpful - first, there is a whole community out there of PowerWheels (and similar toys) enthusiasts and modders - they like to do really crazy things with them, mostly as a way to have fun with their kids:

http://www.modifiedpowerwheels.com/

Also google "modified power wheels" for more...

Secondly - one of them has a very nice CD on some of the more popular mods - well worth the cost, as it brings together a ton of information (including patents and service manuals that would take a while to gather yourself):

http://powerwheelscd.com/

Ok - with that out of the way - you probably want to control this vehicle, right. Well, as mentioned, you need a motor driver of some sort. What you'll want to find, ultimately, is an h-bridge driver board that can handle about 30 amps. Alternatively, you could connect the motors separately - each will need about a 15 amp driver.

You can find such boards on Ebay, Pololu and other places - just make sure it can handle the amperage of the motors (also note that some of those boards may need a heatsink and/or forced-air fan attached to handle the current - and some don't come that way; you have to add it yourself - just read all the specs carefully).

As noted above, if you just wanted on/off control - you could use relays, but they would need to be able to handle the current. You could either use one of those boards from Ebay as mentioned, and either switch extra relays with them, or possibly install/hook up better relays - or you could build your own relay board. If you go that route, 40-60 amp SPDT automotive relays are fairly cheap and will easily handle the switching of the load. Just hook them up as shown in the relay tutorial for the Arduino and you'll be fine.

Two SPDT relays are hooked up so that the "common" leads of each relay go to each terminal on the motor, and the NC leads of the relays go to the battery positive terminal (via a fuse!) and the NO leads of the relays are connected to the ground (negative) terminal on the battery. Make sure that you use proper gauge wires between the battery, motors and relays (10-12 gauge should be ok), otherwise the wires will heat up, you'll lose current in them, and the motors will run slower.

Another hint/idea: If you set up your drive motors as seperately wired (so you can control the speed and direction of each) - while it is a more complicated setup, it opens the door to doing some potentially fancy things with your PowerWheels (for instance, an electronic differential and/or traction control!).

Steering will be your greatest issue to tackle - these ride-on toys were not designed with ease of conversion in mind. If you want to throw money at it, you can find fairly powerful servos or linear actuators out there that will do the trick (then all you need to do is figure out how to mount and connect the device to the steering system). Check out Servo City (http://www.servocity.com/) as well as Firgelli Automation (http://firgelliauto.com/) for ideas, just be prepared for sticker shock.

Whatever you do, don't go cheap or small on the gearmotor for actuation of the steering; it needs to be pretty damn robust. For my project, I used have a gearmotor from a drill powering a piece of threaded rod with a travelling nut to actuate my steering. Also - whatever you do, make sure that you have limit switches or some other means to cut the current to the steering motor for your testing and actual operation - if not, you'll either break the motor, or the steering system, or both (ask me how I know). A good limit switch circuit (and also shows how to wire the relays) is shown here - this is Zoomcat's circuit; he's a regular here on the Arduino forum's:

http://web.comporium.net/~shb/switch.htm

Be aware that the diodes, limit switches, and relays need to be sized for the motor current draw and voltage needs.

If you decide to build your own actuator, you'll also probably want some kind of position feedback; if you use a geared servo from Servo City, that will be built in, of course - but if you use a linear actuator, some may have pulse sensors (typically a hall-effect sensor or reed-relay actuated by magnet) or they may have a potentiometer that you can read. Some linear actuators ($$$) can be driven using servo signals, as well (in which case, you don't need to worry about a separate position sensor). Whatever you do, don't rely on the position sensor in lieu of the limit switches! If that sensor fails for some reason, the limit switches will be your backup.

The PowerWheels modifier community also has numerous instances showing how they modified their particular chassis for steering and R/C control - so look through the forums and other sources to get some ideas there as well.

Lastly - whatever you do - don't try to replace the motors with brushless motors of a similar size. While it is possible, the gearboxes aren't built for the higher RPMs and power those motors can generated, and you will end up burning through gearboxes as a result (and they aren't easy to get as replacement components).

Good luck with your project!
83  Using Arduino / Motors, Mechanics, and Power / Re: PWM ports can't drive motor properly. Possible hardware error? on: March 04, 2014, 02:44:34 pm
Have you tried testing the pin (10) with an LED/resistor to see if you can vary the brightness of the LED to verify that PWM is working on that pin?

Also - what about the rest of your code, is it doing anything that could alter pin 10 PWM output?

Finally - what version of the Arduino IDE/software are you using?
84  Using Arduino / Motors, Mechanics, and Power / Re: controlling 10A DC Motor using Arduino UNO on: March 04, 2014, 02:38:41 pm
Actually, you wouldn't really need a transistor to control a relay. Most hobbyist grade relays will operate at +5V, which is perfect for toggling with any Uno pin. A relay is probably the way to go, though.

Yeah - but most relays draw far more current than the recommended 20-40 mA that an i/o pin can provide; that's why a transistor or mosfet is used. The only relays that do have such low resistances to allow "direct drive" (and you should always have the flyback diode involved regardless) tend to be so-called "reed relays", and they generally don't have contacts rated for a 10 amp inductive load.

So, not taking into account the actual power management systems and the other rails of the PSU, a 300 watt ATX power supply could easily source > 10 amps, hardly what I'd call a large PSU.

Something else to consider - some PC power supplies don't like inductive loads (ie - brushed DC motors and the like) connected to them; the large inrush current will sometimes trick the supply into switching to a "shutdown" or "safe" mode. Not all such supplies, but it does happen. For these kinds of supplies, you either need to add a large electrolytic capacitor to the DC output and/or set the motor driver up to do a "soft start", slowly (comparatively) ramping up the speed of the motor to prevent the inrush current from tripping it.
85  Community / Bar Sport / Re: Airplane Design / Safety. on: March 03, 2014, 02:09:39 pm
One of my favorite "stories":

http://en.wikipedia.org/wiki/Gimli_Glider
86  Topics / Robotics / Re: UGV robot motor shield problem on: March 03, 2014, 02:05:36 pm
You will not likely find a "shield" that can handle a 12A "running" current and a 79A "stall" current motor. Finding something for two of them - good luck.

You can, however, find a motor driver board that you can connect for such specs. It won't be inexpensive. Don't try to cheap out on this, either - unless you like fire and wasting money.

Normally, I point people toward Pololu - but this time, they don't seem to have anything that would fit your requirements. The difficulty is finding something to match that stall current; 79A is not anything to sneeze at. Since such a stall current occurs (however briefly) at startup, you need something that can handle it for a short while. Ultimately, you want to size your h-bridge to be a tad larger than the stall current ratings (10-15%) - which in your case would bring you close to 100A.

At that point, looking at something like these controllers (likely the RDFR33 - which should handle two motors with a 95A surge, and 35A continuous):

https://www.vantec.com/acatalog/spdcat.html

Unfortunately, such a controller isn't anywhere close to "inexpensive".

Building such a controller is likely out of the question; when you are dealing with currents above about 10A or so, things get really tricky with h-bridge designs - anything homebrew will likely be a matter of burning up a bunch of expensive parts before you get something stable (and even when you think you have something stable, you may find it going up in a puff of smoke and fire when you least expect it).

I can't even recommend a relay circuit to you, because while such relays (well, at those current levels, they're going to be called "contactors") do exist, purchasing such will likely run you as much as the vantec controller, and you won't have PWM speed control, either (unless you add a bunch of high-current n-channel mosfets or IGBTs to the low-side - and at those currents, that might just be asking for trouble ultimately).

You might want to re-think your design to try to use a more reasonable motor - that, or increase your budget.
87  Using Arduino / Displays / Re: 132x32 graphic LCD on: March 03, 2014, 01:46:09 pm
Here's something - there's a link to a RAR archive that appears to contain everything needed (better datasheet, source code, etc):

http://ram-e-shop.com/oscmax/catalog/product_info.php?products_id=1616

...for the future, if anyone needs the file and the above link stops working, let me know - I have a copy.
88  Using Arduino / Displays / Re: 132x32 graphic LCD on: March 03, 2014, 01:42:44 pm
You might be able to find something here:

http://www.topwaydisplay.com/TechnicalInfo/index.htm

This display doesn't seem to be one they currently manufacture...
89  Using Arduino / Project Guidance / Re: Using Camera Component from USB Webcam on: March 02, 2014, 11:43:18 pm
The arduino is an 8 bit micro controller, how many 1980's computers do you know that had web cams on them. I will tell you zero.

Actually - barring the "web" part of things, I had a digitizer cartridge (DS-69A) for my TRS-80 Color Computer 2 - took forever to capture an image, but it did work...
90  Using Arduino / Sensors / Re: Simple angle measurement on: March 02, 2014, 01:55:55 pm
Have you thought about using a capacitive tilt sensor?

They used to use these back in the day (80's/90's) for 3DOF head tracking sensors (pitch/roll mainly - yaw was done with a compass) before gyros/accelerometers became cheap.

Basically the sensor had a liquid electrolyte and some terminals; one set of terminals was excited using an AC signal, and the other set could read the signal which would change based on the tilt level (which would alter the capacitance). At least, I think that is how they worked (?).

They suffered from "settling" issues - in which if tilted too fast, the liquid would take a while to settle - so that limited read rate (plus they had a limit as to how far they could be tilted, of course).

I'm not sure if they are still available (as a component) or not...
Pages: 1 ... 4 5 [6] 7 8 ... 374