Go Down

Topic: Bootloader without turning pins on/off when booting up (Read 2 times) previous topic - next topic

Graynomad

How come the power supply is coming from an Android but the control signals from an Arduino?

That board uses optocouplers to drive the relays, pull downs would be a good bet but a schematic would be helpful.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

StealthRT


"would it still allow me to program and send it over to the arduino through the IDE?"

"File:Upload Using Programmer" is part of the IDE.
It is just a different path for getting programs into the uC - instead of the Serial Rx/Tx pins, it uses the SPI pins.
You connect a AVR ISP to the board instead of using the onboard USB/Serial adapter.


After uploading the bootloader then can i switch back to the USB since my program sends commands/listens to the Arduino serial?

retrolefty

#12
Nov 05, 2012, 05:19 pm Last Edit: Nov 05, 2012, 05:46 pm by retrolefty Reason: 1

Unless they are pulled to a safe level those pins are floating for a while after the board is powered up, they could then do anything and you relay board will follow suite. If the board uses any form of latched logic you are in trouble.

Do you have a schematic of the relay board?

Not true about the possibility of floating input condition. Most of those asian relay boards use a 'current loop' input through the optoisolators input led and are an active low input to turn on the relay (arduino output pin needs to be set to LOW to turn on a relay), so only a +5vdc wire (from the arduino) and a wire(s) from the arduino output pin(s) need to be wired to the relay board to operate the channels, no pull-up or pull-downs required and no arduino ground wire is needed to just operate the optoisolator channels. However the relay board itself does require +5vdc and ground to power the relay coils so if one is going to power the relay coils with the arduino's +5vdc voltage source then a ground is also required from the relay board to a arduino board. However that defeats the advantage of having optoisolators in the first place, so that is rather strange. However most of these relay boards I've seen have a jumper clip so that if the jumper is removed The arduino's +5vdc is not wired to the relay coil circuit but just to the optoisolators input led pins, so you are then free to use an external source of +5vdc voltage to provide power for the relay coil circuits and take full advantage of the isolation properties of the optoisolators.

Also if your going to be using the android's +5vdc to power the relay board then you must also connect the androids ground to the arduino ground for the opto input circuits to work properly, that is probably the source of your problems.

Here is a a typical asian relay board (a single channel version) which has a schematic drawing that should show better what I was trying to explain above.  http://www.ebay.com/itm/251061549983?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Lefty

_____
Rob

CrossRoads

"After uploading the bootloader then can i switch back to the USB since my program sends commands/listens to the Arduino serial?"
After  uploading your sketch via "File:Upload Using Programmer" your sketech will run the same as if you had uploaded in the  normal manner - so if it communicated with the PC before, it will continue to do so.
It will just not uoload sketches via the serial port, until you re-install a bootloader. It will start the sketch immediately after a reset.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Graynomad

Yes, so regardless of the voltages there will be no current flowing until the pins are set to outputs.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up