Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 9
61  Using Arduino / Networking, Protocols, and Devices / Ethernet module freezing on: March 15, 2012, 01:01:50 pm
I'm using a wiz811mj ethernet module (basically the same functionality as the ethernet shield) and the  UDPsendReceiveString sketch that comes with the ethernet library, with an Arduino uno.

I'm sending this a stream of packets 530 bytes long.

A correct report looks like this -
Received packet of size 530
From 2.0.0.1, port 6454
Contents:
Art-Net



At higher speeds (40-60 pps) the reported size quickly rises like so -
Received packet of size 12128
From 0.0.0.0, port 0
Contents:


Until the device freezes (within seconds usually)

At lower speeds (like 20 pps) the errors will be fewer but still present, and the device will still crash, though less frequently.

All I need is to read and parse one current packet (ideally the most recent, though not essential), ignore any that the arduino does not have time to deal with, then read and parse the next (most recent) packet when the arduino is ready (ie main loop cycles round)

I don't know if it's the w5100 buffer that is filling up and freezing, or the arduino memory.

It is not always possible for me to control the speed of (duration between) the incoming packets, so the system must be able to ignore packets it can't process in time.

I've tried calling EthernetUdp.flush() at the end of every loop, which I presumed would clear the w5100 buffer after the packet had been read but the only effect is to make crashes much more frequent.

Would an arduino mega help? or an ethernet controller based on the w5200 for example?  It'd be nice not to have to spend more money but I'm happy to if it works.


Any ideas?

Cheers
62  Using Arduino / Networking, Protocols, and Devices / Re: artnet to dmx project. memory issues? on: March 15, 2012, 10:48:58 am
I get this problem too and it seems like maybe the w5100 buffer is getting too full and not clearing properly (uneducated guess)

I get the same problem when using the UDPsendReceiveString sketch that comes with the ethernet library.  If I send udp packets one at a time the arduino reports back correctly but if I send a constant stream of artnet data (I think 538 bytes per packet and usually at a rate of 40-60 pps) the arduino freezes (or probably just the w5100 freezes)

As artnet is a realtime communication all I need is to read one packet from the buffer every time the arduino's loop passes round, therefore I have no use for buffered packets apart from the one I want to read that cycle.

I tried flushing with Udp.flush but that didn't seem to work.

It's spinning out with even smaller packets too.

I've tried 2 units.  And I don't know if it's just me but it seems to get worse over time.
63  Using Arduino / LEDs and Multiplexing / ws2801 with higher voltage leds on: March 13, 2012, 03:39:40 pm
Can anyone shed some light on how to use higher voltage leds (or more leds chained together) than the ws2801 is normally spec'd for?

There is a schematic and description of this on page 10 of the datasheet here http://www.adafruit.com/datasheets/WS2801.pdf but I'm not sure how to calculate the value of the two resistors (RB and RXFB).


Also if I used a transistor with the ws2801 to increase the current capacity, what would be the implication of losing the constant current feature? My rough understanding of this is that as the led heats up the current flowing through it will change slightly, and may vary between different leds but I don't have an idea of how much of a problem this will be.  If it is a problem, is there a better way to increase the current capacity of the ws2801? (to use high power leds or motors)

Thanks guys
64  Using Arduino / Networking, Protocols, and Devices / Re: spi over rs485 on: March 13, 2012, 01:40:16 pm
It really was that easy smiley

Just linked a couple of ws2801 over 80+ metres of cat5 cable!

proof -



65  Using Arduino / Project Guidance / Re: questions about chaining RGB LED+servo modules using WS2801 chips.. control? on: February 27, 2012, 01:57:50 pm
This library from adafruit will let you use any pins for mosi and clock output to the ws2801 https://github.com/adafruit/WS2801-Library

But it's apparently quite *slow*. Someone has made a faster version but it uses the hardware spi pins so clashes with the ethernet controller

Can anyone advise what the fastest method would be to communicate with the ws2801 without using the hardware spi pins (10,11,12,13)


edit - https://www.adafruit.com/forums/viewtopic.php?f=47&p=125746 here is a version with direct port manipulation, or hardware spi, and estimates of the numbers of leds that can be controlled at what fps.
66  Using Arduino / Project Guidance / Re: questions about chaining RGB LED+servo modules using WS2801 chips.. control? on: February 27, 2012, 01:33:07 pm
How are you getting on with this?

I'm doing something similar (without the servos, though I am going to try using ws2801s to drive solenoids)



