Pages: 1 ... 3 4 [5] 6 7 ... 20   Go Down
Author Topic: ShiftPWM support topic. Latest update: Schematics, high power LED's, LED strips  (Read 79046 times)
0 Members and 1 Guest are viewing this topic.
Australia
Offline Offline
Jr. Member
**
Karma: 2
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think he was refering to this line in the example.pde:
Code:
const bool ShiftPWM_invertOutputs = 1; // if invertOutputs is 1, outputs will be active low. Usefull for common anode RGB led's.
I am sure this is just a binary switch. 1 is true, so it would invert(as he said active low). 0 is False, not inverted(active high).  smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think he was refering to this line in the example.pde:
Code:
const bool ShiftPWM_invertOutputs = 1; // if invertOutputs is 1, outputs will be active low. Usefull for common anode RGB led's.
I am sure this is just a binary switch. 1 is true, so it would invert(as he said active low). 0 is False, not inverted(active high).  smiley

Thank you, this worked a treat. Now I can continue my exploration into Arduinoness.
 smiley-cool
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a problem regarding the timeout duration for the example code. I'm currently using the ShiftPWM library in my first project with an Arduino to line the underside of my longboard with an array of 24 RGB LEDs passing through 9 shift registers. The electronics of the project are sound - I have 17 of the 24 LEDs wired up and working (the rest are being wired in tonight), and when plugged in via USB the examples run perfectly and for the full number of cycles. The problem comes when I disconnect the Arduino from the USB cord and attempt to power it via 9V. The board seems to reset itself quite frequently, interrupting itself less than 5 seconds after its initial execution and continually restarting in that fashion. At first I thought this had to do with the timeout comments in the ShiftPWM example code regarding the number of shift registers versus the interrupt duration. However, it's only 9 shift registers, meaning I should get close to the full 255 value for that duration. Does anyone have any ideas or comments on how to properly get this project functioning off a battery? Why is there this discrepancy between power sources?

Thanks in advance!
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The problem comes when I disconnect the Arduino from the USB cord and attempt to power it via 9V.


If you are using those standard small 9vdc batteries then that is the reason for the failures, it just doesn't have the current capacity to handle your load. You need to use batteries that support the current requirements.

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The problem comes when I disconnect the Arduino from the USB cord and attempt to power it via 9V.


If you are using those standard small 9vdc batteries then that is the reason for the failures, it just doesn't have the current capacity to handle your load. You need to use batteries that support the current requirements.

Lefty


Ah, thank you! What kind of battery/batteries should I use? Thanks so much.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What kind of battery/batteries should I use

A bigger one.

Voltage, anywhere from 8 to 12vdc
Current (MAH or AH) rating depends on how much current your project draws and for how long you want the battery to power the project. Rechargeable would save you lots of money in the long run. Learning about batteries and there specifications is part of learning of electronics. Do some research so you can answer your own questions in time, but ask questions when you get stuck or don't understand something.

First order of business is to know how much current your project draws, that takes a digital multimeter, which if you don't own one should get one as soon as possible. They can be very affordable and it's an important tool to have and learn to use if you want to be successful with electronic projects.

Lefty
Logged

Seattle, WA
Offline Offline
Full Member
***
Karma: 1
Posts: 174
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What kind of battery/batteries should I use

A bigger one.


This made me laugh way more than it should have smiley

How about this one? >> http://goo.gl/C82OT (58 Ah - hooah!)

Seriously though, LEDs are quite power hungry little beasts and will deplete small batteries in short order.  Like Lefty says, you need to determine your device's current draw combined with the intended use for your device.  If you want your design to run for several days off of a single battery/charge, your selection will be quite different than if you want to run it for a few minutes at a time.  There is no shortage of information on the subject of power management available.  It's an important aspect to learn and understand.


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This made me laugh way more than it should have smiley

How about this one? >> http://goo.gl/C82OT (58 Ah - hooah!)

Seriously though, LEDs are quite power hungry little beasts and will deplete small batteries in short order.  Like Lefty says, you need to determine your device's current draw combined with the intended use for your device.  If you want your design to run for several days off of a single battery/charge, your selection will be quite different than if you want to run it for a few minutes at a time.  There is no shortage of information on the subject of power management available.  It's an important aspect to learn and understand.

