Show Posts
|
|
Pages: 1 2 [3] 4 5 ... 92
|
|
33
|
Using Arduino / Project Guidance / Re: How to make one section of a code loop 5 times
|
on: May 15, 2013, 10:31:35 pm
|
Take another look at 'Blink' This blinks one LED five times then it goes solid ON. /* Blink This example code is in the public domain. */ int times = 0; boolean flag = false;
void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); }
void loop() { if (flag == false) { for (times=0; times < 5; times++) { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second } delay(1500); flag = true; } digitalWrite(13, HIGH); }
|
|
|
|
|
34
|
Using Arduino / Motors, Mechanics, and Power / Re: Help an art student!!
|
on: May 15, 2013, 10:09:00 pm
|
|
C'mon. Digital pot... bosh.
All that's really needed is the FET and PWM its Gate, but I'm figuring that hacking (Dremelling) traces will be a bridge too far in this case.
To use the board (and, yes, the purchase was... premature) then the cap, the resistor, and the diode to smooth the PWM for a 'nice' DC, in place of the pot., are pretty cheap and most expedient. An intrepid fellow could probably scrounge those parts (or close enough) out of a junked radio.
|
|
|
|
|
35
|
Using Arduino / Motors, Mechanics, and Power / Re: Help an art student!!
|
on: May 15, 2013, 07:29:59 pm
|
Also it doesn't seem to be able to control the direction of motor rotation.
Relay H-bridge (buy more parts.) http://forum.arduino.cc/index.php?topic=79431.0Presumably the board supplies the 5v to the pot, and reads back the value of the middle pin.... So, it "might" be feasible to put the Arduino ground pin to the Control 0v and then to PWM the Control "INP" pin from the Arduino, which will give it a "pseudo-voltage" between 0 and 5 for speed. I'm not sure JimboZA. I can't read that 8-pin IC, though. If it needs a true variable DC, PWM could be smoothed out (buy more parts.)
|
|
|
|
|
36
|
Using Arduino / Motors, Mechanics, and Power / Re: Wireing for Arduino/Relay Shield to control a cold cathode tube
|
on: May 15, 2013, 07:13:11 pm
|
So you removed the pins from D1 and D2 and made a connection to pins 12 and 8, respectively. I noticed on the tiny spec sheet given (with the purchased product) those pins on J1 are grayed out. Does that mean these pins are not being used, a waste of space? Did you arbitrarily pick these, or is there a reasoning to picking those pairs of pins to connect? Yes, the grayed-out pads are not committed to the seeedboard, they just help prop it up. I suppose that if they didn't populate them all then some people might freak. I went with 8 and 12 because they aren't PWM pins, and digital pins 2 and 3 are the hardware interrupt pins. The Analog pins can be used as digital pins, but they're on the other side of the board (longer jumper.) Are those the pins in the rectangle labeled J1? If so, what side does the increment start from? Is pin 12 the SPI library for all Arduino's, even the Mega2560? I think the "Master In Slave Out" (MISO) is 50 or ICSP-1. (Not sure what that means) Reference http://arduino.cc/en/Reference/SPIICSP is that group of 6 pins, it's for uploading sketches using USBtinyISP and other similar programmers (no bootloader.)Is the SPI Library just used for talking to other microcontrolers? I don't know the 2560. The Arduino Serial LCDs use SPI, but "serial", to me, = asynchronous serial (8N1); SPI is sync-clocked serial.I noticed you mentioned: If that's inconvenient, one of the seeed board's "D1" terminals could be jumpered to one of the Analog pins instead Is it correct that those are any of the pins in the designated area marked J4 on the seeed board? Yes, all D1s are the same, electrically; the same for the others like named - when in doubt, ohm it out (with the power off.)
|
|
|
|
|
37
|
Using Arduino / Motors, Mechanics, and Power / Re: Wireing for Arduino/Relay Shield to control a cold cathode tube
|
on: May 14, 2013, 08:06:34 pm
|
I made the modification I mentioned in the last post.   So, it's: Digital pin 7 runs Relay_1 Digital pin 12 runs Relay_2 Digital pin 8 runs Relay_3 Digital pin 4 runs Relay_4 Digital pin 12 is used by SPI libraries. If that's inconvenient, one of the seeed board's "D1" terminals could be jumpered to one of the Analog pins instead. They're brought up to the board, but they aren't used by it. Analog pins can be used as Digital pins, too. I don't like the short header pins they used. It sits way too close, double-layering electrical tape on the Arduino USB shell is unacceptable. I have some headers with longer pins, so I'll re-work it with those - and then put it in a box. You can't use it for 120vac. It's not UL-listed (nor TUV, CE Mark); I'm sure they didn't take "creepages and clearances" or other safety factors into account.
|
|
|
|
|
40
|
Using Arduino / Motors, Mechanics, and Power / Re: Wireing for Arduino/Relay Shield to control a cold cathode tube
|
on: May 13, 2013, 09:19:04 pm
|
|
Well, I hate not knowing (and seeed makes that easy), but I will not be defeated. Yes, losing those PWM pins (Digital 5&6), Ouch. I guess that's another benefit.
If you're good at this sort of thing, you could remove those 2 pins from the header on the seeed board and wire up a couple of alternates: 1) Hold the soldering iron tip on the pin on the top, heating it good, and pull the pin all the way out on the header side then 2) solder a wire (#30 / "wire-wrap wire" from R.S.) from the hole over to one of the pins on the unused header (D8 - D13) - They're there A Panavise with a base/tray is an indispensible tool (the "PV, Jr." is great) for this sort of operation.
OK, stay active here and do well in your studies.
|
|
|
|
|
43
|
Using Arduino / General Electronics / Re: question about a schematic
|
on: May 13, 2013, 07:19:45 pm
|
I'm sorry, KatjaD, this isn't rocket science, it's an LED and a resistor, but I have absolutely no idea what you are doing. the LED and resistor works with 9v. just a battery and the LED. but it doesn't light up with 18v. both batteries are new and hold a charge. would this mean i need a bigger resistor?
That is impossible. If the results of your experimentation differ significantly from the figures in the diagram I've attached here, then: 1) you're doing something wrong and/or 2) you're not doing what you think you're doing
|
|
|
|
|
44
|
Using Arduino / Motors, Mechanics, and Power / Re: Wireing for Arduino/Relay Shield to control a cold cathode tube
|
on: May 13, 2013, 06:52:30 pm
|
OK. I was so aggravated, PO'ed from yesterday that I went to RS after work and bought the seeedstudio relay shield. The "9V" is for an input voltage. There are three OR'ing diodes feeding the 78M05 regulator; one is for "9V" from the screw terminal, one is "Vin" up from the Arduino power header, and the third is from the board's power jack. They didn't provide a means of using the wall-pack voltage in/for the application. I, like you, figure they would have - but "No!" The seeed board needs power, and that must come from a wall-pack into the Arduino or into the seeed board jack. The cold cathode tubes I've seen are nominal 12V devices. Regarding the "12V source" in the drawing: 1) you can use your 9V battery (but not for very long), routing the battery leads as shown. Or 2) get another wall-pack and cut the connector off and route the leads as shown. Maybe you have an orphaned wall-pack around the house that you could utilise for this project. So ends "The Mystery of the Seeedstudio Relay Shield" > > > Digital pin 7 controls relay_1 Digital pin 6 controls relay_2 Digital pin 5 controls relay_3 Digital pin 4 controls relay_4 http://i270.photobucket.com/albums/jj118/new_clear_days/circuits/seeedrelay_zps66809197.jpg
|
|
|
|
|