Show Posts
Pages: [1] 2
1  Using Arduino / Storage / Re: Integrating weather, camera, xbee, and SD shields together fails, works seperate on: April 25, 2014, 07:18:03 am
I re-built my program one shield at a time.

I discovered the errors started after importing the wire library - without even using it.

Some more research around "library conflicts" and I discovered I had most likely run out of SRAM!

As per the memory tutorial, I surrounded all my static (message) strings with F(), and all my problems vanished!

The UNO is a lovely device, but you have to remember its not a desktop PC with near-infinite resources....
2  Using Arduino / Storage / Integrating weather, camera, xbee, and SD shields together fails, works seperate on: April 22, 2014, 08:01:33 am
I'm building a remote environment monitor that can take measurements and photos on demand.

I tested each shield by itself, then modified each shield to avoid conflicts - I had to cut and re-route one trace.  Pin 8 is the SD Chip Select for the SD Shield, and an status indicator output on the weather shield.  I just cut and jumped it over to pin 9.

When I initially integrated all the parts into one file (below) I could log data and photos to the SD card.  The only problem I seemed to have was getting the photos over the xbee link - and that seemed to be my fault.   As in not splitting out the data from my status messages properly. 

So I focused on that, and when I thought I had it working I was surprised to find my image viewer (Irfanview) still said DCT 11 (or 10) was bogus.

I powered off the UNO R3 and pulled out the u-SD chip, put it into a USB adapter, and all the JPG files are zero-bytes! 

Then I noticed that my data logger command was getting an error too.

This is when I loaded back the SD data logger by itself, which worked fine.  Then the Photo taker by itself, also fine.

So I commented out the line(s) that echo the data over the serial link.  Still zero-byte photos.  I put back some code I had removed (sending periodic dots during the save) in case this is some weird timing issue.   No change.

I'm stumped.  I'm still trying to think of what I can try next, but I would appreciate any insight others might have on this issue.

I do all of my messages through send_msg() instead of Serial.print() so I can switch the communications over to the xbee on its on serial port (2,3).  I have not gotten that far.  I have been doing all my testing from my control program in Python, and Serial Monitor.
3  Using Arduino / Programming Questions / Re: Tone lookup table on SD card on: April 21, 2014, 07:07:05 am
The problem is if you put everything into one file it will be "big".  Then you will open that one file and search through it for what you want.  It is this searching that will be slow.

You have to think of a clever way to do this.

For example, you could break your data down into 512 (or less) blocks - multiple files.  Then use IF or SWITCH logic to figure out which file you want, and read it in quickly.

That might lead to a lot of lines of logic in your program.  Maybe more memory used by that than just storing the data in memory.

How about putting each value in its own file?  This would result in a lot of files, but that will not affect speed.

This would also make your program logic easier, since the value you want becomes the file's name.  You can even read-in the directory of file names and do some searching through that looking for the closest match.
4  Products / Arduino Due / Re: Due SimpleAudioPlayer, problem playing multiple files on: April 21, 2014, 06:47:52 am
Please post your code so we can check it.

If you play the "other" file first, does it still have pauses?

Is it always the file you play second that has pauses?

What if you play the first file again?
5  Forum 2005-2010 (read only) / Interfacing / Re: IR hex code decoding on: May 29, 2010, 04:16:46 pm

You should start a new thread, your problem is not related to this thread.

And by the way, humans don't hear very well above 20 KHz so our audio equipment tends to stay below that.   Most IR controls are around 40 KHz.  So your audio recording is not likely to play back well enough for the receiver to recognize it as a valid signal.

There is an Arduino project for a universal remote, and another for web access.  Merge the two and your in business!
6  Forum 2005-2010 (read only) / Interfacing / Re: IR hex code decoding on: May 28, 2010, 02:42:49 pm

I think your interpretation is correct. However, consider these points:

1. The first number is "0000", which means "learned code" so the timing numbers might wander a bit.
2. On the 3rd page (irdisp3) they decode a Sony code and note that Sony "likes" to monkey with what data gets sent.
3. They also mention that there is no standard, and other mfrs can do as they please.

