New user - suggestion for correct Arduino to buy for project
Moderators: adafruit_support_bill, adafruit

New user - suggestion for correct Arduino to buy for project

by Lisa95 on Wed Jan 09, 2013 7:45 pm

Hello,

Just joined the forum and definitely new to the Arduino world. I currently have an Uno and am learning a good bit so far. I have a project in mind to use an Arduino as a "guided probe" for troubleshooting a particular circuit board. The circuit board contains some 4 to 16 decoders and some SCR's to trigger some lights.

I envision a small LCD screen to display instructions and test results; an attached "probe" with which the user will be guided to certain test points; and outputs to drive the decoders.

First question, is this too much to ask of an Arduino?

Second question, if not too much for an Arduino which one would be recommended?

Thanks for taking the time to read this. I look forward to learning more about my new found hobby.

Lisa
Lisa95
 
Posts: 5
Joined: Wed Jan 09, 2013 7:34 pm

Re: New user - suggestion for correct Arduino to buy for project

by adafruit_support_mike on Thu Jan 10, 2013 8:54 pm

Lisa95 wrote:I envision a small LCD screen to display instructions and test results; an attached "probe" with which the user will be guided to certain test points; and outputs to drive the decoders.

That's a tremendously cool idea.. sort of halfway between an automated tester and an expert diagnostic system.

Your main limits will be 'number of simultaneous I/O connections' and 'size of the code that decides what to do next'. If those numbers are small enough, the Uno has more than enough processing power to chug through the code while it waits for a human to move the probe.

As for the LCD, the Adafruit crew have an add-on board that only uses two I/O pins ( http://www.adafruit.com/products/772 ). To give you an estimate on the other parts, I'd need more specific information about your requirements.

Lisa95 wrote:Thanks for taking the time to read this. I look forward to learning more about my new found hobby.

Welcome to the party. ;-)
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10750
Joined: Thu Feb 11, 2010 2:51 pm

Re: New user - suggestion for correct Arduino to buy for project

by brownjett on Fri Jan 11, 2013 3:45 am

I installed the driver from the arduino-1.0.3 driver folder. All seemed well. I checked which COM it was, all good. Start the arduino software, select micro, COMx, open blink, compile, upload. All goes well at first, then it just stalls where it normally stalls for a second at the end but in this case that 1 second is more like 5 minutes. Then I get the "problem uploading to board" Error and it says
brown
brownjett
 
Posts: 1
Joined: Fri Jan 11, 2013 3:43 am

Re: New user - suggestion for correct Arduino to buy for project

by Lisa95 on Fri Jan 11, 2013 6:48 am

@mstone,

Thank you for the reply and suggestions. :D

So far I am able to write to the 4 by 16 decoders and get the response I expect. I modified the "Blinky" code to fit my needs. It works well and I can verify the expected outcome by using either my o'scope or logic probe. The decoders have four address lines (D3, D2, D1, D0), one Inhibit line (INH) and one Strobe (STR) line. I need six pins for input to one decoder chip (all defined on the Uno as OUTPUT. I recently ordered the Adafruit LCD add on board and will have to learn it. I read that it only uses two pins and that appealed to me. For the probe I'll need one pin on the Uno to act as a digital input reading logic levels (5V). To address the 4 decoder chips on the circuit board I need 4 ADDRESS lines, 4 INHIBIT lines, 1 STROBE line, 1 INPUT (probe) and 2 pins for the LCD. I think that is a total of 12 pins.

