Using the prop pins to power ICs/Modules...
Cluso99
Posts: 18,069
I have just interfaced a cheapie Nokia 5110 LCD module to the prop for fun.
Wiring it was easy except that my 1"sq CpuBlade (a simple propeller module) does not bring out 3V3. So I needed to improvise and power it separately.
Once working I was able to check the current usage. The LCD was drawing ~0.2mA although it would increase when sending data to it, but not by a large amount. So, I decided to power it with prop pins, one for 3v3 and one for gnd.
I can do the same for the backlight which draws ~6.7mA by connecting a prop pin and outputting 0v. Using pwm will reduce the backlight brightness as fully on is way too bright.
Now I can connect the whole LCD module (8 pins) directly to the prop's 8 I/Os. This means that I can simply stack the module onto my prop board. The same could be done simply on the Parallax Proto boards, and many of the other boards out there!
Caveats...
When powering ICs/modules, be careful that there is no large capacitors on the power rail of the module!!! Capacitors are effectively shorts when initially powered and therefore may draw too much current on power on for the prop pin to handle (typ max ~30mA). This applies to both 3v3 and Gnd pins.
Don't use this method with ICs/modules that have large switching currents as you are likely to induce this switching noise back into the internals of the prop resulting in unwanted internal noise in the prop chip - can cause other internal problems.
I will post a pic soon.
Wiring it was easy except that my 1"sq CpuBlade (a simple propeller module) does not bring out 3V3. So I needed to improvise and power it separately.
Once working I was able to check the current usage. The LCD was drawing ~0.2mA although it would increase when sending data to it, but not by a large amount. So, I decided to power it with prop pins, one for 3v3 and one for gnd.
I can do the same for the backlight which draws ~6.7mA by connecting a prop pin and outputting 0v. Using pwm will reduce the backlight brightness as fully on is way too bright.
Now I can connect the whole LCD module (8 pins) directly to the prop's 8 I/Os. This means that I can simply stack the module onto my prop board. The same could be done simply on the Parallax Proto boards, and many of the other boards out there!
Caveats...
When powering ICs/modules, be careful that there is no large capacitors on the power rail of the module!!! Capacitors are effectively shorts when initially powered and therefore may draw too much current on power on for the prop pin to handle (typ max ~30mA). This applies to both 3v3 and Gnd pins.
Don't use this method with ICs/modules that have large switching currents as you are likely to induce this switching noise back into the internals of the prop resulting in unwanted internal noise in the prop chip - can cause other internal problems.
I will post a pic soon.
Comments
and the latest code
Nokia5110A.spin
I wonder what this draws and if it can also use this method.
http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/SortField/0/Level/a/ProductID/49/Default.aspx
I use a 20x4 LCD and control the contrast with a prop pin (pwm) and the led with a prop pin and transistor (pwm). But I have no need to control the power so its on all the time.
Sorry for the late reply, just came across this post.
A while back I posted some curves of pin resistance vs supply voltage; essentially the output drivers have a resistance of about 28 ohms at 3v3. If you're driving both the 0v and 3v3 outputs (for a lcd etc) the loop resistance is about 56 ohms and therefore maximum current that can flow is around the 59mA mark.
http://forums.parallax.com/showthread.php/135845-P8X32A-Pin-driving-fet-resistance-graph
However at 2v7 the loop resistance is around 65 ohms, and therefore the max current developed is around 41.5mA, only slightly above the 40mA abs max on the datasheet.
While these currents are slightly above the 40mA abs max on the datasheet, the current would very quickly reduce as the cap charges, and the cap only has to get to a fraction of a volt before the current is back down below 40mA. I believe it would be a I2R heat related mechanism that would do the damage to the chip.
You can use a cro or dmm to measure the voltage across the pin driver itself to work out the average current drawn to see whether the individual LCD, SD card, whatever is drawing a sufficiently small average current for this technique to work reliably. It's probably a good idea to power on the peripheral well in advance of when you want to use it, to allow bulk caps to charge up, and levels to settle.
Finally, I'll add that it may be possible to carefully parallel up prop pins, especially at lower supply voltages where that peak current can only get to 41.5mA worst case. I'm about to revisit driving small 3v motors using 6 or prop 8 pins in parallel. I will definitely socket the propeller chip!
None of this stuff is what you'd do for production / long term reliability, of course. But for rapid experimenting it may be a useful technique.
For other applications, where the potential current source/sink from prop pins may be too high, a current limiting resistor should help.