So, there is no guarantee that the code your looking at is a "simple" sequence of binary pairs.  Epson might have added in some other special numbers for their own nefarious purposes.  A google search might uncover their true meaning.

However, as long as the code sequence works - why worry about it?

I want to know how your going to use this data?

I guess the thing to do is set up a PWM at your modulation frequency, then turn it ON/OFF for the times given in the codes - just ignore the first 4 numbers, unless you want to make your software "smart" so it calculates the modulation frequency from the second number.

When I search Arduino for "Pronto hex" I get a bunch of hits, perhaps there is already some code for handling this?

I did a google search for "Pronto hex converter" and found lots of sites offering software to convert it into binary or hex numbers - but don't forget that might not work if those "odd" pairs are Epson-specific codes.

7  Forum 2005-2010 (read only) / Troubleshooting / Re: Question about MAX7219/7221 on: November 04, 2010, 09:07:18 pm
It is my pleasure to help those the same way I was once helped by others.  Heck, the way I am STILL helped by others!

We live on a very small, round planet that spins in circles.  Consequently we are dizzy all the time.  We need to work harder on working together instead of working so hard to pull apart from each other.

I use Eagle for my board stuff.  I recommend you get the free version, I certainly can post or send your schematics - time permitting.  

Eagle is very easy to use, even a programmer can figure it out.....   smiley-wink
8  Forum 2005-2010 (read only) / Troubleshooting / Re: Question about MAX7219/7221 on: November 04, 2010, 01:52:58 pm
I would try the 74HC04 since you have plenty.  

Assuming you are working on an experimenter's board where you just push wires into holes to make connections, its easy and fun to figure stuff like this out.

I can't recall off-hand if the 74HC04 series chips use voltage levels compatible with the MAX7219.  I would try that first. That is, put DIG0 and DIG1 into the 74HC04 and a voltmeter or LED/resistor on the output and see if it goes on/off when you put large numbers into the 7219.

In fact, since I prefer to build upon what works, I would put a standard 2 or more digit LED display on the board and drive that with the 7219 ALONE first - since it is designed to drive a simple LED display.

AFTER you get that working, then you can move the wire from the DIG0/DIG1 pins to your 74HC04 to see if it drives it.  Then makes sure it inverts the signal.  then add the MOSFET or whatever output drive of you choice - with the standard LED.

If that works, then replace the standard LED display with your real one.
9  Forum 2005-2010 (read only) / Troubleshooting / Re: Question about MAX7219/7221 on: November 04, 2010, 11:33:19 am
Oops!  I'm sorry "Silly(c)One", I did not actually answer your question.  And its a good one.

The MAX394 is an INVERTER.  Because the MOSFETS are non-inverting devices.  You give them a voltage to turn ON and take it away for OFF.

But the MAX7219 digit driver pin is INVERTED.  It goes to GROUND when ON and goes to +VCC when OFF.  They are using the 394 to invert that signal I think.

This is important, because it means if you want to replace the MAX394 you have to replace it with something that will invert the signal's logic.  Like an inverted digital gate, or a transistor, or something else.
10  Forum 2005-2010 (read only) / Troubleshooting / Re: Question about MAX7219/7221 on: November 04, 2010, 11:17:17 am
The IRF540 is a MOSFET and would work nicely.

However a lot of different manufacturers produce parts with that number, but not the exact specifications.  

The specifications from Vishay say theirs has an ON resistance of 0.077 Ohms (or 77 mOhms).  That is not very impressive.  There are devices available for the same or less price that have ON resistances (Rdson) around 0.005 Ohms (or 5 mOhm).  The lower the ON resistance the less power losses in the MOSFET (which are just a special type of transistor, by the way).

Which means, for example, if your running a light bulb (which takes a fair amount of current if its a bright one) a device with 77 mOhms ON resistance might need a heatsink or cooling fan.  Whereas one with 5 mOhms won't even get warm!