WS2801 control - http://www.bliptronics.com/arduinocode/blip_leds_spi_2801.zip works for me


And artnet - get an ethernet shield (or the cheaper alternative - http://www.sparkfun.com/products/9473  Connected as follows -

J1-1 (MOSI) to D11,
J1-2 (MISO) to D12,
J2-1 (3.3) to 3.3v,
J2-3 (SCLK) to D13,
J2-4 (/SCS) to D10,
J2-9 (GND) to Ground,
J2-2 (/RESET) to Reset

Then download the zip file here http://vvvv.org/contribution/art-net-set-for-arduino and use the sketch 'art-net receiver.pde'

You may need to change 'the condition from ==taille_chaine_artnet to >25'  See this thread - http://vvvv.org/forum/karistouf-reartnet-set#comment-78276

Now we're got here we run into a problem which is both the ws2801 chips and the ethernet controller are using the spi bus.  I'm currently trying to figure out how to combine both. I think there's a way do use spi on arbitrary pins but I'm not sure. It should actually be possible to share clock between both and use mosi for the ws2801 and miso for the ethernet controller, as we dont need bi directional communication (unless you need servo feedback)

Where are you based?
67  Using Arduino / General Electronics / Re: need to tell if mains voltage is present on: February 27, 2012, 01:16:12 pm
Great ideas, thanks.

Think I'm gonna go for the extra relay
68  Using Arduino / General Electronics / need to tell if mains voltage is present on: February 22, 2012, 07:37:27 am
Hi.  I'm building a system where an arduino will switch on or off a 240v supply based on sensor input.

It's important that this system does not fail so I need a way to check if the relay is working.  I thought I could switch off the relay regularly at a convenient time, then check if the 240v is still present at the output, telling me if the relay has failed open.  What would be a small, cheap, and safe way to do this?

I figure I could plug a ac-dc 5v psu into the mains and use that to trigger an arduino input but it will be pretty bulky.

any ideas?
69  Using Arduino / Networking, Protocols, and Devices / Re: spi over rs485 on: February 22, 2012, 07:28:20 am
Thanks.  I'll give it a go and report back
70  Using Arduino / Programming Questions / edit/view cpp files on: February 22, 2012, 06:37:25 am
Hi

What can I use to view arduino library .cpp and .h files so they are correctly formatted. Hopefully I don't need visual studio c++

I don't want to build libraries at the moment but want to be able to open other libraries to view and copy elements for my sketches
71  Using Arduino / Networking, Protocols, and Devices / Re: spi over rs485 on: February 22, 2012, 06:19:42 am
edit - (as long as I keep the spi speed to <=2.5Mbps)
72  Using Arduino / Networking, Protocols, and Devices / spi over rs485 on: February 22, 2012, 06:15:25 am
Am I right in thinking -

RS485 is an electrical standard for sending and receiving a balanced digital signal, and I could use it to send the (kind of) spi from a ws2801 led driver over longer distances simply by using one max490 or similar for the clock signal on each end, and one for the data signal on each end?

 From the diagram on page 8 of the datasheet here http://docs-europe.electrocomponents.com/webdocs/0f69/0900766b80f69b20.pdf it seems that there is an input and output channel on the max490 each of which convert into/from a two wire balanced signal designed to be send down a twisted pair cable like cat 5.

Is this correct, and is it really this easy?  smiley
73  Using Arduino / LEDs and Multiplexing / Re: ws2801 led strip problems on: February 22, 2012, 05:36:58 am
Thanks Grumpy.

I learned this principle the 'hand on' way on a recent project. You don't know how many problems it fixed!
74  Using Arduino / Programming Questions / fast spi on: February 21, 2012, 04:22:05 pm
Hi

Does anyone know how I can get fast spi http://code.google.com/p/fastspi/ working with Arduino 1.0 or 0023?

Or has fast spi been superceeded?

I need it to control ws1801 led driver chips

cheers
75  Using Arduino / LEDs and Multiplexing / Re: ws2801 led strip problems on: February 21, 2012, 03:56:34 pm
Hi.

Thanks for your suggestions guys.

I ran out of time on this a while ago and am just coming back to it now, using individual ws2801 chips.

Guess what the problem was - I needed a bypass cap on the power supply, even when powering directly from the arduino.  These things are sensitive!

I just saw this mentioned on the adafruit site, and I think it's the only place I've seen it recommended.

I'm surprised more people haven't had problems with this
Pages: 1 ... 3 4 [5] 6 7 ... 9