Show Posts
Pages: [1] 2 3 ... 379
1  Using Arduino / Motors, Mechanics, and Power / Re: Project help. on: September 30, 2014, 05:17:00 pm
I'll look into that.  I have another question.  My ATmega is going to need 5V, rfid readers need 3.3V and servos, ideally, 6V.  I'm trying to think of a way to bring 6V onto my board, then split it twice to get my 5 and 3.3.  I recon I'll need a bit of amperage for four servos, three readers, and the controller.  they have 6v, 3A adapters but all the ones that I find from trusted sources are over $20 per.  should I just bite the bullet on the price or could I use an old laptop adapter with a 6v, 3a ubec?  My ideal adapter is one from servocity for $24.  If it would be way better to go that way, I have no problem. Just checking.

I think doing the laptop adapter and UBEC idea might be the best one; also get a 5V UBEC for the ATMega, and for the 3.3 volt needs,  use a regulator (LM1117 3.3v for instance).

Regarding the "edge of disc" catching food - you might try rounding off the edges (and inner corner) of the 1/4 cutout; it might help.
2  Using Arduino / Motors, Mechanics, and Power / Re: motor wheel stops when placed on ground on: September 28, 2014, 10:23:35 pm
I'd like to see a mechanical drawing of the "car" - or at least a picture of it. I am suspecting the wheels are directly connected to the shafts of the motors, instead of through a gear box, which raschemmel hinted at...
3  Using Arduino / Motors, Mechanics, and Power / Re: L298N Help Needed on: September 28, 2014, 10:15:25 pm
Ok - forget most of what I wrote before - I just looked at that amazon listing page again, and noticed the schematic for (presumably) your board here:

Again - it is very similar to the other board's schematic I referenced in my first post. And yes, you did apply 24 volts to the logic side of the L298 (VSS), as well as to the enable pins of the L298, and to (probably) the output of the LM7805.

So - try this:

1. Put your 24 volt DC supply on the VCC and ground pins of the board - leave the +5 pin open.

2. I am not sure what the 4 pin jumper block is for; without having one of these boards in hand along with the schematic, it is impossible to tell, but I think it's to allow jumping the IN1-4 pins to possibly 5 volts (?) or to the white connector (?). You will have to determine this.

3. The switch may have protected things (maybe - if you didn't press it while supplying power to the +5 pin with 24 volts; again, things aren't very clear without the board in-hand). I can't tell if that switch is a toggle switch, or simply a momentary switch of some sort - I think it may be a toggle. It has an LED indicator for some reason, run off the +5 volt output of the LM7805 and/or the input from the 3-pin connector on the board.

Your board may well be truly hosed, given the way you described hooking it up. This is why it is important to read and understand all documentation (datasheet for the L298) and schematics. In this case, the schematic is very important - it at least gives some idea of what is hooked up and where. Unfortunately, it doesn't look entirely complete, and/or it is somewhat confusing in nature. Still, it seems to clearly show that you don't hook up anything more the +5 volts to the +5 terminal, and that VCC is the hookup for the motor supply voltage of the L298 (while +5 is either for the L298 logic, or an output from the on-board LM7805 regulator). Furthermore, while this schematic seems a little sketchy - there's enough there that, with a proper multimeter, and a good set of eyes and understanding of how the L298 is supposed to work, along with tracing the PCB - one with some knowledge and a bit of experience could reverse engineer the parts which seem poorly defined, and validate a proper schematic to understand how the board works - prior to actually using it.

This is, again, why it is so important to know how to read a datasheet, as well as draw and understand schematics - when it comes to electronics. They are the documentation and the "roadmap" to how everything is supposed to work. This doesn't mean that they are perfect - like any map, imperfections and errors can and will be found. But if you don't consult them - or you can't understand them, nor be able to reproduce them - you will be as lost as you would without a map in an unknown city.