I really appreciate the suggestion, however I feel I should note that this project is simply lining the underside of my longboard with the array of LEDs; a 20-pound battery would be a little much! Regardless, I appreciate all the advice you and Lefty have given me; I've been e-mailing back and forth with Elco about the best solution for this particular application, which is to say, only being powered a few minutes at a time (just while I'm riding around). I wasn't aware that LEDs were so power-hungry; on the contrary, I always had them in my mind as being more efficient light sources, although I guess by typical lighting standards they probably are. At any rate, I think I'm nearing a solution, so thanks again for all the help.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well the fact that your project can run on USB power (did I understand that correctly?) then your total current consumption must be under 500ma otherwise the thermofuse on the board would open up and power down the board.

So rechargeable Nimh AA batteries are stated good for 2500+ mah or so, so six or seven AA cells wired in series could power the board via the external power connector, or four AA cells wired in series could power the board via the ground and +5vdc pins. This should give you at least four hours of run time and probably the most cost effective batteries avalible.

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well the fact that your project can run on USB power (did I understand that correctly?) then your total current consumption must be under 500ma otherwise the thermofuse on the board would open up and power down the board.

So rechargeable Nimh AA batteries are stated good for 2500+ mah or so, so six or seven AA cells wired in series could power the board via the external power connector, or four AA cells wired in series could power the board via the ground and +5vdc pins. This should give you at least four hours of run time and probably the most cost effective batteries avalible.

Lefty

Yes, you understood that correctly; the project runs just fine on USB power. I'll look into a battery pack; definitely seems more cost-efficient than a bunch of lithion batteries.

Thanks,

Sam
Logged

Seattle, WA
Offline Offline
Full Member
***
Karma: 1
Posts: 174
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I really appreciate the suggestion, however I feel I should note that this project is simply lining the underside of my longboard with the array of LEDs; a 20-pound battery would be a little much!

Oops, I left off the [SARCASM] tag on that one.  It wasn't a serious suggestion smiley-razz...
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is a long board a kind of skate board or surf board or maybe just a long 2" by 4" board?  smiley-wink
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

buzzdavidson: Oh alright, so I'm justified in laughing at the suggestion then. smiley I wasn't sure if I'd forgotten to mention if the project was for a longboard or not.

retrolefty: A longboard is a long, flat skateboard that's meant more for pure locomotion than tricks and such. I just graduated from UC Santa Barbara and am still living right near it, and the school and surrounding area is flat and close-quarters, very conducive to getting around on a skateboard. Here's a picture of one to get an idea; mine's slightly different in shape without a raised tail, but the same idea: http://www.urbanbluelongboards.com/longboards/ub240-longboard-angle.jpg
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
retrolefty: A longboard is a long, flat skateboard that's meant more for pure locomotion than tricks and such. I just graduated from UC Santa Barbara and am still living right near it, and the school and surrounding area is flat and close-quarters, very conducive to getting around on a skateboard. Here's a picture of one to get an idea; mine's slightly different in shape without a raised tail, but the same idea:


Nice area, I worked on a company project at Golita about 50 miles north of SB, lived in Lompoc for 18 months. The area up near SLO and Morro Bay were very nice also.


Lefty

Logged

San Francisco
Offline Offline
Jr. Member
**
Karma: 0
Posts: 92
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ShiftPWM helped me complete my "flight suit" project-- a black flight suit with bands of red lights bouncing to music.  There are other modes too: "rolling," "all fade," "random" and "gravity" and while I have ideas for more, the main one is "audio 1".  I posted a brief demo video to my blog if you're curious.  Lots more to post after Burning Man-- I hope it survives smiley

Elco, thanks again-- great library!
Logged

My Arduino blog: http://jmsarduino.blogspot.com
Comprehensive (?) Arduino-compatible board list: http://tinyurl.com/allarduinos

Pages: 1 ... 3 4 [5] 6 7 ... 20   Go Up
Jump to: