Show Posts
Pages: [1] 2 3 ... 14
1  Using Arduino / Programming Questions / Re: Is it possible to reduce a sketch size be modifying libraries? on: January 20, 2013, 10:47:46 pm
You might also want to check your data types. If you are using integers where bytes will suffice, you can save a lot of room depending on how many you are using.

Strings are also very expensive. If you are using a lot of fixed strings, it is better to store them on your SD card or stick them in the flash memory instead using the progrmem option.

A quick google on Arduino Strings had a link to someone dealing specifically with an http client app that was causing him grief because of the size of the strings.

2  Using Arduino / Project Guidance / Re: Long-life Battery Powered Project on: January 04, 2013, 01:11:49 am
You need to look a little deeper into how Regulators work. A standard or switching regulator is not going to work. A 5V regulator as a dropout voltage at around 1.3V. This means that when you get within 1.3V of the target voltage, the regulator will stop working. Since 6V is not greater than 5V + 1.3V, it will not work.

This is one of the reasons that a 9V battery is not a good choice for the Arduino. Once you get to about 7V it no longer works making for some really poor utilization of the battery.

You will need to use a LDO regulator as a worse case option or a boost convertor as the best option.

3  Using Arduino / General Electronics / Re: Transistor Problems on: December 29, 2012, 12:04:42 am
And its an UNO R3
4  Using Arduino / General Electronics / Re: Transistor Problems on: December 29, 2012, 12:04:24 am
It overheats on both USB and supplied power through the jack.

5  Using Arduino / General Electronics / Re: Transistor Problems on: December 27, 2012, 11:41:01 pm

I have already replaced the Chip and this did not eliminate the overheat. The chip itself is not overheating it is other components on the board. I don't have one in front of me at the moment to tell you which component it is but it is around the crystal and regulator. It actually gets too hot to touch.

I have one more chip that I could try but I replaced the chip once and uploaded a simple blink and disconnected everything from it to make sure that I didn't damage it as well. Since the Pin 13 LED won't come on anymore and I cannot get an output from 12 or 13, I am thinking that something is shorting to ground. I used this one as the 'remote' with a 9V battery and it burned through that battery in about 30 minutes with only an occasional output to an Xbee. When I say occasional, I mean once every 3 or 4 minutes. I have access to a clamp on ammeter at work. I was thinking about comparing the two boards I have from the source and seeing what I get.

6  Using Arduino / Project Guidance / Re: LED current limiting resistor on: December 27, 2012, 05:19:01 am
I am pretty sure you are going to have a problem using a simple 3.3V regulator with a 3.7 lipo.

Dropout voltage on a typical 3.3V regulator is going to be a little bit over 4V. So if you fully charge a Lipo and pump it through a standard 3.3V regulator you are going to have a very short life cycle if at all. I don't remember the exact number but at 4.2V, your regulator might be supplying less than 3.3V right out of the gate and it will fall off rapidly from there.

Even a Low Dropout Voltage Regulator is going to struggle in this case since your operating voltage is so close to the maximum voltage of the battery.

What you need is a Boost Convertor that will regulate your 3.3V down to less than 1V.

Here is one from Sparkfun that would work perfectly for what you are trying to do:

This one is even better since it has a a charge circuit built in as well and is only about $5 more.

If you already know all of this then I apologize.

7  Using Arduino / General Electronics / Re: Transistor Problems on: December 27, 2012, 04:59:29 am
Didn't want to leave this hanging.

Mike, you were right, a simple resistor on the base and I was in business. Everything worked like a charm. You saved my wife's Christmas show!

The only negative is that I now have an Ardiuno with two bad outputs on pins 12 and 13 and it is overheating severly indicating a short somewhere. I can live with the bad outputs but I need to find and isolate the short(s) in the board. It isn't the chip, I have spares and replaced it and it still does the same thing.

The upside is that I understand transistors a lot better than I did before.
8  Using Arduino / General Electronics / Re: Transistor Problems on: December 09, 2012, 07:14:38 am
If I change from a 19V supply to a 9V supply, everything works like it should. Does this make sense?

At this point I am just going to use the 9V. All I have to do is let the motor unwind a cable attached to a spring loaded Umbrella. Since I don't have to wind it back up, I don't need full power on the motor anyway.

I would eventually like to make this work bi-directionally which will require some form of h-bridge so need to understand what I'm missing here.

9  Using Arduino / General Electronics / Re: Transistor Problems on: December 09, 2012, 05:54:56 am
I have a TIP120 NPN but it has been kicking my butt as well.

Here is the wiring for it:

Power + to Motor +
Motor - to collector (middle pin)
Emitter to GND
Diode between Emitter and Collector
Power - to GND

