Arduino friends, any age, size or shape!! (Humour?)

Page 1 of 2 [ 25 posts ]  Go to page 1, 2  Next

Arduino
Hummingbird
Hummingbird

User avatar

Joined: 19 Dec 2012
Age: 58
Gender: Male
Posts: 21

12 Jun 2013, 12:10 pm

Hi, I am pretty nuts about the Arduino and I do some pretty tricky things with it. I am and have been making lots of things with the boards, plus other discrete electronics. I, am very fortunate in being able to understand and relate to a lot of differing disciplines, such as the software and hardware, plus several other skill sets not related to these. So, is there anyone who would like to join in with me on this topic, or through PM? I am an Aspie with a "default set" of characteristics, in that I get lost in my special interests, forget time, forget to drink and eat, forget about other people and forget to make contact when I should. So, if you are interested in 'sporadic' techy transmissions, I am the guy. OS X, C/C++ unix, linux and modern things are where I am at. But I can talk most things. I struggle to cope with Windows in any of its guises, because it just is not logical to me (I guess I should be sorry, but I am not) and I can easily go into meltdown with all its weird foibles, but I do know a fair amount about it. Er, have I said too much and put you off already? I love helping, but I would really really like to get to know a few like minded people. I am not good with chit chat either, but I can always have a bash at it. Hope I am posting in an okay place.



cberg
Veteran
Veteran

User avatar

Joined: 31 Dec 2011
Gender: Male
Posts: 12,183
Location: A swiftly tilting planet

12 Jun 2013, 11:56 pm

I'm a pretty serious mobile/windows/linux guy. I really need to get into Arduinos, bud don't currently have the money - I spent it all on Android gear.


_________________
"Standing on a well-chilled cinder, we see the fading of the suns, and try to recall the vanished brilliance of the origin of the worlds."
-Georges Lemaitre
"I fly through hyperspace, in my green computer interface"
-Gem Tos :mrgreen:


Arduino
Hummingbird
Hummingbird

User avatar

Joined: 19 Dec 2012
Age: 58
Gender: Male
Posts: 21

13 Jun 2013, 3:09 am

Boards can be purchased for around $15. For a beginner, a few LEDs and resistors are all that are needed, in order to see something happen. The code base is C/C++.



dcj123
Veteran
Veteran

User avatar

Joined: 2 Sep 2009
Gender: Male
Posts: 10,796

13 Jun 2013, 11:13 am

I need to get an Arduino, I have been trying to get involved in the embedded world of computing. I have a Raspberry Pi but honestly it leaves much to be desired, it has a GPIO I've been playing with but its main language is python. I want to program it in C and I realize I can even despite the main language being python but I am not a good enough programmer to write a GPIO interface from scratch without some help. Seems everyone on the Raspberry Pi's forum program in python, perl, basic and everything thats not C.



Arduino
Hummingbird
Hummingbird

User avatar

Joined: 19 Dec 2012
Age: 58
Gender: Male
Posts: 21

14 Jun 2013, 3:00 am

Yes, you will find that is the case. At first the Arduino system can seem daunting, but by trying a couple of the very simple example programs, you soon get into the swing of things. Most of the Arduino boards have an LED built in, which is connected to a known port on the micro-controller chip. For me it is a pain, because it stops some other uses for that port, but for you, it is a good indicator to show you what is happening with your first code. C++ is a lot more complex than C, but is quite a lot more powerful, in its functionality. Basic, standard C is fine to get you going for quite some time. A simple Arduino board, such as the Micro or Nano are pretty cheap too. All you need is a good breadboard and fly leads, so you can push the Arduino in and connect the fly leads (jumpers) to things. If you get the bug, there will be no stopping where you can go with this lot!

I cannot wait to wake up in the morning and get on with my projects.



MDD123
Veteran
Veteran

User avatar

Joined: 6 May 2009
Age: 37
Gender: Male
Posts: 2,007

15 Jun 2013, 11:39 am

I'm thinking about doing some basic arduino projects this summer, like controlling a stepper motor's speed and direction. I'd like to get a plant watering system implemented before winter, I haven't thought of what kind of pump or valves I'd use, but I'll probably need the mega to water all the plants.


_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.


Arduino
Hummingbird
Hummingbird

User avatar

Joined: 19 Dec 2012
Age: 58
Gender: Male
Posts: 21

15 Jun 2013, 12:07 pm

I only use a Mega for more output/input ports. The Nano and Micro have up to 20 ports, which should be enough for most projects. A stepper can be a little costly, depending upon what type you are after and the amount of steps you want. I have controlled a regular DC motor through PWM, which through coding, you can make spin at various speeds, go backwards or even stop at any point you want. You therefore have a cheap motor that appears to be able to do the impossible! The PWM frequency does need to be quite high and the circuit needs tuning, so that the motor does not draw too much current and over heat when it is stationary.

I am unsure why you need a stepper motor? Washing machine valves are cheap and easy to fit, but you would be dealing with mains voltage, which might be a bad idea, considering water and other safety things. There are 12 volt versions which would do the job. The water going through the valve(s) could be reduced by a turn valve, so you do not 'blast' the crap out of any plant!

