Shop OBEX P1 Docs P2 Docs Learn Events
PWMPal Problem — Parallax Forums

PWMPal Problem

D FaustD Faust Posts: 608
edited 2007-11-01 20:19 in BASIC Stamp
Hello, I finally got around to testing my PWMPal after breaking a pin off one this summer.· It doesn't do anything, when I send commands to it!· It isn't mounted under the stamp because last time I couldn't get a connection to the stamp when it was mounted that way.· I bought a socket for it and have it sitting on my breadboard.

Here's my wiring:
1) to pin 4, Ground
2) to pin 5, connection to stamp pin 0
3)·to pin 23, ground
4) to pin 21, +5V
5) to pin 5, a 1 milliamp meter through a 10K resistor (to measure voltage)
{everything else isn't connected}
Here's the code:
' {$STAMP BS2}
' {$PBASIC 2.5}
version VAR  Byte(3)
tOn     VAR  Word
tOff    VAR  Word
status  CON  %11100001
SEROUT 0, 6, [noparse][[/noparse]"!ID"]
SERIN 0, 6, [noparse][[/noparse]STR version\3]
PAUSE 1000
tOn = 100
tOff = 100
SEROUT 0, 6, [noparse][[/noparse]"!PWMM4", tOn.BYTE0, tOn.BYTE1, tOff.BYTE0, tOff.BYTE1]
PAUSE 1000
SEROUT 0, 6, [noparse][[/noparse]"!PWMSS", status]

My stamp is on my BOE + my PWMPal on a separate breadboard and the grounds are connected
Can anyone see what I did wrong.

Here is the datasheet: http://www.parallax.com/dl/docs/prod/acc/PWMPAL.pdf

Here is another thread about making the connections: http://forums.parallax.com/showthread.php?p=661140

Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--DFaust

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-29 23:09
    Could you take a picture of the setup and post it? Perhaps there’s something that could be ascertained from an image of everything…

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-29 23:12
    Do you get a valid version number? The connections look like they should work.
  • D FaustD Faust Posts: 608
    edited 2007-10-29 23:14
    I haven't checked for version number.· I'll get a picture up as soon as possible.· Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --DFaust
  • D FaustD Faust Posts: 608
    edited 2007-10-30 00:04
    I checked for version number in my code

    The first three bytes were 0, 0, 0 I kept pressing reset and got the same result.

    Then I cleared the debug window and started again. This time I got 255, 1, 0

    Then I hit reset, let it debug, and got 0, 0, 0 many more times.

    I'm guessing that the 255, 1, 0 is an anomoly not a real value.

    Pictures coming here.· I think·it is a stretch to say that these are worth·25 words nevermind 1000.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --DFaust

    Post Edited (D Faust) : 10/30/2007 12:30:50 AM GMT
    2560 x 1920 - 932K
    2560 x 1920 - 871K
    2560 x 1920 - 753K
    2560 x 1920 - 676K
    2560 x 1920 - 742K
  • D FaustD Faust Posts: 608
    edited 2007-10-31 00:08
    Is·there nothing wrong with my wiring?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --DFaust
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-31 00:19
    I can't tell from the pictures. Look, it's pretty straightforward since the PWMPAL is intended to mount directly to the Stamp. I don't know if the PWMPAL uses the reset line on the Stamp to reset itself, but you might tie those together too.
  • D FaustD Faust Posts: 608
    edited 2007-10-31 02:02
    I'll have to check if there is a trace to that pin.· Also, I'll try to replace to pictures with some that are less blurry.· Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --DFaust
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-31 14:47
    My observations are based on what I can see in the pictures and due to the quality of the pictures I may be off here but…It’s not clear which pin you have the output of your regulator going to…It should be the 4th pin down from the top. If that is the case then that means your ground is incorrect. Ground is the 2nd pin down from the top and in your picture it appears as though the two connections are side-by-side which would mean your ground is connected to the /RESET line. While we’re on the regulator…which one is it? Many won’t regulator properly at all without capacitors on the output (recommended on the input as well) and could oscillate or worse, send Vin to the output without them. Finally, is your ground bus strip at the bottom common all the way across? On many boards it is split in two.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • D FaustD Faust Posts: 608
    edited 2007-10-31 19:27
    I am using a 7805.· I'll try putting some capacitors (electrolitic, 1000uF between out and ground, right?)·
    Chris Savage (Parallax) said...
    Ground is the 2nd pin down from the top and in your picture it appears as though the two connections are side-by-side which would mean your ground is connected to the /RESET line.
    What?· How are they connected?· The PWMPal is over a gap between rails and nothing is in the row with the reset line.

    I don't know it runs all the way across but is shouldn't matter because they have to connect for the batteries anyway.· (6 AAs, so there are voltages of 1.5, 3, etc to 9 on the top row.)

    Will the pwmpal reset when the line is pulled low or high?· (there is a trace to it)·What should it usually be?· I'm not sure how to tie the pins together since the stamp is on my boe.· Could I have the stamp pull the line low to reset it in the beginning of code.

    Attached is a drawing of the connections as of my setup now.· I'll try to get more pics.

    EDIT: this looks like the datasheet http://cache.national.com/ds/LM/LM341.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --DFaust

    Post Edited (D Faust) : 10/31/2007 7:39:35 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-11-01 15:58
    The connections are one-to-one…For each pin on the PWMPAL it normally connects to the same pin number on the BASIC Stamp. You regulator says it requires an input capacitor but you have none. As for /RESET the PWMPAL resets when that line is LOW, so when I though you were shorted to ground that would cause the device to be held in a reset state. Apparently I was incorrect, but that is what it looked like based on the picture. Either way it shouldn’t need to be reset externally, but it wouldn’t hurt to have the /RESET line tied to the one on the BASIC Stamp Module just in case it relies on the BS2 internal pull-up. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • D FaustD Faust Posts: 608
    edited 2007-11-01 20:19
    OK thanks, so the capacitor should do it.· Let me try...



    I put a 1uF electrolitic cap across the input line and ground (+ on the + voltage·input)·and got the same response...nothingmad.gifmad.gifmad.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --DFaust

    Post Edited (D Faust) : 11/1/2007 8:30:59 PM GMT
Sign In or Register to comment.