As soon as I connect the Power -, the motor runs. If I short the Base pin to either side, it doesn't matter. The motor always runs. Is it possible the transistor is bad? I believe I already ruined my one ULN2003. It has a max current draw of .5A and I am fairly certain this motor is drawing considerably more than that.

10  Using Arduino / General Electronics / Transistor Problems on: December 09, 2012, 03:58:31 am
I have a TIP42 transistor and I am trying to drive a Car Window Regulator motor at 19v. My wiring path is as such:

Power + to emitter
Motor + from collector
Motor - to GND
Power - to GND

I have a capacitor between the Emitter and Collector.

Now to my problem. If I connect the base back to the 19V power supply positive, the transistor turns on and the motor drives. If I remove it the motor stops. This is how it's supposed to be. My problem is that I cannot seem to turn the transistor on and off with the Arduino. If I connect pin 13 to the base and the Arduino GND to the same common ground as the other two, nothing happens. Actually that's not true, I have blown both pins 12 and 13 on my Arduino. I hope it's just the chip since I have spares and not the board. I just can't seem to figure out what I'm doing wrong. I have a ULN2003 but only one of them. I have been tempted to try using that but I don't want to fry it because I need it for other things.

The specs on the TIP42 are as follows:

Collector to Emitter 40V
Collector to Base 40V
Emitter to Base 5V
Current 10A

Am I just wiring it wrong? It is a PNP transistor. Do I need to but a resistor in the Base path? If so, why?


11  Using Arduino / Project Guidance / Re: Arduino Nana + Batteries + GSM Module - possible or not? on: December 06, 2012, 08:40:29 am
One clarification here. An Arduino can run at 3.3V or 5V. It does not have to have 5V. Therefore a single LiPo will run the Arduino. It is even better if you can source your peripherals to use 3.3V as well. This is becoming much more common and it should be no problem finding what you want in a 3.3V variant.

12  Using Arduino / Project Guidance / Re: Help on using Galaxy S2s' NFC to start my Motorcycle... on: December 04, 2012, 11:34:44 pm
Not sure how NFC differs from RFID but do you even need an app? With RFID, the card itself is most often passive. It needs a generated field produced by the reader to give up the goods. The only major difference in the phone NFC is that it is 2 way communication, meaning that a phone can both provide NFC data and read NFC data. Thinking about the way the bump to share feature works on an android (with the caveat that I have a Nexus 7 with android but not a phone), I was under the impression that if you have a picture up that you want to share you simply get close to another phone. Do you have to tell it to share, or is it automatic? If it is automatic then I would argue that the NFC transmit side is passive so that it waits for another device to come close enough to it to read it's code then the two devices decide what to do to each other. This may be completly wrong but if it doesn't work this way then you might as well use BlueTooth if you have to go through other steps. The same is arguably true for your motorcycle plan. If you want to send a signal to the bike instead of simply waving your phone close, then why not just use bluetooth? Bluetooth is slower but you are talking about transmitting such a teeny amount of data that the timing difference would not be noticable.

If you are using an app to send a specific code to the arduino then yes it could be hacked much easier than a simple RFID type read. It would be much more difficult to hack the RFID reader. You could definelty use a lockout after x number of attempts in your code with the key turn used to reset it if you go this route. I think you almost have to buy a 13.56 reader and see what it sees when you get the phone close to it. That's where I would start. I have done some digging and just can't find enough info on how NFC works so I would start from the beginning. Along with the reader, make sure you pick up a couple of pre-programmed tags so you can verify that your code is working. Once everything is a go, hold your phone close to it and see if you get anything. If you don't then you would need an app. If you get something I think it is safe to assume that whatever code you get is unique to your phone and you wouldn't need an app. If you are worried that someone could steal your phone and steal your bike, it is no different than someone stealing your keys except most people aren't going to know they could steal your motorcycle with your phone :-)

I did just watch a video where someone held the phone close to a RFID/NFC tag and it read the tag and gave you options on the phone. The video quality was too poor to see what the options were though.

Reading through your last post one more time, If you are correct and you have to have an app to send the correct data via NFC, then you are on the right path.

13  Using Arduino / Project Guidance / Re: Help on using Galaxy S2s' NFC to start my Motorcycle... on: December 04, 2012, 12:31:35 am
I suspect that the NFC is unique to the device. Limited googling somewhat confirms this but not 100%.

