SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By EdNerd
#187431
Sorry if these questions are really basic and general, but I'm looking into getting started with arduino and the sheer amount of stuff I've never tried to absorb before is kinda overwhelming. I'm an old guy in a new world, and I'm having a hard time finding the right tree in this big forest! Web and forum searches just give me a pile of info I don't understand. If someone can drop-kick me towards some really basic stuff, I'd appreciate it.

I got started as an electronics tech in the mid-70s, and worked in various capacities like that through the 80s. I've worked on everything from radars to microwave ovens. But it's all been component-level stuff - I've never worked with a microprocessor like the arduino before. And the last time I did any kind of circuit building, it was TTL gates and a 555 timer. Currently, I do some Visual Basic programming for Excel and Access, so writing the programs should be okay - but again I'm used to cobbling together components to do things, not sending instructions to a chip.

One thing I do remember about breadboarding was that once you got your circuit working, you had to find a way to get it off the plug-in board and onto a soldered project board. I'm looking at an arduino starter kit with a breadboard, and I'm wondering the same thing: after I get the breadboard working, what's available to get it in a usable form? I remember we used to have small solder boards with the holes and lines set up like the plug-in breadboards - you just took the components and jumpers off the breadboard (after you took a picture and let the Polaroid dry!), stuck them in the same spot on the solder board, and dotted solder as required. Much of it was not very pretty!

I was also wondering about how to decide which arduino is right for the project, since there seem to be several different models. For my first project, I'm looking at a metronome, where I can tap a switch and set the tempo for a light to flash. I found a web page with plans for just such a thing using a piezo for the tap input. I'd rather use a physical switch. I remember having to buffer switch inputs with NOR gates because you always got some bobble from the contacts. Do you still have to do that with the arduino?

I assume the chips have a built-in pulse generator (otherwise they couldn't remember milliseconds) - but how many memory slots do they have? I'll need to store three to five time captures and then average them - is that all in the program script? Or do you need external components? Can I use the same time pulse for delays (if there's been no input for this long, start a new program; if the input switch stays high for more than 5 seconds, clear everything and stop; etc.)??

Looking forward to any assistance anyone would care to give.
Thanks!!
Ed
User avatar
By Ross Robotics
#187439
you had to find a way to get it off the plug-in board and onto a soldered project board.
After the breadboard, there are several choices. They fastest one is using a perfboard:
Image
Image
Image

If you want it to look a little more professional, you can use a PCB CAD software to design a PCB from your schematic. Eagle CAD is the top choice for hobbyist as it's free for personal use with just a few limitations. After you've designed the board, there are several manufacturers. There are tons of video tutorials and several members here that are proficient with Eagle, so just ask!
OSH Park is a great fab house with low turn around time, about 2 weeks, mostly less time.
Image
Once you get the boards and the components, just assemble it.
We use Digikey and Mouser for the uncommon parts you might use, like the uC. For more common parts like resistors, caps, and connectors, you can use Ebay or an electronics store.
how to decide which arduino is right for the project
There is a lot of choices, but the most common is the UNO. Most of the time it will have everything you need to get started. Lots of tutorials and community based code sources. The best way to get started on your specific project is to search Google and see if anyone has documented their experience. Chances are that someone has. From the info you stated, you wouldn't need external components, but can't give details until you give specifics on your project.
By EdNerd
#187441
They fastest one is using a perfboard:
That's the one I remember!! Wow - it's survived 40 years later??
The best way to get started on your specific project is to search Google
Roger that!! And I found a project near identical to what I want to do here:
https://www.youtube.com/watch?v=Ywn-gxen6to
There will be some modifications, of course. (When did we ~ever~ follow the schematics exactly??)

Here's what I had in mind:

At a glance:
Tap a foot switch, and the device remembers the rhythm and flashes a light in time to your beat timing. Tap in a different beat, and the device remembers the new timing. Holding the foot switch down for an extended time (5-10 seconds) stops the light.

My thoughts on the inner workings:
-- Initialize routine that clears everything at power-up, and on the first foot tap after power-up or about 15 seconds of no input.
-- Each non-initial foot tap captures the count of pulses since the previous tap. After at least three counts, the pulse count is averaged. Successive taps simply add into the average. Probably only need five or six counts in the mix - newer counts can bump the older ones.
-- An LED flashes every time it reaches the average pulse count.
-- After about 15 seconds of no taps, and on initial power-up, a state occurs that tells the processor "I'm ready to initialize a new count". So if I keep tapping and never let it set for 15 seconds, the processor will keep adjusting the average count until I'm happy with the timing of the
light flashes.
-- After I stop tapping, the flash pulse will loop indefinitely until I hold down the input switch for 5 to 10 seconds which clears everything and turns off the light.
-- If the arduino can handle all the pulsing, memories, and time-to-flash averaging and output pulse, then the only other concern I'd have is buffering the foot switch to eliminate mechanical contact bobble giving me spurious multiple pulses.

Make sense??
Ed
By EdNerd
#187455
Something occurred to me last night - I think I'm thinking of the arduino incorrectly.
For this project, I'm looking at storing numbers (counts of milliseconds) and averaging them.
In the old days, you'd take pin 3 HIGH, load your pulses, then drop to LOW to lock in the memory.
And repeat to read and write (access the "physical" (electronic) storage are of the chip).

But this is all done in a code script ("sketch"), yes? I assign variables and manipulate numbers in the sketch.
(Same thing I do in my VB routines - yes??) So I'm not dealing with how many memory slots in the chip, right?
(Sorry if I've lost anyone with the old TTL references - like I said, it's been a while!)

If I've got this right, it makes things a lot clearer and easier!!
Ed
By motopic
#187462
Yes, there are no 'slots', feed your 'pulses' into a analog or digital pin, and the 'sketch'(i.e. software) can keep count.

Put your reset button on another digital pin to 'reset' the count to zero.

Put a internal 'counter' in the main loop of the software to act as your 'timed' count reset, or pulse count.

Buffering the foot switch, (i.e. debouncing the switch) is also done in the sketch, you read the input over a small time, to determine state.

3 ways to go off breadboards.
1) if your setup is small, and mostly arduino, add a small 'shield' board to your Uno or whatever flavor arduino is out now.
2) if you have more off-arduino stuff, I use a RBBB from ModernDevice, this can be soldered to a perfboard, and has a really small footprint (and ac input if you need it for power). I love RBBBs.
3) if #2 is true, but you need a lot more computing power I use a Teensy from PJRC
By EdNerd
#187554
I'm looking at starter kits and came up with another question. Most of the kits come with an Uno on a board with lots of header strips. I see other boards are available seperately with solder pads. Do you keep the starter kit board for designing, and usd a smaller board for your final project?
User avatar
By Ross Robotics
#187559
most people do, yes. Use the one with headers for ease of prototyping, then for the finished product, have a board that you solder wires on to directly.
By motopic
#187614
EdNerd wrote:I'm looking at starter kits and came up with another question. Most of the kits come with an Uno on a board with lots of header strips. I see other boards are available seperately with solder pads. Do you keep the starter kit board for designing, and usd a smaller board for your final project?
Yes you can do that.

Thats why I use a RBBB, its small enough and openhardware, I can develop with it on a breadboard, but then I can solder it directly to a main or carrier board, or transfer the design to a custom pcb.

a teensy is so small, just solder it to a mainboard type design.