There are easy to connect to boards (shields), which come with a variety of interfacing. Stepper one's are easily sourced, or indeed relay and other types. I normally do my own thing and do not use shields. If you do this, then although the ATmega chips can sink 40 milliamps (max) per port, you cannot just multiply the amount of output ports by 40, because the sink current is based upon the port grouping. You need to see the documentation on this. I use Darlington arrays (ULN2004), connect these to the output ports on the Arduino and then connect relays and things to their outputs, which can sink 500 milliamps. Lots more to say, but I have been told to come in for food.



MDD123
Veteran
Veteran

User avatar

Joined: 6 May 2009
Age: 37
Gender: Male
Posts: 2,007

15 Jun 2013, 9:07 pm

I'm doing the stepper motor as a separate project, I just want to control a stepper using an arduino. Sometime in the future, I want to build a cnc machine, that's a different story.

For the plant project, I'll need a lot of pins. I'm sensing the humidity of at least 10 different plants and sending water to plants that specifically need it. I'm thinking each plant will take 2 sensor pins and 1 valve control pin.

I haven't thought it all out, but I was thinking of a large, spaced out time delay between sensor readings to keep the pins from fighting for current. I'll keep an eye out for fish tank filter pumps at goodwill, if push came to shove, I could just gravity feed the plants and set up a main valve.

I haven't actually read the arduino's data sheet, I can imagine its a big document. I'll risk the confusion and take a look at it. Thanks for the I advice.


_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.


Arduino
Hummingbird
Hummingbird

User avatar

Joined: 19 Dec 2012
Age: 58
Gender: Male
Posts: 21

16 Jun 2013, 11:45 am

What you need to look for in the documentation is the 5v supply to each port group. They are A, B, C, D etc. Each port is connected in a group and each group has a certain amount of ports. They are different for each board. So, you may have 8 ports under group A and 6 ports under group B. The catch is that group B may be supplied from group A, or similar. So the theoretical maximum of 40ma per output port is ill founded, because you will see from the documentation that, for instance, group A can only supply 128ma. You will soon see that you are onto a loser. I strongly suggest you get into the habit of only running LEDs from the ports directly. Anything else, especially inductive types, like relays, run them through a transistor, switch by the port or my favourite, the Darlington array. Cheap, simple, no resistors required and pretty safe. At least your Arduino will be safe.

As an aside, you might want to try another trick I use, which is to run multiple sensors of the same type to one point. Then use just one Arduino input pin to connect to each sensor in turn and read the pin value. You can either act on the voltage found immediately, or bung it into an array and process it after the reading process. It certainly cuts down on pins and pin reading code. You could use many methods for connecting the sensors to the Arduino pin. Reed relays, transistor arrays, CMOS switches etc.

Just a thought!



MDD123
Veteran
Veteran

User avatar

Joined: 6 May 2009
Age: 37
Gender: Male
Posts: 2,007

16 Jun 2013, 8:44 pm

I didn't realize the arduino had a 448 page datasheet 8O I think I'll save it for last. I'm actually in the process of organizing all of my components, I'm making a spreadsheet of what I think is important (like Gate-Source "ON" voltage for all my mosfets). I'll feel a lot better about starting a project when I have an idea of what my components can handle.

I'm afraid if I tie the sensor readings into one port, I won't be able to discern which plant needs the watering. The sensing part today, I put two wires into a flower pot, since I was taking an analog reading through the soil, I was expecting a low value. I got an analog reading of 17 even with the leads held apart in mid-air, and 28 when I watered the plant. I'm not sure where the 17 came from, but I have a really narrow range to work with.


_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.


Arduino
Hummingbird
Hummingbird

User avatar

Joined: 19 Dec 2012
Age: 58
Gender: Male
Posts: 21

18 Jun 2013, 6:11 am

The analog ports are very sensitive, so you need to use them just the right way. When you read an analog port, the Digital to Analog converter has a very high internal resistance, so if you touch the pin, the DAC will register something, which is probable your potential difference. You always need to pass the DAC a voltage, which is born about from a potential divider. This means that the voltage it is reading is not directed at the DAC, but it merely sniffs the voltage, or spies on it. Therefore, in your example, you would need to have +5v connected to some resistance, which is in turn connected to ground or 0V of the DAC. This way, current will be flowing through the resistance and the DAC will then monitor how much the resistance, drops the voltage by. As the resistance drops, the current through it will increase and the monitored voltage will reduce. The current flow through the resistance must always happen, in every circuit you make. However, the amount of current flow, will depend upon your circuit and what you need to get the DAC to read. If the resistance is too low, then the current through it will be too high, the resistance will get hot and that is no good. Also, your power source will need to produce more current and if that is a battery, it will go flat pretty damn quick. If your resistance is too high, then it may not draw enough current. In this case, the voltage drop will only be very small and you will probably see no change when reading the DAC.

You can adjust the Arduino analogRead() sensitivity with analogReference(). It will give you something to twiddle with and see the differing outputs from the DAC.



LupaLuna
Veteran
Veteran

User avatar

