Show Posts
Pages: [1] 2 3
1  Using Arduino / Microcontrollers / Re: Check if pin is floating/disconnected/high-z? on: August 24, 2013, 08:53:46 am
Quadcopter and rocket engines...

If there isn't a YouTube video of this, I'm going to be sorely disappointed.

Don't worry. If there isn't now, there will be when I'm done.

a few of the pins are outputs to devices (including an array of rocket engine igniters, don't ask lol) which would trigger if I toggled them high.

You don't toggle the pin HIGH.  You set the pin to INPUT and toggle the pull-rail HIGH and LOW.  The rail can only source/sink 50 microamps (0.05 mA) because of the resistors.  Do any of the outputs connect to high impedance inputs?  That might cause a problem if the input doesn't have a pull-down or pull-up.  For example if you are driving a Darlington transistor pair to switch current to a motor, relay, or ignitor the 50 microamps might be enough to cause significant current flow.

If the pin reads as HIGH when you set the pull-rail to HIGH and LOW when you set the pull-rail to LOW then it not connected to anything with an impedance lower than about 100K.

Ahh right, I get you now! Sorry, I was a little slow on the uptake. All the stuff which is high impendence stuff is controlled via relay, so it's fine on that front.

Much the same sentiment as above - if you have rocket igniters connected to pins on the micro, you really need pull-downs - of about 1K - on them anyway.

Arguably, you should have each of them passing through a NOR gate, the second input of which is (in common) driven by a separate output pin through an inverter, requiring both a high and low output from the micro simultaneously to actuate the igniters.

Noted, and I'm adding that in now anyway as it's a sensible safety precaution, on top of all the mechanical interlocks smiley

Thanks all of you for helping! I'm going with what johnwasser recommended though, simple and effective!
2  Using Arduino / Microcontrollers / Re: Check if pin is floating/disconnected/high-z? on: August 23, 2013, 01:43:00 pm
Some pins are inputs, some pins are outputs?
Are you able to commit a 2nd IO pin for each connectorized pin?

Some are inputs, some are outputs, yes. Unfortunately I'm utilizing all but 4 pins, so I don't have another spare.

You could connect all of the input pins to a common rail with a 100K resistor each.  If the pin follows the rail as you toggle the rail HIGH and LOW then the input pin is likely not connected to anything else.  The resistors should be weak enough that they don't interfere with any actual inputs.

I thought of doing that too, but a few of the pins are outputs to devices (including an array of rocket engine igniters, don't ask lol) which would trigger if I toggled them high.

Right now my only solution I have is to monitor the pin and see how many times it changes over a 50ms period, and if it is over 20 then it is assumed floating. This isn't ideal as it's also going to be piloting a quadrucopter which for balancing reasons can't afford to suddenly be held waiting for 50 milliseconds, so if there are any other suggestions I'd still appreciate them, thanks!
3  Using Arduino / Microcontrollers / Check if pin is floating/disconnected/high-z? on: August 22, 2013, 02:38:18 pm
So, I have an Arduino mega in an inaccessible location, wired into a series of external components  (Radios, Gyros, GPS, Servos etc...) via connectors.

Now, I want to program the Arduino so that the system can give me a Boolean value as to whether each pin is connected to anything (+ Voltage or Ground), or whether it is disconnected (i.e. Floating, or as some people call it, high-z). Of course, I could poll each pin to see if it was fluctuating, but this wouldn't work for devices like the Gyro because one of the pins changes between HIGH or LOW depending on whether the gforce is above or below a certain amount.

I'm doing this so that the system can tell the difference between the gyro/servos coming loose from their connectors, or just operating normally.

So, is there a way of telling if a pin is connected or if it just left floating? Or is it not that simple?

Thanks for your help!
4  Topics / Device Hacking / Printer carriage control on: August 03, 2012, 06:28:38 am
I've got a plan for an aircraft that can fly in various orientations (I.e Rotate to face upwards in flight but carry on flying forward) by dynamically changing its Center Of Gravity (COG) along a rail. Before anyone asks, I've ran it through a computer simulation and it works.

The next thing I need to do if find some way of moving the majority mass of the aircraft (The electronics and batteries) along a rail quickly and precisely. So I've come up with the idea of using the cartridge and rail from an old inject printer (the part that moves from left to right and applies the ink). The issue is, I don't currently have an old inject printer to hand, and I want to know if this'll work before buying an old one off ebay.

Has anyone hacked the carriage on a printer before with an arduino and been able to control it and make it move to a specific position on the rail? If yes, how did they do it, and what kind of interface is it? Is it a simple stepper motor or something a bit more complicated? And is it capable of moving and holding in place 500 grams against gravity? I.e: Can it lift 500g?

Thanks to anyone who can help. If this isn't a practical way of doing it, can anyone suggest an alternative (has to be electric though. No hydraulics/pneumatics or anything like that.)?

Thanks again!
5  Using Arduino / Programming Questions / Re: Converting String "01:02:03" to int array[2] on: July 16, 2012, 02:06:31 pm
sscanf didn't seem to work particularly well for me (RE, Not at all. Not sure If I was using it right TBH though smiley-wink ), so in the end I went with the last suggestion, being as I understood it. Works good enough, Thanks so much for your help guys!
6  Using Arduino / Programming Questions / Converting String "01:02:03" to int array[2] on: July 13, 2012, 10:44:58 am
So I've got a GPS unit that send the time to my arduino in form XX:XX:XX and I want to take the integers from this and place them in an integer array so that int[2] is the seconds, int[1] is the minutes and int[0] is the seconds. I've tried various combinations of String.charAt, String.substring and atoi, and all I've gotten is nowhere due to an immense amount of errors.

Please help!

Thank you so much!

An example of what I want doing, in case I've explained it badly up there:
'String time = "01:02:03"' going into 'int currentTime[2] = {1,2,3}'
7  Using Arduino / Networking, Protocols, and Devices / Change Baud Rate of SoftwareSerial Communication after initial .begin on: July 11, 2012, 04:00:44 pm
I've got a GPS device that does not remember its settings once switched off, and I can't keep it switched on all the time. Its default baud rate that it will always start at is therefore 9600. However, I can configure it through serial to go to a higher baud rate, which is required for a function I wish my program to have.

I can send the change baud signal fine, but then of course I need to change the baud rate of the arduino to match it, otherewise I just get meaningless squiggles.

Can anyone help?
In case that explanation is a bit confusing, here is what I (essentiallu) want to do in code:

mySerial.write("XXXXXXXX"); // string to send to change baud rate
  mySerial.write(13); // returns to accept change
  mySerial.write(10); // ^^^^^^^^^^^^^^^^^^^
mySerial.begin(38400) // ISSUE: How can I change the baud rate HERE!

Thanks everyone who took time to read this and especially anyone who can help!
8  Using Arduino / Microcontrollers / Re: TTL voltage level? HELP! on: June 22, 2012, 10:25:42 am
Ahhhh okay, thanks! the MT3329 has a USB option so i'll try that. If thats bad, I'll know I've damaged the chip. If its good I'll get a translator, Thanks! I don't suppose you'd know the part number/ chip number of the kind of translator I'd need to get?
9  Using Arduino / Microcontrollers / TTL voltage level? HELP! on: June 22, 2012, 09:57:10 am
So I got a MT3329 GPS chip and I'm trying to wire it up to my arduino Duemilenove. I'm relatively new to this aspect of electronics so I thought that this would be a relatively easy but informative project. So far, though, I've got nothing from the module. The MT3329's TX pin goes to the arduino RX pin, and the Arduino's TX pin goes to the MT3329's TX pin. However, when I test the voltage level of the arduinos TX, I've notices that its 5 volts.With the Module, its ~3.3 volts (around 3.4 volts)

My question is this:
Can the arduino read 3.3 volt TTL logic levels, hence why I don't seem to be getting data from it? If it can't, what do I need to scale the module's 3.3 volt logic to the arduino's logic level? Is it a simple transistor, or more complex?

Little background: I've tried reading the chips serial data by: Using the software Serial library, Also writing to eeprom from the default TX/RX when the arduino is unplugged, all to no avail?

Please help ASAP as I have an entire weekend at which I can do whatever I like, which can't be said for the week afterwards :/

10  Forum 2005-2010 (read only) / Syntax & Programs / Re: Diy EEG? on: November 20, 2010, 02:42:10 pm
Does it work? What exactly does it detect (i.e. concentration, Brain usage, Emotion strength)? and where are the electrodes and grounds placed on the head?
11  Forum 2005-2010 (read only) / Interfacing / Re: FirmataVB Help!!! on: September 01, 2010, 08:44:41 am
Yes, you need to upload the standard firmata sketch to the Arduino. Select File + Examples + Firmata + StandardFirmata (or one of the other examples).

Just tried that, still no success. Any more advice?
12  Forum 2005-2010 (read only) / Interfacing / Update on: September 01, 2010, 07:44:52 am
Update: also, the RX light flashes briefly just after i send the command, but Thats all that happens
13  Forum 2005-2010 (read only) / Interfacing / FirmataVB Help!!! on: September 01, 2010, 07:40:06 am
I am making a model rocket 'launch-box' that ignites a rocket engine from computer control, and then takes a picture through the computers webcam.
I've made the application in Visual basic 2008 and it works well.

Now I have the arduino interfacing to deal with. I'd implemented the Firmata VB Dll into my project, assuming that when the time came and the board was delivered, it would work. I've tested all the digital and analogue pins through arduino's own software and programming language, and they all work. BUT (and here's my problem)

When I try and manipulate any of the Inputs/Outputs in Visual Basic, even on the samples that FirmataVB came with, the arduino gives no response.

Have i done something really stupid, or is this an actual problem? Do i need to download a FirmataVB sketch onto the arduino (and if so, where can i download it?)?

I'm using an Arduino Duemilanove, and on COM 34.
Please help as soon as possible and thanks in advance   smiley
14  Forum 2005-2010 (read only) / Development / Using an NDS touch-screen with arduino on: September 12, 2010, 10:17:42 am
Hi, I've made this Programme that runs on a computer that generates arduino code that lets users create 'hotspots' on a Nintendo DS touch screen. The hotspots act like buttons, as in when a hotspot is pressed, it runs the code that corresponds to that button. The thing is, I'm not sure if it works, because I'm still waiting for a breakout board for the Touch-screen. Could anyone who's trying to use an NDS touch screen with an arduino try it out, see if it works and perhaps give me some improvements I could make to it?
you can download it at:

Thanks in advance!
15  Forum 2005-2010 (read only) / Interfacing / Re: Making arduino wireless! on: November 05, 2010, 10:49:03 am
Thx! Now I know what kind I need (General)! Could you (or anyone else) Suggest a unit (Tx and Rx) that will get to 300+ Meters line of sight? And will I need another arduino to connect the Rx module to USB or is their another way? I'm assuming you just attach the DATA lines to the serial Tx and Rx ports on arduino?
Pages: [1] 2 3