I'm old enough to remember when these things (MOSFETs) first became widely available. They were a novelty at first, since a "good" power transistor could do the same job better.  Now, these devices blow my socks off!  We can do power-projects that not that long ago were either impossible or needed BIG cooling fans..

11  Forum 2005-2010 (read only) / Troubleshooting / Re: Question about MAX7219/7221 on: July 22, 2010, 10:58:53 am
The MAX394 would work.  Its just a switch (two switches in one chip).  You could use a low-ohm MOSFET too.

All its doing is allowing the low-voltage output of the 7221 for multiplexing the displays to be "amplified" to whatever voltage/current your display needs.

As you noted, those big digit displays have multiple diodes in series.  That keeps the power draw down, but increases the voltage needed to switch them on.
12  Forum 2005-2010 (read only) / Interfacing / Re: 7 Segment Display using SPI on: July 20, 2010, 09:43:45 am
SparkFun now offers an alternative design.  This one has the interface pins along the top, so you can horizontally stack displays.

13  Forum 2005-2010 (read only) / Interfacing / Re: LED/ Seven Segment Display on: July 22, 2010, 11:06:29 am
Not exactly, the SparkFun kits are PER DIGIT. And would be very expensive, and very wasteful in that they are dedicating one CPU per digit - way overkill.

The 7221 and two 394s would allow you to run 4 digits.

And those are kits.  Either way, you will be soldering, but with the kits you would be doing a lot more soldering.
14  Forum 2005-2010 (read only) / Interfacing / Re: LED/ Seven Segment Display on: July 22, 2010, 10:46:32 am
Go back to the first posts I gave you!

MAX 7221

One chip that takes in serial input, and can drive multiple LED 7-segment digits.  In the datasheet for the MAX 7221 on page 12, Figure 2, they show how to use the 7221 with a MAX394 to handle large digit displays.

Some other interesting alternative chips:



The first one is a standard DIP package, and has the added bonus of supporting digital input switches and discrete indicators in addition to the LED display!  It is used in Vending machines.

The second one is an updated version of the 7221 but it only comes in a surface mount package.

I am refurbishing a machine built in 1977 that has a 7-segment display.  The old display was the best 1970's technology could offer.  I'm bringing it up to modern standards.  Which will mean it will be a LOT brighter, and support display of diagnostic codes to help fix the machine when things go wrong.

Like you, I don't like the thought of dedicating 4 output lines per digit - I can see a few choices.  I just ordered these parts so I can do a quick prototype of each idea and then choose.

From Sparkfun:
Arduino software for it:

From Digikey:
  - MAX7221ENG+-ND
  - MAX6959AAPE+-ND
  - 160-1576-5-ND (7-segment LED display, single digit, 0.56" tall)

My needs are simpler than yours.  That is, I just have to create a 1/2" tall display.  The Sparkfun module might be all I need.  Which would be great since its cheap and i'm lazy.

For me, the worst case would be if I will have to use one of the MAX chips and 4 LED digits on a proto board.  The chips are cheap, but it would take me a few hours labour to make the board. I've got my fingers crossed the SparkFun serial LED display fits inside the machine....

You have a more complex issue.  In addition to needing something to decode your CPU's data into the 7-segment LEDs.  Your output drive has to handle the voltage and current of a large display.

Sparkfun has a nice looking 6.5" single digit display:

Sparkfun has two kits they say are "good" for driving this large display:

These kits are awful expensive, but they would work.  The kits use a clever display driver from TI:

A TLC5916.  This chip is clever in that it switches the ground side of the LEDs, which allows the positive side to be anything up to 17VDC!  And the ground-side switch can control the amount of current flowing through it, regardless of the voltage. Pretty cool.

The data sheet is here:

This chip only handles ONE digit, so you would need one per segment.

Unless something else comes up, I think the 7221 is your best choice.

15  Forum 2005-2010 (read only) / Interfacing / Re: LED/ Seven Segment Display on: July 16, 2010, 11:36:49 am
oh yes, "experimentation" is the way to go!

Pages: [1] 2