|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#28
|
||||
|
||||
|
Re: Arduino + Ethernet Shield Help
Make sure to put the semicolon at the end of the line I suggested you add.
Guess I nicked it off when I edited the color tags on my phone. Something to think about as you work this out: Code:
Press OFF button: FireFox 19.02 Internet browser sends: POST / HTTP/1.1 Host: 192.168.1.130 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://192.168.1.130/ Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 7 pinD8=0 Arduino Replies: HTTP/1.1 200 OK Content-Type: text/html HTML of web page follows. Press ON button: FireFox 19.02 Internet browser sends: POST / HTTP/1.1 Host: 192.168.1.130 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://192.168.1.130/ Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 7 pinD8=1 Arduino Replies: HTTP/1.1 200 OK Content-Type: text/html HTML of webpage follows. No sense in posting what the HTML looks like here. It's in the code and major browsers will let you view that as source. Take a good look at the code as supplied and picture what will happen when it reads that. As of last night around midnight I had this code fixed and working as it was intended. I just don't want to deprive anyone of the learning experience ![]() If time is pressing let me know and I'll just send the fixed code to look at. I wanted to address another statement previously made: 15 LEDs at 20mA each DC current limit. Driven at 50% duty cycle PWM so you can 'dim' them. Consume something like an average of 10mA. If the PWM is sychronized to all 15 LEDs on actual outputs (so this assumes your Arduino has enough digital I/O for this). Then that's 150mA. If the PWM signals are 'out of phase' with each other then it's possible this could be as low as 75mA. Let us assume the likely chance that it's 15 LEDs on 15 digial I/O at 75% duty cycle. That would, at least to your eye, look like they are almost fully powered on. So 15 LEDs are probably drawing close to 200mA out of the maximum typical drive of an Atmel AVR of 200mA. Since R/C hobby servos are usually connected to another circuit or shield. Since R/C hobby servos are often 6VDC for the motor which is a good reason for the additional circuit. It's likely the R/C hobby servo control presents a simple 5V CMOS input to the Arduino. Such an input draws a tiny current. Usually around 0.1mA or even less. So that means that you were hovering somewhere between 150mA and 201mA of total drive from the Atmel AVR with that setup. So previously when it was suggested that an Arduino was able to power 15 LEDs and servos off the same board from a USB port that wasn't entirely a fair assesment of the actual total drive power being demanded of the Atmel AVR on the Arduino itself. It seems unlikely that the servo power came from the USB port since they typically limit to 1A or even 500mA. So again be very careful with this. I can stack CMOS input shift registers on Arduino digital outputs. Heck I can stack I2C/SPI port expanders and other Arduinos on the digital ouputs of a single Arduino. So it is possible to have an enormous number of things controlled by a single Arduino. *However* always consider just how much current as a whole that will demand of the Atmel AVR on the Arduino. Device count alone can fool you easily. It is the context that actually matters. Also seeing as you've driven LEDs with PWM and know how to do that. Did you know you can drive the opto-isolator LED with PWM? The relay coil is really slow to respond. So you can save digital I/O current by driving the LED in the opto-isolators with PWM. Depends on how you do that. You could drive half of the relays low. Then the other half. So you could reduce 160mA to drive that 8 relay board you have to something like 80mA. Last edited by techhelpbb : 02-08-2013 at 12:10. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|