Right now I am working on the fault table on paper so I can develop the menu system (making sure I provide correct probe guidance). My main concern (as I've learned by reading many Arduino posts around the Internet) is that if the Arduino is coded using the DELAY function it can cause issues. Since what I have written so far is just modifying the "Blinky" code, I have a lot of DELAY calls. I feel that there must be a better way to do the same thing but just don't know enough at this point ( I will though :wink: ). I recently read somewhere about "state machines" and that sounded like may be quite useful. It was a great explanation, very simple and easy to understand, using everyday language to show the concept. I'll have to see if I can find that again, should have saved it.

So do you think my little Uno will do the job? Should I consider a unit with a bit more memory for the code? Should I consider a SD chip add-on?
I'm probably biting off more than I can chew as this may be a bit complicated for a beginner but I'm willing to try. Still have a lot to learn though.

Thanks again for your help! :D

Lisa
Lisa95
 
Posts: 5
Joined: Wed Jan 09, 2013 7:34 pm

Re: New user - suggestion for correct Arduino to buy for project

by adafruit_support_mike on Sat Jan 12, 2013 1:09 am

Lisa95 wrote: [...] I think that is a total of 12 pins.

An Uno should be able to do that. By default there are 14 digital I/O pins, but you can also use the 6 analog input pins for digital I/O.

If you need more I/O you have a few options: the Mega series of Arduinos have.. like.. a bajillion pins: 54 digital I/O, 16 analog inputs, plus much more Flash, RAM, and EEPROM than the Uno.

If you just need output, the 74HC595 serial-to-parallel shift register is much beloved in the Arduino community, as is its counterpart the 74HC165 parallel-to-serial register. Those use three Arduino pins (clock, serial IN/OUT, and a READ/SHOW the next byte strobe), but you can daisy-chain them.. a string of three '595s ( coincidentally sold here: http://www.adafruit.com/products/450 ) give you 24 bits of output from the same three pins.

One step fancier is the I2C port expander ( http://www.adafruit.com/products/732 ) which only uses two Arduino pins and gives you 16 configurable I/O pins.


Lisa95 wrote:My main concern (as I've learned by reading many Arduino posts around the Internet) is that if the Arduino is coded using the DELAY function it can cause issues.

Yes and no..

The big kids will tell you that using timers and interrupts gives you more flexibility, and they're right: the delay() function is a 'blocking' routine, meaning the processor can't do anything else while it's waiting. Timers and interrupts are non-blocking, meaning the timer can do other things while it waits. When the event you're waiting for happens, the processor stops what it's doing, runs a routine to handle the event, then picks up where it left off.

The main question is, "what will my code do while it's waiting?" For systems that watch several things at once or have complex output, timers and interrupts are great. For systems that just sort of zen out while they wait for the next event.. not so much.

We have people here in the Forum who know all about timers and interrupts if/when you want to learn them.

Lisa95 wrote:I recently read somewhere about "state machines" and that sounded like may be quite useful. It was a great explanation, very simple and easy to understand, using everyday language to show the concept. I'll have to see if I can find that again, should have saved it.

If it was this thread:

viewtopic.php?f=25&t=35384&start=0

.. you've just become My Favorite Person of the Day. ;-)

Lisa95 wrote:So do you think my little Uno will do the job? Should I consider a unit with a bit more memory for the code? Should I consider a SD chip add-on?

I'd say start off by doing as much as you can with the Uno all by itself, then move up when you start bumping your head against its limits.

90% of programming is research.. you don't have a really detailed description of the problem you're trying to solve until you've built a system to solve it. Get as much "what the heck am I doing here?" out of the way on the simplest system you can, then take on more hardware when you know exactly what you want from it.

Lisa95 wrote:I'm probably biting off more than I can chew as this may be a bit complicated for a beginner but I'm willing to try. Still have a lot to learn though.

Yeah.. you'll fit in well here.

I think everyone here is pushing the edges of their comfort zone in one way or another.. new chip, new circuit, new sensor, new platform.. we're always looking for the next excuse to say, "I wonder what *this* will do.. OBTW, where's the fire extinguisher?"
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10750
Joined: Thu Feb 11, 2010 2:51 pm

Re: New user - suggestion for correct Arduino to buy for project

by Lisa95 on Sat Jan 12, 2013 5:12 am

@mstone,

WOW! Thank you so much for the explanations. I think you are probably right and I'll take your advice on just using my Uno until I run into hardware issues (lack of pins or memory). I may take a look at the port expander but will hold off on that for now. I'm already running when I should be crawling :lol: . Heck, I haven't even put my LCD add-on together yet.

If it was this thread: ....
Yes! That was the thread! I've read so much stuff I forget where I see certain things. The explanation of the state machine was very easy to understand and it made perfect sense to me. Now I may not be able to write code for one just yet but I think the concept you provided in the manner you did takes the mystery and mainly fear out of working with these wonderful little devices. Like I said, it sounded very interesting and may have a place in what I'm trying to do but I need to work on easier stuff first.

.. you've just become My Favorite Person of the Day. ;-)
:o and I graciously accept this honor.

We have people here in the Forum who know all about timers and interrupts if/when you want to learn them.
This also sounds useful. I'll file it away and take a look at it when the time comes. I think I have more than enough on my plate now to keep me busy for a little while. You've given me some things to seek out and gain more knowledge on and I'll do just that. Right now my modified "Blinky" code code contains about 15 lines of DELAY using 1 microsecond each. I know that is not much but as you said, the machine is not doing anything else during that time. That may hurt me farther down the line as the code gets more complex.

...OBTW, where's the fire extinguisher?
Too funny! Almost like.... here, hold my beer and watch this! (not that I know anything about that) :oops:

Thank you so much for your help and wonderful explanations, I sincerely appreciate it. They are very clear, concise and easy for newbies like myself to understand. You should think about writing some tutorials (if you haven't already) as you seem to have a knack for it.

Have a wonderful day!

Lisa
Lisa95
 
Posts: 5
Joined: Wed Jan 09, 2013 7:34 pm

Re: New user - suggestion for correct Arduino to buy for project

by wdickenson on Sat Jan 12, 2013 11:56 am

This may or may not help but a long time ago (6502 days) I built an automated testing layout using a bed of nails. The board had 38 test points and each "nail" (a long pin) pressed into the board at the solder junctions. We used a multiplexer to cycle through the results and only reported ok or the components that failed. Now on a SYM this was brutal but in todays hardware it would seem easy.

The EEs added open holes at the test points after that so we could use a "peg" and that was more reliable.

I had started with a guided test but people were too unreliable.

Just some ideas.

(I also added a speech synthesizer to annouce but the techs cut the wires on the speakers immediately - demonstrating that hardware beats software every time)

wdickenson
 
Posts: 106
Joined: Fri Nov 16, 2012 8:43 pm

Re: New user - suggestion for correct Arduino to buy for project

by Lisa95 on Sun Jan 13, 2013 6:14 am

@wdickenson,

Thank you for your suggestion! :D Not quite sure how I would implement that for the board I'm working on. However, your suggestion did spawn another idea that I may attempt. If this keeps up, the project will quickly blossom into something very large and complicated. What is the term? Scope creep, I think.

I agree with you in that guiding people will be a tall task. Hopefully I can make this simple enough to follow. Time will tell.

Lisa
Lisa95
 
Posts: 5
Joined: Wed Jan 09, 2013 7:34 pm