HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Mar 02, 2013, 08:34 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
Quote:
Originally Posted by SadSack View Post
Excellent

Thought of this when you said you had none working attiny http://www.rickety.us/2010/03/arduin...al-programmer/
Using your pro mini you maybe able to recover it and handy when you get your fuses wrong. They can still break but trust me it bites when you get it wrong and its your last one.

Oh and you can use Reset as an IO so 6 leds
That's a good one. I will bookmark that. I am thinking of using some more IO pins so I can put two or three strobes on each wing tip since the LED does not have a very large angle of viewing. If I put more on each chip then I can have two or three facing different angles.
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Sign up now
to remove ads between posts
Old Mar 03, 2013, 08:08 AM
Registered User
lmhart's Avatar
United Kingdom, Northern Ireland, Belfast
Joined Jan 2013
113 Posts
Quote:
Originally Posted by davidmc36 View Post
This has been very educational and fun at the same time. Once I saw a bit about how code is written and how Arduino works in general I see why people like making things with it.

I bought a couple programmed chips from a guy on here and when I inquired about one that was not working correctly he was good enough to send me another chip for free and also gave me some links to the asp and software he was using. That is what he is using to make chips with LED's attached for sale, the asp, so I went ahead and bought one. Looks like the way to go for future programming. In the Arduino software I see one of the choices for programmer is the USBasp.

I have only build two Arduino projects to date - one on an Arduino FIO (prototyped on Uno) and another on the AtTiny45. Both were great learning experiences for me - the latter in how to miniaturize the duino universe big time :-)

It was the "shrinkify" video on youtube that linked to the MIT site that drove me to do it - great maker advertising!
lmhart is offline Find More Posts by lmhart
Reply With Quote
Old Mar 04, 2013, 02:35 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
Three position switch.

In the low position the light is off, in the high position it does the flash cycle, in the center it pulses very fast. I am guessing it provides the output when the pulse of specified width is present, so it shuts off when the pulse is not present. What do I have to change to get it to just stay on steady when the stick is in the center?

int x=50, y=300, z=100;
void setup()
{
pinMode (0, OUTPUT);
pinMode(1, INPUT);
}

void loop () {
z = pulseIn(1, HIGH,20000);
if (z<1400) digitalWrite(0, 0);
if (z>1401 && z<1599) digitalWrite(0, 1);
if (z>1600) {
digitalWrite(0, 1); delay (x); digitalWrite(0, 0); delay (x);
digitalWrite(0, 1); delay (x); digitalWrite(0, 0); delay (x);
delay(y);
}
}
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Old Mar 04, 2013, 02:39 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
OK Nevermind. Must have been something to do with the Rx "warming up" or something or some temporary interference cause while I was posting the above I left the Tx and Rx on and when I went back the light was on steady.
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Old Mar 04, 2013, 02:43 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
Or wait, does the 20000 equal 20 seconds?
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Old Mar 10, 2013, 02:55 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
Got a few chips and started programming them. Made a couple boards so far and ready to start installing wiring in the airplanes.
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Old Mar 10, 2013, 03:00 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
Unsure how important this is but 100nf on incoming power.
Looks just the job
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Mar 10, 2013, 03:20 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
Quote:
Originally Posted by SadSack View Post
Unsure how important this is but 100nf on incoming power.
Looks just the job
Do you say I should have a capacitor on incoming power?
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Old Mar 10, 2013, 03:28 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
yes, ceramic 100nf would be enough and i would
http://uk.rs-online.com/web/c/?sra=o...f&x=-527&y=-21
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Mar 10, 2013, 03:38 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
So in series with power in, as in going through the cap instead of straight to the Vcc? Does that keep noise from bothering the Rx?
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Old Mar 10, 2013, 03:55 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
as close as poss to pins between GND/VCC
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Mar 10, 2013, 04:17 PM
Registered User
mike50's Avatar
Rochester, MN
Joined Jul 2003
562 Posts
Quote:
Originally Posted by davidmc36 View Post
So in series with power in, as in going through the cap instead of straight to the Vcc? Does that keep noise from bothering the Rx?
You want the capacitor in parallel with the power. So the capacitor is connected to both Vcc and ground.

Mike
mike50 is offline Find More Posts by mike50
Reply With Quote
Old Mar 10, 2013, 07:06 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
Cool, thanks for that tip guys.

I have buckets of old electronics lying around,, is there any way to tell the rating of unmarked components? It would be nice to use something small like that SMT and I could put it on the bottom side in between the rows of pins. If I cut away just the right tracings I could pop it right on the board with only a small jumper.

If i use a short jumper and put the cap right on the one pole, would you put it on the negative or positive? Or does it make any difference?
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Old Mar 10, 2013, 07:09 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
Quote:
Originally Posted by davidmc36 View Post
In the low position the light is off, in the high position it does the flash cycle, in the center it pulses very fast. I am guessing it provides the output when the pulse of specified width is present, so it shuts off when the pulse is not present. What do I have to change to get it to just stay on steady when the stick is in the center?

int x=50, y=300, z=100;
void setup()
{
pinMode (0, OUTPUT);
pinMode(1, INPUT);
}

void loop () {
z = pulseIn(1, HIGH,20000);
if (z<1400) digitalWrite(0, 0);
if (z>1401 && z<1599) digitalWrite(0, 1);
if (z>1600) {
digitalWrite(0, 1); delay (x); digitalWrite(0, 0); delay (x);
digitalWrite(0, 1); delay (x); digitalWrite(0, 0); delay (x);
delay(y);
}
}
This ended up working OK. I think it was just stick positioning being right on the edge of turning on or off. I adjust the z values a bit so it is not such a small spot in the middle of stick travel that is required to stay on steady. I guess it depends on your radio what works the best. I suppose if I were to use a different Rx it might need a bit of fine tuning again.
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Old Mar 10, 2013, 07:48 PM
No bounce, No play.
davidmc36's Avatar
Canada, ON, Ottawa
Joined Oct 2010
3,584 Posts
Quote:
Originally Posted by davidmc36 View Post
....is there any way to tell the rating of unmarked components?....
Once again my friend Google came up with the answer.

http://www.instructables.com/answers...e-capacitance/

Need to use a fairly high value resistor to slow it down.
davidmc36 is online now Find More Posts by davidmc36
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question Program/configure ESC with Arduino bogophan Multirotor Talk 12 Jun 28, 2012 06:28 PM
Discussion Multiwii Arduino Programming dyarrow Multirotor Talk 3 Mar 07, 2012 10:50 AM
Discussion Arduino RC Programs/routines library Tifani Multirotor Talk 0 Nov 07, 2010 03:26 PM
Discussion Engine Run In program using Arduino board cadzilla DIY Electronics 4 Aug 16, 2010 08:21 PM