In a project, we need to drive a linear motor module (some high tech fancy industry thing) with something as simple as an Arduino. Basically we need to get the speed of the Motor and send its new commands back. In between I'll implement a controller and logic.
To be honest, I only got a rough idea, how industry (ethernet or other) standard/interfaces work, and I got absolutely no idea, if it is even possible to interface such a fancy thing with an Arduino.
I've got the options for the following things:
Sercos III, Profinet IO, EtherNet/IP, EtherCat
possibly also: CANopen, Profibus
Are there any libraries/known projects in this direction? Or is it strictly impossible? I found 2 projects about profibus, but they didn't really seem to be reproducable in the near feature, without significant efforts.
Thanks for any hints, advices etc.!
Very interessting discussion about CAN on Arduino DUE: http://forum.arduino.cc/index.php?topic=131096.0 Same should work for the DigiX as it is 100% pin- and code compatible (and still available ;-) )
Related
BACKSTORY
The other day I found a motorized wheel chair that someone was throwing away. Being a maker who spends a lot of time looking at what other people have made online I decided to snatch it and try to make a robot out of it. I also bought an Arduino mega, a Kinect sensor, and a motor controller to try to control the motors and give it some form of vision.
MY VISION
Honestly I don’t intend for this robot to be much more than a fun, and challenging, project. My current goals are to have it run SLAM algorithms to figure out where it is on a map and for it to navigate to predetermined points on the map. However at this point I would be happy with just being able to do a simple teleop control with the keyboard.
MY PROBLEM
I have spent the past week researching ros and how to get it talking to my Arduino. I have installed diff_drive_controller, Turtlebot, ros_control, ros_serial, ros_arduino_bridge, and several others trying to find something that will tell the motors what to do. By now I feel like I have a good barely below the surface understanding about how ros works. Basically there are a series of nodes each publishing info for the other nodes to see and subscribing to info that they want to read. All I want right now is a node that publishes data about the velocity of the motors based on it trying to navigate or teleop or something like that. I think turtlebot is my best bet considering it is an all in one stack that does everything I want it to do. The only problem is I don’t have an iRobot create. But it seems like it should be simple enough to intercept those commands and have them drive my own robot base. However I’m not sure which topic to listen on and how to run turtle bot in a way that doesn’t try to connect to an iRobot create. I could just listen to the /cmd_vel_mux/input/teleop topic but I think that would limit me to just teleop and it might make it hard to move on to autonomy in the future.
What topic should I listen on? Am I going about this the right way? Are there any packages that would be better suited for my needs? Keep in mind that I am new to ros so tutorials would be appreciated.
I look forward to your responses
Thanks, Logan
Nice sounding project! I second the recommendation to take a look at the tutorials, but I think you spend some more time with the basic ROS tutorials before diving into the world of Arduino + ROS.
For instance, I noticed one misconception I believe you may have. It doesn't really matter which topic your nodes listens to, as its just a name that can be easily remapped through a parameter given when launching the node. The important thing is to ensure you are listening to the right type of messages - they specify the interface by which all the different nodes communicate. There's a bunch of options, and if none of them fit your use case, you can define your own.
I suspect that for low-level things, such as drivers for your motors, you will need to write your own ROS nodes. For advanced functionality, such as SLAM; there's a variety of options. You can find one that's suited to the input data you have available from your sensors.
One last recommendation is to take advantage of the features of ROS that allow you to break a big problem into manageable subtasks. Do one thing at a time - implement a motor contoroller, write a teleoperation method; taking care to specify suitable interfaces at each point. The advantage of this approach is that if you made smart choices in defining individual components with good interfaces, it is very easy to replace them with another one should you so wish.
You can find a list of tutorials how to interface Arduino and ROS here.
I have an Arduino Due and I have an application that uses FT-CAN (11898-3, Low speed Can). Does anyone know if the Can controller built in the DUE micro will control FT-CAN Transceivers TJA1054t or TJA1055.
I thought I heard that the CAN is not hooked up on the Due but I might confused.
Either way the best answer is to recommend the Arduino.cc forum which would give you an answer very quickly. http://www.arduino.cc/forum
I've ripped open an old Pentium desktop. The main board is a Zida 5svx. I got to know from the manual (which i downloaded from the internet) the location of the ROM chip on the board, and took it out. It was mentioned in the manual that the chip was a Flash EEPROM.
Now, what I am interested in is this: Is there a way to erase the ROM and flash it with, say a C program to blink an LED (i know this might put you into a fit of laughter, but read on all the same), or control a motor?
I also want to know if I can construct a mega-sized micro-controller with the left-over Pentium, some MBs of RAM, and this ROM.
Any suggestions?
P.S: I know that such a uC will require appropriate power supply setup and things.
The key is in getting and deeply studying the manufacturer's datasheets for each device you remove and wish to reuse. I am supposing that since you asked the question that you did that you are not a professional electrical engineer - that's OK, but you will need to do hours, days, or weeks of study to truly understand the datasheets well enough to successfully reuse your motherboard chips because they are written for professional engineers with years of experience, and unfortunately they were not written to be understood by hobbyists. If you can succeed in acquiring and thoroughly understanding all of the datasheets (and the related user's guides as well for the more complex chips) then you have made it to the point where you might be able to start a custom design based on your recovered parts, on paper at least. In order to test your design and insure that each part of it is working will require at least an oscilloscope and volt meter - and the knowledge of how to use them. An understanding of basic electronics is essential, you will not succeed without it. Very good soldering/rework/assembly skills will be required as well if you hope to have your design truly work - you can do everything else right and it can still fail if your skills in this area are lacking. There is simply not enough time for me to advise you on everything you will need to know - but if you are motivated, dedicated, and you don't give up when setbacks and roadblocks occur (and trust me, they occur all too frequently for even the best engineers and best designs) - meaning that you are not easily frustrated when things don't work - then you have a chance at success. I wish you all the best, and try to have fun while doing it (important in case fun is all you ever get out of your project). :)
My school has entered into a Robotics Tournament that competes several schools against each other(this is my school's first year). The objective of the robot is to shoot a ball into a hoop. I am a member of the Programming team. Our job as the programmers is to program a robot and a computer to control the robot. The computer has 2 joy sticks attached to it, one for moving the entire robot(spinning the wheels and causing the robot to move) and one is for the "throwing arm". A signal is going to be sent from the computer to the robot using wifi. All of the programming MUST be done in LabView.
I have never heard of LabView before until i joined this club and i have my doubts about it. The reason why we must use LabView is because most of the kids on the programming team have no programming experience whatsoever. LabView has to be able to interface with the joy sticks and then send that information to the robot using wifi. The micro controller on the robot supports LabView.
Now to my question, is LabView dynamic enough to preform this task? Can LabView even support networking? Can LabView even interface with the joy sticks? I have read a lot of the documentation for LabView from this website:
http://www.ni.com/gettingstarted/labviewbasics/environment.htm
My concern is that LabView is not dynamic enough for what we are trying to use it for as a team and we are going to have to program the computer and the micro controller using C. There are only 2 people on the team who can program sufficiently in C so we would have to teach the rest of the members the basics of C.
All relevant answers are welcomed and appreciated.
LabVIEW can totally do this. I am biased: I've written a textbook on it and am teaching classes:-); I also do this for a living. In comparision to C, well, C can do anything, but LabVIEW does hardware on a much higher level. Doesn't mean I don't like bending pointers for a bit; but it's nice to not care about low-level functions for a while.
Interfacing a joystick is pretty simple, it looks like this: http://digital.ni.com/public.nsf/allkb/CA411647F224787B86256DD000669EFE
To interface Wifi, it depends on how the robot should receive the information. TCP/IP would go like this: http://zone.ni.com/devzone/cda/tut/p/id/2710
I'm not sure what you mean by "dynamic enough", but it's certainly possible to create such a system in LabVIEW, and if the users have no experience, they're probably more likely to succeed if they use LV and they're probably going to enjoy it more. There are certainly many groups who use LabVIEW.
There are people who volunteer as mentors for FRC groups, so I would suggest you ask FIRST or your local NI office if they know of anyone (whether C or LV) who can help your group. If you ask NI, they might also be able to help you in other ways.
There's also a similar discussion here - Textual versus Graphical Programming Languages
The web page you provided is very introductory, "Hello world!" like. Just by learning that you can not get an idea about the LabVIEW potential. Sure you can do everithing with C, but with LabVIEW you will make the same task faster and I don't think you will need more than 2 team members working on the program.
LabView is dynamic, especially for the purposes of robotics club. A white paper outlines some of the possibilities. http://www.ni.com/white-paper/14133/en/
A great resource for people participating in robotics club is the Raspberry Pi website and blog. It is an excellent site to discover what others are doing and creating.
Consider studying the potential of robotics arms and reading white papers from companies that develop them for purposes such as laboratory automation. This is information that could help you if you decide to do this as a career. http://www.hudsonrobotics.com/products/microplate-handling/
Besides Arduino, what other ways are there to learn hardware programming in a hands-on way? Are there any nifty kits available, either a pre-assembled robot, that you can program to move a certain way, or do certain things, or anything similar to that?
Atmel AVR and the PIC both have experiment boards that you can use solder stuff on to, usually they have a couple of buttons and some lights pre-soldered to the area. This let's you program/flash the microprocessor and play with the output pins. You can either write the programs in assembly or C.
Parallax have a number of kits. They have two product lines suited for "playing around", Basic Stamp and something called Propeller. The former is a small microprocessor that runs programs written in Basic (a tad disgusting ;)) and the latter runs something called Spin or assembly (well after compilation obviously.)
I would go with either AVR or the PIC. I've done PIC but I've heard good things about AVR, they seem to ship with better software.
At first look Microsoft's VPL sounds good, but when it comes to actually LEARNING how hardware works it goes a LONG way to hide those details from you. As a matter of fact it is pretty much designed for people who don't program, and is distastful to someone who's actually written embedded software. IF you just want to make stuff happen and not delve into the details it's fine, but if you want to get down to the metal like programming the "Arduino" boards it's not for you.
If you're used to something like the Arduino then something like the PIC will be an easy transistion. SparcFun Electronics has all sorts of DIY type projects and hardware available. If you have a decent bookstore around your area, I would suggest looking for "Circuit Cellar" magazine. It has articles on a monthly basis with project for someone looking to get into hardware projects, everything from homebrew Software Defined Radio to FPGA based 3D graphics. (Raytracing actually) Usually the authors describe the project in an article and "WHY" they made the decisions they did, a description and schematics of the hardware and provide a link to source code.
Cypress Semiconductor has one of the most interesting embedded processors on the market and several high quality dev boards for sale. The PSoC includes the ability to not only configure the software, but also to "drop in" software configured hardware such Analog to digital converters, serial I/O, Digital to Analog and Various amps and filters. It's a REALLY cool concept, and the "touch sensor" capability of the PSoC were actually used in several models of the IPod.
One thing about programming these little micros is they don't have a lot between you and the hardware, you get to see how things really work. It doesn't matter whether you're talking about an 8-bit microcontroller or a quad-core Pentium programming hardware is largely the same concept. You write to a memory mapped register for some piece of hardware like a serial controller, and the hardware responds in someway. If you program a baudrate generator in a PIC or PC it's largely the same idea, you write a value that will be used as a division factor from a given clock to achive a given baudrate. The numbers and names maybe different, but the concepts is the same. On a PC you may have to map to the PCI address of the card, which adds a some complications, but if you looked underneath the OS you would see that that was done just by writing values to registers simalar to programming a PIC to use a different "Page" of memory. Is it worth learning an 8-bitter? Well, there are approximately $5 billion dollars in sales of the little 8-bit micros today with projection only showing growth in that market in the future. I saw one reference that state the average car has 25 Microcontrollers in it. That's not too bad.
I haven't played with it much, but the iRobot looks pretty cool.
The ability to simulate how your robot will work which some of the other answers mentioned is nice, but there's nothing like seeing a real-life robot do what you programmed it to do. That, to me, is what really makes robots fun and cool.
There's the .NET Micro Framework.
It's incredibly simple to use/setup and there's lots of hardware being made to target this framework.
You should take a look at Microsoft Robotics Developer Studio which supports many different kits.
I have always been curious about gumstix. It seems more professional than arduino, and it aims at the Linux programmer. I cannot give you a real suggestion, as I've never played with it, but I would definitely go with one of this toys if I had to do and learn some cool hardware programming.