As far as power there are several options but here is what I see as the best. Since you already have 12v power available on the bike, it is best to power the Arduino through a voltage regulator from your bike's 12v. As you noticed, there is a 5V and a 3.3V available. Since you will be starting with 12V it is best to use the 5V Arduino. You are going to be dropping a lot of voltage even so which is going to generate a lot of heat in your Voltage regulator. a 7805 regulator can be had from radio shack but you wull need a couple of other components to make it work. Google 7805 Voltage Regulator and there will be plenty of diagrams to built the circuit. You will need to use a heat sink on the voltage regulator. There is a mounting hole provided and I think you can get them at the Shack as well.

Once you have your 5V power to the Arduino, you are going to want to control your 12V system through transistors. They are very simple to use and can also be had from radio shack. You can get multiple transistors on a single chip if you need it. A transistor acts as a switch. You supply 5V activation signal from the Arduino and it allows 12V to pass through. This 12V is isolated from the Arduino by the transistor. It is very similar to a relay. In fact, you can use relays instead. There might be current draw concerns but since you should only be sending the ignition signal to the starter anyway, I'm fairly certain the starting current does not pass through the ignition switch. If there isa  high current draw, it would be wise to use relays instead. You can find solid state or traditional electromechanical relays through Sparkfun.

One thing you will need to be cautious of. In order for this to work, the Arduino needs to always have power. This means there will be a constant drain on the battery. In order to minimize the impact of this, I would do two things. Include a manual switch that can kill power to the Arduino so when you put the bike up in the winter you can just turn it off. Also, look into low power sleep modes. There are multiple sleep modes that you can use on the Arduino that will dramatically reduce the power consumption. In order to use this, you will need to pick up the read pin on your RFID reader. This will send a signal telling the Arduino that it has data coming. Attach this to an interrupt pin that wakes the arduino and you are in business.

Also keep in mind that your existing start button will have to be wired into the circuit to allow for an either or situation.

I'm sure you have already considered this but the Arduino needs to know when the bike has started. For example, you turn the key push the start button until the bike is running then let it go. the Arduino won't know when to let it go. Your initial thought may be to hold the phone close until it is running and then move the phone. But what happens when you accidentally get the phone in range when the bike is already running. This would wreak havoc on the starter so the Arduino needs to know when the bike is running so that it disables the start circuit. Feedback from the bikes alternator circuit or voltage regulator might be the best method. However, remember that the Arduino can only take a 5V input so a voltage divider might be used to step the voltage to the arduino down to usable levels. An analog signal is what you are looking for. Using this method might depend on how the voltage regulator/alternator circuit works on the bike. If the VR is putting out voltage while the bike is starting then this won't work.

Once all of that is working, the next thing to do is get rid of the key as well. Since you can't always leave the key in and on, at this what you are building is actually slower than the existing start system. If you can use bluetooth or wifi to tell the phone to 'turn the key' then use the phone to start the bike, that would be awesome.

And while I am at it, you might be wise to include a way to add a new 'authorized' NFC tag. What happens if you lose your phone. Short of re-programming the Arduino, while admittedly simple, it would be much cooler if you could but in a safe way to add more devices. For example, with the key on, the horn button depressed, and the left turn signal on (pick these signals up in the Arduino) if you scan a device that is not already in the system, it will add it. In theory you could add any 13.56Mhz RFID tag this way. Store this data on EEPROM which is insanely cheap and easy to use.

I will close my rambling with a note of encouragement. I am an avid programming. While I have taken a single semester class in each over the years, I am almost entirely self taught. I have found that having a goal makes learning that much more fun. While I am still a novice at C#, I am a professional level programmer and enjoy making money on the side with it. Next I'm on to Java for Android and Unity3D. If you can make this all work, you will have expanded your knowledge dramatically and will quickly be looking for what you can do next. I am currently building a Time Machine prop for my wife's children's choir using Arduinos and Xbee's so I can control it remotely from the audience!

14  Using Arduino / Project Guidance / Re: Help on using Galaxy S2s' NFC to start my Motorcycle... on: December 02, 2012, 11:28:59 pm
Cool project.

So a little googling led me to adafruit's shield This thing is pretty massive though so it won't really fit your needs. However, it shows that the technology is there.

Reading through their description implies that NFC operates at13.56Mhz

So I headed over to, since it is my favorite electronics site and they have a reader module that operates at 13.56Mhz At first I thought this wouldn't be enough since I am not sure about the similarities between RFID and NFC. However, if you read a little deeper into the comments section, it states very clearly that it will read Android NFC. This module is also small (approx. 1" x 1.5"). I would suggest an Arduino pro-mini for size and you are off to the races. There is a lot of work to do to get this where you want to go but this will steer you in the right direction.

15  Using Arduino / Project Guidance / Re: Project feasibility and cost on: December 02, 2012, 11:07:01 pm
Good point Paul. In fact, we have the same situation here in Tennessee where there are peak usage times. I did not take that into account.
Pages: [1] 2 3 ... 14