Joined: 14 Jan 2013
Age: 50
Gender: Male
Posts: 1,551
Location: tri-cities WA

18 Jun 2013, 4:45 pm

MDD123 wrote:
I didn't realize the arduino had a 448 page datasheet 8O I think I'll save it for last. I'm actually in the process of organizing all of my components, I'm making a spreadsheet of what I think is important (like Gate-Source "ON" voltage for all my mosfets). I'll feel a lot better about starting a project when I have an idea of what my components can handle.

I'm afraid if I tie the sensor readings into one port, I won't be able to discern which plant needs the watering. The sensing part today, I put two wires into a flower pot, since I was taking an analog reading through the soil, I was expecting a low value. I got an analog reading of 17 even with the leads held apart in mid-air, and 28 when I watered the plant. I'm not sure where the 17 came from, but I have a really narrow range to work with.


You odda read the data sheet for the Atmil ATmega chip. Thats quite a biggy too.



LupaLuna
Veteran
Veteran

User avatar

Joined: 14 Jan 2013
Age: 50
Gender: Male
Posts: 1,551
Location: tri-cities WA

18 Jun 2013, 4:47 pm

Arduino wrote:
The analog ports are very sensitive, so you need to use them just the right way. When you read an analog port, the Digital to Analog converter has a very high internal resistance, so if you touch the pin, the DAC will register something, which is probable your potential difference. You always need to pass the DAC a voltage, which is born about from a potential divider. This means that the voltage it is reading is not directed at the DAC, but it merely sniffs the voltage, or spies on it. Therefore, in your example, you would need to have +5v connected to some resistance, which is in turn connected to ground or 0V of the DAC. This way, current will be flowing through the resistance and the DAC will then monitor how much the resistance, drops the voltage by. As the resistance drops, the current through it will increase and the monitored voltage will reduce. The current flow through the resistance must always happen, in every circuit you make. However, the amount of current flow, will depend upon your circuit and what you need to get the DAC to read. If the resistance is too low, then the current through it will be too high, the resistance will get hot and that is no good. Also, your power source will need to produce more current and if that is a battery, it will go flat pretty damn quick. If your resistance is too high, then it may not draw enough current. In this case, the voltage drop will only be very small and you will probably see no change when reading the DAC.

You can adjust the Arduino analogRead() sensitivity with analogReference(). It will give you something to twiddle with and see the differing outputs from the DAC.


I think you mean Analog-to-Digital converter (ADC)..



MDD123
Veteran
Veteran

User avatar

Joined: 6 May 2009
Age: 37
Gender: Male
Posts: 2,007

18 Jun 2013, 8:39 pm

I'm going to power the arduino with a USB wall adapter, that should be enough for the sensor readings and forward biasing any transistors. I'll check out the analogReference() feature, I'd be happy if I had a little more range to work with. Do you think overcurrent would be a problem through 2" of soil though?


_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.


LupaLuna
Veteran
Veteran

User avatar

Joined: 14 Jan 2013
Age: 50
Gender: Male
Posts: 1,551
Location: tri-cities WA

18 Jun 2013, 10:24 pm

MDD123 wrote:
I'm going to power the arduino with a USB wall adapter, that should be enough for the sensor readings and forward biasing any transistors. I'll check out the analogReference() feature, I'd be happy if I had a little more range to work with. Do you think overcurrent would be a problem through 2" of soil though?


AWOW: If you are making a moisture sensor using 2 electrodes and measuring the current flowing through them. You might want to pulse the current instead. ie. turn the electrodes on for a second to take your reading and then shut them off afterword. If you let the current run continuously. Electrolysis will destroy your electrodes and can contaminate your soil.



Arduino
Hummingbird
Hummingbird

User avatar

Joined: 19 Dec 2012
Age: 58
Gender: Male
Posts: 21

19 Jun 2013, 7:54 am

If you make a potential divider, but ensure that the soil probe is not in series with it, then the bulk of current will not be flowing through your probe. By using a high resistance, like say 100k, the current will be very small and it would take some time to damage your probes. Obviously you need to be using something non ferrous for them, but you need to research and think about this.

Yes, indeed, the last thing really you want to be doing is passing DC through soil. But I saw that the OP wanted to experiment and is as yet, not able to get into the complexities of dealing with low current AC / PWM. The capacitance library could alternatively be a good way to do what he wants, but it is still a little tricky to get consistent meaningful results from it. The issue is that if the OP is measuring many pots of soil, then the capacitance of the connecting wires will affect the readings being taken. I have used various capacitive cancelling algorithms, which cut this down quite a lot, but it would then be more than just a simple knock it together little project.

Perhaps the OP can let us know how accurate he needs this circuit to be and how durable? I have made a chlorine reactor which uses titanium plates coated in rhodium (I think, not too sure, because I am out camping at the moment). So that will withstand quite aggressive chemical reactions, but it is probably over the top for the OP's circuit. You can bung an Arduino in nearly anywhere!

Maybe other people can give better suggestions, this has been done lots of times before, for that i am sure. My though process has been on getting the OP up and running with the simplest method available, so that a running project can give more inspiration, to go on and do more complicated things with the Arduino.