It is for these reasons why most of the "old-timers" here and those others with experience always make it a point to stress how necessary and useful those skills are, and why they have a certain level of disdain for the "plug-n-play-lego" attitude that many of these modules and other kits seem to stress. It isn't because we think that electronics should be difficult or hard for others; it isn't because we have an attitude of "Well, I had to do it the 'hard way' - so should you!" - it's because these skills and the understanding of electronics is the only way to know for certain how and why a circuit works. Without that understanding, you can quickly and easily throw good money after bad - while becoming very frustrated along the way. Also, depending on what you are working on (such as mains-powered circuits) - it can be very dangerous not to have that understanding. Unfortunately, electronics is not a "plug-n-play-lego" environment, and there is a lot of math involved in understanding certain concepts and such, and it isn't easy to understand, and it can take many years to fully understand it (and honestly, not everyone fully understands it - I certainly don't! - but there are some wizards out there, many of whom have passed - who came up with such designs like the LM741 and the venerable 555 timer - who really, honestly knew what the hell they were doing - even when their workbenches looked like an electronics factory exploded on them - I'm looking at you, Bob - may you rest in peace).
4  Using Arduino / Motors, Mechanics, and Power / Re: L298N Help Needed on: September 28, 2014, 09:33:14 pm
Yeah - it can. But from what I remember from other similar L298 h-bridge boards like you have, the +5 volt pin is actually an -output- and not an input. That, or it's an input for the 5 volt section for an external regulated 5 volts. It all depends on an on-board jumper.

There is an on-board voltage regulator that provides the 5 volts for the logic of the L298; VCC is supposed to be for the input voltage on the board; a jumper selects whether the 5 volts comes from the regulator (taking VCC - which is for the motors and regulating it down to 5 volts for the logic of the L298), or whether it is supplied from an outside, regulated 5 volts to the +5 pin.

When it is using the on-board regulator (with the jumper placed properly), then the +5 pin is an output from the regulator; when it is jumpered the other way, the +5 pin is an input directly to the 5 volt logic side of the L298. The VCC pin is the supply for the motors (and the L298 logic via the regulator - again, depending on the jumper setting).

If you were applying 24 volts to the +5 pin - depending on the jumper setting you likely have either fried the L298 or the regulator (maybe both). You will need to either get a schematic for the board, or trace one out yourself from the PCB traces (and a multimeter and the L298 datasheet) to determine what everything is for, how the inputs and outputs and connected, and how the jumpers are supposed to be set (and what is currently set when you applied power).

Posted in the comments on the Amazon page was this forum thread:

Which shows a similar (but not the same) board - along with some discussion on how to hook it up. There's also a link to the ebay supplier of the board in the thread, here:

