Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Installation & Troubleshooting / 1.5.6 R2 Library Bug? on: June 03, 2014, 02:18:36 pm
When I went to re-program a robot I've been programming with the 1.5.5 R2 IDE, with the 1.5.6 R2 IDE, I noticed several missing libraries. Including, the SERVO library. But, they were still there..

Case in point: If you add any libraries, either in the \programs\arduino\libraries (as example, C:\programs(86)\arduino1.5.6\libraries), OR in User folder (Example: C:\users\gelfling\My Documents\arduino\libraries\ ) It will actually push something out of the list. (as an example, I recently added a SHT2x Humidity/Temperature chip library, to read temp/humidity where the robot was standing), the Files\examples\Servo examples were missing. (Yet, they did exist in the drive folder.) BUT.... the IDE refused to load servo.h, resulting in an Undefined error.

I've noticed this happens under BOTH Windows-7 & Linux (x64) versions of the IDE. It's as if there is no scroll-ability to the examples pull-down list (it stays solid to the height of the screen)

I've tried swapping the Servo library to the Sketchbook folder (user\???\My Documents\Arduino  or root/home/????/arduino ), but they still won't show or load.)

So... It's either time to scour-out the old 1.5.5 R2 install file, or all the way back to the 1.0.5, which don't seem to have this problem.
2  Topics / Robotics / Re: Using 3 servos with power supplying on: May 28, 2014, 07:28:57 pm
Tom, a project I'm still hammering the kinks out of (mostly software), uses a 12V gel cell as the main supply, but I have it fed to a LM7809 regulator, the output of the 7809 is split between the coaxial plug for the arduino (Roughly 1.5-Amp 9V), and to a separate LM7805 5V regulator to power the motors, servo, PING range finder, 3 IR line followers, and a series-1 XBEE with the Adafruit adaptor board. (which you normally connect the FTDI USB to Serial cable.) (the 7805 also maxing at 1.5-Amp.)  Both regulators are common-grounded, and mounted to a 2" square X 3/16" finned heatsink I scavenge from an old ATX supply. This way, the sensors, all motors, and the radio are powered off a separate 5V supply. Only lines from them are their signals going to the Arduino's I/O pins.

Otherwise, if you try to draw more than 750mA from the +5V power pin on the Arduino, the on-board regulator will overload, and shut-down. (because you're drawing more amperage than it can provide, and the weak voltage that does remain is too weak for the ATMEGA chip to use.)    I just got 50X of both regulators from a China supplier off eBay for about $20 (USD). (replacing the regulators I've scavenged from old gadgets, and broken the pins on from over-use.) 

