Show Posts
Pages: [1] 2 3 ... 292
1  Using Arduino / Programming Questions / Re: Fuzzy Logic for controlling DC motor on: Today at 05:09:14 am
Now if we supposed that the value of "Turn_Small_Negative" in the rule above is -20 and "Turn_Small_Positive" is 30 , How Could I make the two motors to spin in the given values from fuzzy control ?
Are the two outputs (Wr,Wl) of fuzzy control connected directly to DC motors of robot ?

No.... not if i understand correctly. Your outputs have direction (+ or -, say clockwise, anticlockwise) and speed (0-100) so you can't just feed those into a motor.

Assuming you have some kind of driver board with an h-bridge like say a 298 (else you can't get direction) you need to:

  • set the pair of ouputs to hi/lo or lo/hi depending on spin direction
  • pwm the enable pin from 0-255 mapped from the 0-100

What driver circuit do you have? My suggestion has a 298 type in mind: 3 pins per motor into the chip.
2  Using Arduino / Networking, Protocols, and Devices / Re: DS1302 issue on: Today at 03:25:56 am
I had a 1302 running on 5V with HK's library with no problems. It was a standalone loose chip with a loose xtal, hooked up on breadboard.

I say "had", because I leveled-up to a 1307 since I2C is more pin efficient.
3  Using Arduino / Project Guidance / Re: teaching arduino to high school students? on: Today at 02:26:53 am
I think it's important too, that everything you teach (or better, that they learn  smiley-cool ) should be part of the overall project goal. By that I mean, don't fling a load of arbitrary concepts and or techniques at them: here's why / how we have a pullup, here's how we read a potentiometer etc etc.... all of those should be in the context of what the project is going to do. That's my opinion of course, and others do it diferently.

You should have a look at Robin2's tutorial for an end-to-end example. He doesn't put it in the context of a real-world problem / solution, but gives the idea of how to go about things. Again, it's his way, not necessarily the best, certainly not the only.

A robot, as suggested by rogerClark is indeed a good idea. It gives the opportunity to show how to plan goals, learn various basic techniques. Also then when the faster students are finished and getting bored you can give them the key to the parts cupboard and let them experiment with more advanced stuff.

I'd also include somewhere along the line, a class on the physical aspects. Some of your students might never have handled a screwdriver, let alone a soldering iron, and it's important they learn that. Also don't forget the use of a multu-meter! Maybe even a scope, time and money permitting....

Maybe even mechanical stuff.... drilling, cutting... aluminium, plastic, wood... bending, gluing all that stuff. But again, with a purpose... they can make mounting brackets for sensors for example.

Safety... use of ppe, goggles, gloves
4  Topics / Robotics / Re: Unable To Use Multiple Servos On Arduino on: Today at 02:02:12 am
I do not have any CAD drawings,

Going by your profile name, you should have this already  smiley-razz
5  Community / Bar Sport / Why Q for transistors? on: Today at 01:59:49 am
I guess "T" was already taken?
6  Using Arduino / General Electronics / Re: Use a High pin to bring a pin low on: Today at 01:54:03 am
JimboZA ....  Your diagram looks perfect.  Thanks so much!

Usual disclaimers apply.... YMMV, E&OE etc.  smiley-cool

Heed Paul__B on the size of R3
7  Using Arduino / General Electronics / Re: Use a High pin to bring a pin low on: Today at 01:46:30 am
Are you saying that there is a way in software to make the 74hc165 look for high values rather than low? 

He more likely means that you could read the sensor on an Arduino pin and put its inverse out on another, and put the '165 on there.
8  Using Arduino / General Electronics / Re: Whoops! on: Today at 01:08:28 am
You could put that output into the base of an NPN transistor.
You could, but you need to do it through a 10k (or 47k or 100k) resistor.

Yep I had fixed that just before you posted....

9  Using Arduino / General Electronics / Re: Use a High pin to bring a pin low on: Today at 12:48:10 am
You could put that output into the base of an npn transistor. Emitter to ground, collector to Vin through a pullup resistor, and take your output from the collector.

edit.... v2 of schematic, shows current limiting resistor into base, and pulldown from base to make sure the transistor is open when your sensor isn't high.
10  Using Arduino / Project Guidance / Re: teaching arduino to high school students? on: Today at 12:16:28 am
The example with the blinking led is how to start.

Only if it's Blink Without Delay....

See the 'blink without delay' example in the IDE and also look up 'State Machine' and the switch-case construct in the reference pages of this site.

I'm with Henry here.... get the correct habits instilled from the start.

Here's a thought: I read some time ago of a course that tasked its students with making a note of every interaction they had with a sensor or an actuator for a day. If you could get your students to do this before coming to class that will open their eyes. Look at how much we rely on these things. You approach a door: sensor sees you, motor opens the door. You go to ATM: sensor detects your card, motor sucks it in, sensors read your key presses. This will give your students a good feel for what equipment like Arduino are used for in real life.

11  Using Arduino / Installation & Troubleshooting / Re: Arduino Uno uploads succesfully but doesn't do anything on: August 20, 2014, 11:43:04 pm
Once that happened to me. Uploaded but didn't light a Led.

But OP says:

the on-board pin 13 LED is flashing

Is the circuit complete- ie ground from breadboard back to the Arduino

It's time we saw the circuit.... you actual one.
12  Using Arduino / General Electronics / Re: Do I HAVE to use packages in Eagle? on: August 20, 2014, 02:34:54 pm
And even more reading here   got me to the point of giving the device an attribute of _EXTERNAL_ which did the trick.

(Note it's not EXTERNAL but _EXTERNAL_ with underscores, as described in the help.)


Edit.... pic attached as proof. The device XXX3 is a device with a symbol only, and no package. The device has an attribute _EXTERNAL_. It appears in my library as normal, and is dropped into the schematic in the usual way.
13  Using Arduino / General Electronics / [solved] Do I HAVE to use packages in Eagle? on: August 20, 2014, 01:52:48 pm
Hi all,

I've been using Eagle for a few weeks now, and have made a few custom symbols. I will never (well, 95% sure of that) need to use Eagle to design PCBs, and will only use it for circuit schematics.

But as far as I can see, when designing a new component, there's no way to go only as far as making the component symbol- one has to complete the package / device creation. Then it's the device that gets used in the circuit. I'd really like to find a way of creating only a symbol, with no associated package and device- I don't need them.

I realise, of course, that Eagle is the real deal and not a toy, which is why it has the sophistication it has: but I'd really like to simplify the symbol creation process and not bother with the package and device.

Is it possible? (I fear not....)



edit..... I since read here that I always need a device, but don't need a package if there are no pins. That makes sense, and it worked for me. But it also says there, that it's ok to have a symbol with only power pins, with no package. That didn't work: when I try to pop such a symbol into a schematic it moans about no package. Any thoughts?

I guess that the no-pin thing is how eg Sparkfun make their aesthetics?
14  Using Arduino / General Electronics / Re: Arduino UNO- connecitng more than one sensor on: August 20, 2014, 10:55:44 am
is there any website/book in which a similar edit is in? I'm still quite new to the arduino language so it can be a tiny bit more difficult to write my own...

I'm sure if you look at the code you'll see what to do...

For example if you have this:

#define trigPin 13
#define echoPin 12

.... you might want to go like this:

#define trigPin1 13
#define echoPin1 12
#define trigPin2 4   //just some random pin numbers
#define echoPin2 5
#define trigPin3 6
#define echoPin4 7

Give it a go and we'll help.
15  Using Arduino / General Electronics / Re: Arduino UNO- connecitng more than one sensor on: August 20, 2014, 10:43:13 am
I see what you mean now, but is there any type of external source voltage i need?

You would need to check the specs for that sensor to see if it has a bit of tolerance on the 5V... 4x 1.5V penlights might be ok at 6V, or 4x 1.2V rechargeables might be ok at 4.8. Or use a regulator if it's crucial. You'll need to read the dataheet.

edit.... this datasheet says 4.5 to 5.5V in table 4 so you'll be good with 4x 1.2V rechargeables @ 4.8.
Pages: [1] 2 3 ... 292