In that ebay listing is a schematic (presumably) of the board being sold (again - not the same as your board, but it will serve as an illustration). If you look at the schematic (which is difficult to see because it isn't very large, and it is blurry), note the sub-schematic in the upper left corner. That shows the LM7805 5 volt regulator circuit for the on-board 5 volts to power the L298 logic side. On the left side is the three pin power connector - one pin for 12 volts one pin for ground, and one for 5 volts. Next in series comes the enable jumper; when this jumper is connected, it sends 12 volts to the LM7805 regulator (next in line), which then shows the +5 pin as an output (pin 1 on the three pin connector).

Now the other schematic is the L298 diagram. Notice how the +12V is connected to the L298 motor input - but the +5V is connected to the VSS (logic voltage) section of the L298. Also note how (in this diagram) there isn't a jumper from the 3 pin voltage input for the +5 volt pin, nor between the output of the LM7805 and the +5V pin.

So - if your board is similar (and I am not saying it is - again, only you will be able to determine this by reverse engineering your own schematic) - then by applying 24 volts to that +5 pin - you applied 24 volts to the output of the LM7805 as well as to the 5 volt logic side of the L298 (and I don't know if you had connected the 24 volts to the other pin on the 3 pin connector; you didn't say).

You are probably going to have to do some reverse engineering yourself if you want a schematic for the board (I doubt the supplier has one, and there have been so many manufacturers of these boards in china that there are tons of revisions and versions of the same basic module - so reverse engineering your own schematic is likely preferable).

You might also try this (but even if it works, I would still suspect the board for damage and not use it):

1. Hook your 24 volt supply to the VCC and ground pins on that 3 pin connector - leave the +5 pin empty.

...UGH - see my next reply.
5  Using Arduino / General Electronics / Re: Metalworking Advice on: September 28, 2014, 08:58:00 pm
Another option - if the wall thickness isn't too crazy - would be to use a chassis hole punch. That said, finding square or rectangular punches can be difficult - and when you do, they can be very expensive (whereas round punches are fairly easy to find, and relatively inexpensive).

Here's a Make article that discusses various ways to make square holes in metal - which may help you:
6  Using Arduino / Project Guidance / Re: What's happening with my robot? on: September 28, 2014, 08:43:07 pm
I'm glad you found your issue, but something to keep in mind in the future is that it is possible to use a linear regulator like the 7805 to regulate the voltage to 5 volts for much greater amperage than what the regulator can supply. The way this is usually done is via using what is known as a (by)pass transistor - an example of such a circuit can be found here:

Here's a National Semiconductor datasheet for the LM 340/78xx series which shows similar circuits on page 12:

There are simpler examples as well - just google "7805 pass transistor" - and you'll find several examples. Most linear regulator manufacturers supply examples in the datasheets for their regulators, and many have application notes and/or books, generally freely available - On Semiconductor has a real nice one, for example:

Since the regulator in these circuits is only used for regulation, heat-sinking it isn't generally required - but you will need to select proper transistors and heat-sink them properly to get the most current supply capacity.
7  Using Arduino / Project Guidance / Re: Image processing autonomous robot hardware advice on: September 25, 2014, 08:11:38 pm
An Arduino is not going to be able to process an image from that camera; there is neither the memory nor speed available from the processor to do it. First of all, such an image will be rather large; secondly, it is in jpeg format from the camera. That means you would need to read the image data from the camera then transmit it via the Arduino back to some off-board computer for processing the image. It will take time to acquire and transmit such an image.

As you have noted, you are a newbie at all of this. It is understandable that you don't have the skills to understand the problems you are facing, so I am curious why you have chosen such a complex project to begin with?

It might be better for you to start with the sub-systems first (ie - get a robot base moving, get the ultrasonics working seperate from the base, get a camera working seperately - get all the subsystems working and understand them - then combine them into a working system). If you don't take that route, you may simply get extremely frustrated with a lack of progress.

Furthermore - the challenge you have set up for yourself as a newbie to robotics is -not- a trivial one in the slightest! You have to maneuver a robot, have it recognize an object, have it take a photo, process that image in some manner to somehow determine it's height (not an easy task, btw), then have enough intelligence to decide what to do based on the analysis. We haven't even got into the specifics of power sources, motor controls, etc - all of which you will need to have experience in.

I would advise you to take a step back, and look into understanding what you are trying to do, and the individual sub-systems and processes involved. You will save a lot of time, effort, and money along the way, and at some later point you will have the skills to be able to tackle this project (whether you would be successful then is anyone's conjecture - I can honestly say that I would have an interesting time solving such a system, and I've been playing with diy robotics off-and-on for over 20 years).
8  Topics / Robotics / Re: Simple (?) SLAM created map on: September 23, 2014, 04:19:17 pm
Magnets were not something I had considered; I was thinking more along the lines of BLE each with a unique ID though obviously powering these then needs to be built in to the solution, and adding in BLEs also adds in $s.

I still don't think you are understanding the point of SLAM - which is to determine where in the environment the robot is located at, within a certain level/degree of probability - by sensing patterns of sensor data from the environment and "matching" it with stored sensor data (the map), using any one of a number of algorithms.

Those environmental factors don't need to have any identifying information, nor do they need to be active. Granted, if you did make them active or add some kind of identifiers to them - it could certainly help the situation - but it isn't absolutely necessary. You could easily implement a SLAM algorithm (not a great nor accurate one, mind you) that could navigate and map using readings from touch-sensor "whiskers" on the robot platform.

There have been robotics research projects done using only ultrasonic distance sensors (generally arranged in a ring) to provide data for SLAM algorithm. For a lawnbot, I think a combination of ultrasonics, hall-effect/magnets, and bump sensors would be more than adequate. Implementation is where it will get tricky.

If I were building such a system "from scratch" and -had- to populate a custom PCB, I would go for using some kind of small SOC device from either Intel or Arm.
9  Using Arduino / Motors, Mechanics, and Power / Re: Servo basic - description for type working with voltage range wanted. on: September 23, 2014, 04:02:21 pm
10  Using Arduino / Motors, Mechanics, and Power / Re: Motor control using function generator on: September 23, 2014, 03:57:18 pm
You could try pre-computing a SIN lookup table and putting it in PROGMEM; if you don't mind a loss of accuracy, make the table 256 bytes long (that way you can use a byte to hold the "angle"). If you can take more of a hit in accuracy, you can also store the entries as integers of some sort - when you make the table, multiply the value for the SIN entry by some value (for however much accuracy you need) to make it an integer, then when you look it up, divide it by that same value to get the original value back (minus some accuracy because of dropped decimal places).
11  Using Arduino / Project Guidance / Re: DVD-Rom Drive Based LiDAR? on: September 23, 2014, 03:42:03 pm
You could always try to improve upon this project:

The hardware and concept is pretty basic, and can only measure the distance to a single point; the improvements would be to increase the distance (maybe a combo IR filter, as well as matching the phototransistor to the laser wavelength, perhaps a better amplifier - and/or maybe substituting a different kind of detector for the phototransistor - maybe a pin or avalanche photodiode perhaps - or maybe just a more sensitive photodiode or phototransistor), and make it scan in two dimensions (I thought about maybe panning the phototransistor while tracking the angle might be a good way).
12  Using Arduino / General Electronics / Re: Im programmer who interested in Arduino help on: September 22, 2014, 05:13:54 pm
Well, you'll get out of the hobby what you put into it.

Think of it this way - can you code for a computer in C/C++ without having an understanding of how memory is arranged, what an address is, or how pointers work? Do you need to understand what a stack is, or what a status register does?

Not really - you can certainly not understand any of those things and be able to work on many useful projects using C/C++ (the latter more than the former, generally). But if you do understand them - the possibilities and capabilities you can bring to bear on solving problems using C/C++ grows immensely.

The same thing is at play with the Arduino and electronics. You don't necessarily need to understand Ohm's law or use a multimeter to play with the Arduino. You don't have to understand what a transistor is or how it works. Nor the differences between diodes, or any of a number of other components and concepts of electronics.

But if you want to be able to tackle really interesting projects; if you want to be able to understand how things are really working "under the hood"; if you want to be able to debug and figure out problems with your circuits - well, then at some point the training wheels will need to come off, and you'll want to make the investment of time and energy learning something new. How you do that is up to you, but there are a lot of resources out there for free and otherwise to help you along the way. You don't need to jump in immediately or in the deep end, but over time, you may want to get your feet wet, and eventually learn how to swim.
13  Topics / Robotics / Re: Simple (?) SLAM created map on: September 22, 2014, 05:01:59 pm
I'm not sure that grint understands the basic concepts of SLAM. I'm not going to claim to be an expert; my only experience with SLAM comes from what I have read, and what I learned via the Udacity 373 course (back in 2012 - so I am a bit rusty).

SLAM is - at it's core - a methodology to provide mapping and localization of a (generally) robotic platform in order for that robot to be able to determine it's location at a future time - to within a certain level of probability.

The basic algorithm is a measure-move-measure sequence - where the "measurement" is whatever data the robot gets from a localization sensor - which could be any number of things, but generally is some form of Lidar sensor, or ultrasonics - but it doesn't have to be; ultimately, it just needs to be some form of a sensing system to give the robot some kind of information about the environment it could use to determine location.

So - it measures and stores the data - then it moves in some direction - then it measures again. It then tries to get a probability about the second measurement in relation to the first - how probable - that is what percentage of chance - is there that where it moved matches some previously known sensor data? Now - of course at first nearly every measurement the robot makes will have a probability of matching of zero, or very close to zero. But over time, as more and more measurements (and movements) are made - the robot will be able to compare a measurement to its internal map, and come up with a probability that is greater than 50 percent, and ultimately closer to 100 percent. It will likely never have 100 percent certainty; noise in the sensors, slipping motors, a constantly changing environment (especially with an outdoor robot!) - will all conspire to ensure that the robot will never be 100 percent certain, but it will likely be 98 percent certain - depending on the algorithm employed and the amount of training on the environment of course.

So - what sensors could be used, then? Well - I've already mentioned Lidar and ultrasonic sensors. Both of those are actually really good to work with. You could also have outbound fiducial (or other) sensors - that sense where the robot is and relay it back to the robot (or the robot looks for the fixed sensors - in some manner - in order to localize - which seems similar to what grint wants to do). Vision sensors could also be used - basically sense the location within the environment by sensing the shapes, shadows, light, color, etc - of the environment, and making the guesses.

Any one of these (and many more) could be made to work - but in reality, you want as many of them as possible, then combine the data from all the sensors into your map; because none of the sensors will be accurate in all situations, but some will be more accurate than others in certain situations, getting multiple data points from multiple sensors for each measure will be better in the long run and likely would increase the probability levels (for example, a Lidar could detect a sound porous surface an ultrasonic sensor might miss - on the other hand, an ultrasonic sensor may well give better data than the Lidar in other situations).

But you have constraints (budget and otherwise) for a lawnmowing robot. You want something robust, easy to deploy and use. Here's a proposal:

Imagine setting up "lawn spikes" of plastic (or other non-ferrous and sturdy material - plastic is cheap, though) with a small rare-earth magnet attached to the "head". Plastic golf tees with a small disk magnet attached would be perfect. Now - place these around on the lawn in a distinctly non-deterministic manner (the closer to random you can get, the better). You want to space them about 5-10 cm apart or so, maybe more - experimentation will be your best guide.

Also - add your RF perimeter wire as well. The robot will be able to sense this edge. The robot should also have bump sensors (or some other kind of proximity sensors) to determine other obstacles. Finally, put on the bottom of the robot several hall-effect sensors in a pattern (the more the better!) - which the robot can use to sense the magnets on the lawn.

By the pattern of the magnets sensings, combined with the sensing of the perimeter wire, along with the sensing of any bump/proximity sensors - all of this information should be enough for the robot to determine its position and orientation via a SLAM algorithm. Using magnets on the lawn will reduce maintenance (and indeed, you could even do the perimeter in magnets as well) - no need to worry about supplying power, they'll also be mostly invisible (aesthetics) if pressed flush with the ground.

You won't be able to do the SLAM processing, though, with an Arduino. You'll want at a minimum some kind of powerful single board computer - a Raspberry Pi or something similar would be a good place to start; ideally, you want something that can have a lot of on-board memory to store and process the map quickly, as well as a fast enough CPU to churn through the data and generate the probability of the location, given the sensor data sensed in relation to what has been learned in the past about the environment.

Adding other sensors to the robot might be useful - maybe a vision sensor (a web camera - to sense color of grass, buildings, edging, etc?) - maybe some ultrasonic sensors (to determine rough distances to obstacles). Some form of Lidar would be great, but there aren't many low-cost systems out there suitable for outdoor usage (that said, it seems that SICK LMS-29x devices are appearing on Ebay in greater numbers recently; I managed to pick one up for about $200.00 recently, a fraction of its original new cost - a bit of work later, plus a trip to and from the manufacturer - and I had it measuring data using it's software test suite).

grint, you might want to brush up on the concepts of SLAM some more - the basic concepts, how it works with probabilities, etc. I can't tell you how valuable I found the Udacity CS373 course to be to helping me better understand SLAM, in addition to many other topics surrounding it. If you have a chunk of time (8-12 weeks or so - it's at your own pace, though - so you could go longer if you wanted), I strongly encourage you to take it. You will need to understand and be able to implement algorithms using probabilities and linear algebra - so be aware of that going in (other courses are available from Udacity and other MOOCs that can help you prepare).
14  Using Arduino / Sensors / Re: Toot bricks on: September 22, 2014, 04:20:57 pm
You could put a coil (probably require quite a few turns - maybe 1000 or so) on the inside of each face of the box, and use that as an "air-gap" transformer to communicate...?
15  Community / Bar Sport / Re: Dagu5, is it possible to replace tracks with wheels ? on: September 21, 2014, 11:20:12 am
As noted, you can replace them - but have you thought about purchasing replacement tracks? It's another possible option:

You might get in contact with this guy - he's an employee for the company:
Pages: [1] 2 3 ... 379