I had thought it wouldn't cause a problem, but NEVER back-feed an external +5V to the +5V pin of the Arduino. On some models it could fry the switching circuit that shuts-off the USB +5V supply, when using the external Coaxial plug (7-9V dropped to +5V by the on-board regulator.)  I think on the MEGAxxxx boards it really does fry the USB-Serial chip.
3  Topics / Robotics / Re: I bought a Raspberry Pi and want to use it in a robot ? on: May 28, 2014, 07:14:23 pm
Where would you like to start?  One thing to remember, is the majority of the Arduino I/O's are +5/0V logic, and the Raspberry Pi's GPIO pins are +3.3/0V logic. this means feeding +5V logic to the I/O pins of the Pi, can fry it.  (the UNO R3, I believe is also 3.3V logic, But a little more forgiving to +5V signals, where as the Pi is not.)  There are some sample circuits using NFETs, to transition the signal levels, but the raw circuit (NFET's and isolation resistors) make it impractical, BUT... I have seen recently, Adafruit is marketing a Level changer board (single chip, requires feed from the +3.3V of the Pi, and +5V from the Arduino.)  You could use signals from the Pi, out to an arduino to handle mobility or higher voltage signals, and reduce the link between the two down to a I2C  Clk/Dat wire pair, then use the Pi to send/receive signals from the net, or networked to a local computer to control them (as well as add video/sound.).
4  Topics / Robotics / Re: External power crisis for my robot on: May 28, 2014, 07:04:12 pm
You might want to run the motors off an external power source, separate from the arduino, BUT must be grounded common.  I.E. the tank robot I'm trying to get working, I have two 1.5-Ap regulators off the 12V gel cell. a LM7809 (Yes, they actually make a 9V version), and a LM7805 connected to the output of the 7809.   the 12V is dropped to 9V for powering the Arduino, But voltage for the continuous rotation servos (two VEX Motor Drives), the Radar servo (a single VEX Servo Drive), the power for the VEX Ultrasonic range finder (similar to the 4-pin PING, but 2 separate 3-wire plugs, 1 in, 1 out.), and 3 line sensors, are all powered off the single 7805.  (both regulators are mounted on a single 2" Square X 3/16" thick heat sink. (Scavenged from an old ATX power supply))  Yes, I've run into the overloading & resetting of the Arduino's on-board regulator. I had thought of it, but someone else on the discussion board advised against back-feeding the +5V from the regulator, to the +5V pin of the Arduino. (apparently could fry the switching circuit that turns off the USB supplied +5, when you use the Coaxial plug. which steps down through the on-board regulator.)  So-far, modules I've used on my project have worked. (each function run separately), the motor drives work fine, the servo and Ultrasonic sensors work fine,  the line follower sensors work fine, BUT.... I'm still trying to write the code of all of them together, and to react to remote control over a series-1 XBEE...

5  Topics / Robotics / Re: Obstacle Avoiding Robot on: May 28, 2014, 06:44:37 pm
Code looks about right, But adding the SoftwareSerial library might be overkill, as your writing the return data out to the standard Serial I/O. (pins D0 & D1, which are connected to the USB-to-Serial.)   You can also wire a bluetooth or XBEE radio to those same pins for Serial I/O, but they will ignore the USB serial.

I'm also trying to make a tank rover using the VEX as a drive platform, wiring everything through the Arduino, too. (occupying D11 to 2, as LeftMotor, RightMotor, SonarServo, PingIn, PingOut, LeftLine, MidLine, RightLine, SoftIn, SoftOut, using 2 VEX motor drives,
a single VEX Servo as a front-only 180-degree sense, the VEX Sonic Range Finder, 3 line sensors (spaced apart by 1.5") and RX & TX to the 9600 XBEE Series-1.  I see you're using raw distances, which might give some odd readings. the code I've written for mine, (still a work in progress) uses the conversion from raw to cm distance (actually stripped out the Inches conversion from the example code.)

I'm trying to get mine to run in 1 of 3 modes.. Mode 1, follow key presses from the laptop (straight Parallax USB to XBEE Explorer), to the Adafruit XBEE adapter. (pins you would normally connect the FTDI USB cable.).. Mode 2, random explore, stopping 10CM from anything that pops up in front of it, searching 0-179 in 5 steps, looking for the farthest object, turning and going that direction, Or mode 3, watching the line follower sensors for a 3" wide white line on a running track, and staying centered. (if either of the outer sensors see a change, turn towards it to correct path. If it sees a change on the center, stop.)

I'm trying to see if I can change the line sensors to analog pins, and re-assign two digital pins to a pair of step counters (the original version, not the offset. ).. but I'll need to re-work the frame to accommodate the rotary encoders.  I still have the code at home, on a Linux laptop..
6  Using Arduino / Networking, Protocols, and Devices / Re: XBee S2 Configuration on: May 05, 2014, 12:36:39 pm
Jeremy's tutorials are more geared to the S1 Xbees.. try the following series of 5 by Tunnelsup on YouTube. He also has a link to a PDF Cheat-Sheet for all of the S2 settings, and the tutorials have helped me with a pair of S2's I got with the Libelium (?sp?) shields. (2-Pack).   I highly suggest getting Digi's latest release of  X-CTU.  There are also quite a few tutorials out there incase you accidentally lock-up (term, Un-Brick) the modules. (One suggestion not mentioned, worse case, while updating the firmware, wire a momentary switch between GND & -RST, the ever popular RESET button).

link to tunnelsup's 1st tutorial video: http://youtu.be/odekkumB3WQ (remember, there are 5 total!)

Link to Digi's download page for X-CTU:   http://www.digi.com/support/productdetail?pid=3352&type=utilities

7  Using Arduino / Networking, Protocols, and Devices / Re: Xbee arduino to Xbee Pc on: April 30, 2014, 04:41:17 pm
There are quite a few tutorials on the net for this, First of all, there is the local one, (needn't be the specific Arduino shield, can be wired to the board through soft serial),

http://arduino.cc/en/Guide/ArduinoXbeeShield

The Tutorial by Jeremy Blum, who hosts an Arduino tutorial on Element14.com's website,

http://www.jeremyblum.com/2011/02/27/arduino-tutorial-9-wireless-communication/

and Limore Fried's (Lady Ada) on her website,

http://www.ladyada.net/make/xbee/point2point.html

there's also a whole set of 5 basic to advanced XBEE tutorials on YouTube by Tunnelsup , which also includes a link to a PDF
cheat-sheet on setting up the Series-2 XBEE's.

https://www.youtube.com/watch?v=odekkumB3WQ  (this links to Tutorial 1 only, there are total of 5, last being https://www.youtube.com/watch?v=CzH146rR-7I )

Are you using the Xbee shield? or the Adafruit XBee adaptor? (http://www.ladyada.net/make/xbee/), or even Sparkfun's versions? ( USB dongle, https://www.sparkfun.com/products/8687  , and TTL  https://www.sparkfun.com/products/11373)

I'm assuming the USB dongle (either Adafruit's, Parallax, or Sparkfun, for the PC side. These tutorials should get you pointedd in the right direction.  I'm still working on a robotics project, and I've finally settled on the Xbee for communications between the laptop & the robot, but trying to figure a Communications packet protocol between the two. I've mastered the point to point, Now just a matter of getting all info back & forth between the two devices.

Hope these help!  Stephen
8  Using Arduino / Networking, Protocols, and Devices / Re: USB to Serial communication ATMEGA 328 standalone. on: March 17, 2014, 06:10:27 pm
Good catch!  Yes, All signals require a common GND return.    I hit the same, when I tried making a expanded "Buttons" over Network, and suddenly realized, even after trying all the suggestions I got from here, and still not having it work, that... the common power rails on a long breadboard section, were not 2 solid, but... 4...(<insert Homer> smiley-eek-blue D'OH! </homer>)
An alternative, to the FTDI dongle, you could pull the ATMEGA328 from a socketed Arduino, and use the digital 0 & 1 pins (TX & RX going TX to TX, RX to RX I believe, Don't quote me on that.) to a stand-alone 328. (as long as the stand-alone has the bootloader.)
9  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield tutorial on: January 04, 2014, 08:18:57 pm
Just downloaded the individual pages. (19 total! EEK! smiley-eek) I've done a few ethernet experiments with the Ethernet shield (non-R3, and an even older one w/o the SD card), being fed from a cheap WiFi router, and talked to from the laptop via WiFi. (one fair warning to others, Not every router defaults to 192.168.1.1 some are 192.168.2.1 .  Be sure to set your code accordingly to the router.)
 
One thing I'm having trouble with, and others have as well, the +5V regulator on the board (On the Duemilinova & the Uno) get real hot using these shields.. The W5100 seems to draw an enormous amount, going from the +5V down to 3.3V. (the shield's on-board 3.3V regulator.)  Is it possible to maybe draw the +5V from another source?  The newer w/SD also draws +5V through the ICSP socket, but the older one has no ICSP.. what I'm thinking of, is running a wire from the power supply (a modified 200W ATX supply) to the +5V, Isolating that pin from the header of the Arduino.  But.. that ICSP pin is the stumbler... Would I need to isolate that one as well?

Stephen
10  Using Arduino / Programming Questions / Is 1.5.5 the new IDE for All? or is 1.05 the latest IDE for the MEGA and down? on: December 13, 2013, 01:01:56 pm
I've noticed all new IDE's for the YUN, DUE, etc.. But has development for the MEGA2560, down, stopped at 1.0.5?
I'm all for development for the new boards, but has the life of the ATMEGA & MEGA ended?
11  Using Arduino / Networking, Protocols, and Devices / Re: Controlling servos on Xbee on: October 12, 2013, 10:16:52 pm
You might want to try this page offsite, from Digi..  http://examples.digi.com/lights-motors-more/802-15-4-pwm-output-with-an-led/ ,  It sends PWM output to an LED, which might be do-able to a servo, but remember, the output is going to be 3.3V, unless you feed it through a level converter..

I haven't read the entire page set, but I'm guessing the input is from a potentiometer connected to one of the analog inputs on the sender XBEE, then sends the output to one of the PWM lines on the receiver XBEE.
12  Using Arduino / Networking, Protocols, and Devices / Re: Hello? Who's out there? I2C address unknown, how to obtain it? on: October 06, 2013, 09:50:01 pm
Well, after 3/4 of a year since this thread was active, I pulled the controller out, and hooked it up, changing slightly, running +3.3V & GND externally. (Using the THINGS.Com nunchuck plug, external from the Arduino.)  and tried the original code someone posted here..  confirmed, it's the same address as the actual nunchuck controller (52), but when I tried various ways of talking to it to send data, nothing came back...    just sat there..  So, apparently, it's something the master controller of the Wii sends, that it understands..  Also, internally, this controller is nothing but switches under the joystick, 8 external switches to the right, but no ideas how the turbo and macro control keys work..  I'll check that new URL someone just posted..  just downloaded the PDF.. So, hopefully, I'll learn something from it.  Thanks.


Update: the URL was for another of Tod Kurt's devices, but I couldn't make heads or tails of it..

I understand, the sketch he wrote long ago for the Nunchuck looks for data from memory address 0x40 (decimal 64) of device 0x34 ( decimal 52), But, how do I (a) figure what memory address is this thing using, if not 0x40? and (b) how many bytes will it send?
13  Using Arduino / Networking, Protocols, and Devices / Re: Serial Commmunication on: October 06, 2013, 09:34:38 pm
The Include doesn't.. It threw me too, when I tried my 1st attempt at making a remote XBEE talk to a second one, plugged into a Duemilinova running the soft-serial.. But, you'll notice, when you do the "port1.begin(9600)" & port1.read & port1.write, the functions will.. 

Check the File/Examples/SoftwareSerial  TwoPortReceive example, and scroll down to the 55th to 84th lines, You'll see how it changes color only on the function.  It also shows in the SoftwareSerialExample sample between lines 44th to 53rd lines.

At least these work under 1.0.5, not sure of older (I still keep 0.23 for the LOL-Shield), or the newer betas.
14  Using Arduino / Motors, Mechanics, and Power / Re: 12v relay advice on: September 09, 2013, 02:57:37 pm
It may be overkill, but even a simple Darlington will work fine..  I had a 12V counter solenoid I pulled from an old video game, that I wanted to reset back to 0..  Once I opened it, it was too close together to try rolling the wheels back, and trying to do it with the 1's wheel, would've broken the pawl.  So.. Forward, was the direction to go..  I wired-up a LN2003 open-collector Darlington array chip, using just one input & one output, proceeded to wire the solenoid as if it were a single coil on a stepper motor, (signal from the Arduino to pin 1, GND pin from the solenoid to pin 16, Arduino, power, and 12V GND to pin 8, +12V to pin 9, and the positive wire from the solenoid.) Then, wrote a small program on the arduino to to wait 3 seconds, then starts to toggle the signal pin (just for haha's, Pin smiley-cool on & off a number of times at approx 40 mS between pulses.

result, when I connected the solenoid, and powered-up the arduino, it would wait 3 seconds, then start chattering away, pulsing the solenoid on for 40mS, then off again for the next 40mS. then, just leave it to buzz away.. after a couple of hours, went back to check on it, and it was at 999999.. (starting at only 006420).. Exactly as planned. the last step, pulse it over to 000000 by connecting the solenoid to the +12V & GND outside the circuit.

Either two simple transistors, or a darlington might be the answer.  Here's a simple circuit link:


the ULN2003 would be overkill, unless you had 7 relays going.

Stephen Griswold
15  Using Arduino / Motors, Mechanics, and Power / Re: Arduino UNO Battery connection on: June 25, 2013, 04:34:10 pm
I sacrificed 2 long wires from my set of wire jumpers, one red, one black, and connected the to the same barrel connector (actually radioshack #274-1569), so I could plug more than one arduino into a breadboard which had the power on 2 common rails. (+12V from a converted ATX supply down to 9V via a 1amp LM7809 regulator I scavenged from an old sound card.)  As mentioned, Positive (+) to the center connector, Negative (-) to the outer shell.
you can back-feed to the connector, BUT.... beware of short-circuits! simply plug the +9V supply into the VCC pin on the power rail on the Arduino (note +5, GND, GND, VCC,  to the left of analog 0)  A short, could cause the trace on the board's underside to burn through.. Likewise, NEVER draw VCC level power from this pin, in excess of 1-Amp, for the same reason. (had fun scraping paint off the trace, and bridging with a piece of thin wire)


Pages: [1] 2 3 ... 5