Shop OBEX P1 Docs P2 Docs Learn Events
NEWB QUESTION on LCDs — Parallax Forums

NEWB QUESTION on LCDs

jbodjbod Posts: 46
edited 2008-02-15 23:27 in Robotics
I am new to robotics.\/electronics and want to know can you reuse LCDs out of cell phones or blackberrys on BOE-BOT setups?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-15 18:21
    Not easily.

    These LCDs often have their controllers built into the phone's processor. You'd have to supply a separate LCD display controller. A Stamp is not really designed for that type of use. You could probably make it work with some external electronics to provide for all the I/O pins of the display and the timing and data buffers involved, but it would be a lot simpler and cheaper to just buy a display with a built-in controller.
  • jbodjbod Posts: 46
    edited 2008-02-15 19:02
    Thanks Mike!

    Another quick newb question ... I know you are to disconnect power when making changes to breadboard ... however do you also need to power down before disconnecting the serial cable? Thanks again!!!
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-15 19:05
    You shouldn't have to power down to disconnect a serial cable. The circuitry is supposed to be protected from that sort of thing. If it's a cable used for programming, you might power down only because the Stamp may reset when you connect or disconnect the cable and you may not want that (depending on what's programmed into the Stamp).
  • jbodjbod Posts: 46
    edited 2008-02-15 19:19
    Got another one for you while we are at it [noparse]:)[/noparse]

    Should the Bot run it's code as soon as it is turned on with out having to hit reset? (It was my under stand that the code is cycled every time you hit reset or power off/on) ... I ask becuase seems like some times it does and some times I have to hit reset when it is powered on or even if I hit reset with power off ... it will run the code as soon as it is powered up?
    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-15 19:27
    Pushing the reset switch or keeping the power supply voltage below 4.7 (I think) will keep the Stamp reset. Once the switch is released or the voltage rises enough, the Stamp will begin initializing itself and then execute the code in the EEPROM on the module from its beginning.

    That's it. If it doesn't seem to be happening, there's something else going on. Commonly, there are motors or other large current drains and the power supply is weak or slow to reach full capacity and the voltage drops before things can get going which causes a new reset.
  • jbodjbod Posts: 46
    edited 2008-02-15 20:06
    Did some testing ...

    1. New batteries (no change)

    2. If I switch between 0 and 1 ... code runs every time switch is toggled (until I switch to 2)

    3. If I switch between 0 and 2 ... I have to hit rest first before code will run. (either when powered off [noparse][[/noparse]0] or right after powering up [noparse][[/noparse]2])

    In order to get the code to run when switching from 0 to 2 ... I have to hit rest when off (0) or the code does not run on 2 until reset?

    I also noticed the wheels make a quick twitch when switching to (2) ... hope I don't have something wrong with the BS2 or board [noparse]:([/noparse]

    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-15 20:32
    Servos often "twitch" when switched on.

    I don't know what your code is doing. If you have external devices attached to your BS2, they may need time to initialize. If your BS2 is ready before they are, you might need to reset your BS2 so it can initialize the external devices. One way to take care of this is to put a PAUSE statement early in your program, perhaps 250ms or 500ms to allow the external devices to finish their initialization process.
  • jbodjbod Posts: 46
    edited 2008-02-15 20:35
    Alsoseems to be servo related (connected) ... if I remove the servos from P12 and P13 ... and switch between 0-1 or 0-1-2 ... code runs every time ... also found one other factor ... If I let the Bot sit for about 60 sec or more then it will run when switched on (2) ... seems like it is not resetting as soon as shut down (0) and holding some charge (enough to not cause reset)·maybe?·

    Maybe this is normal behaviour just seemed odd to me [noparse]:)[/noparse]
  • jbodjbod Posts: 46
    edited 2008-02-15 20:40
    Just running·some simple ramping code ... also just noticed the Vdd/Vin jumper was on Vdd (AC)·inistead of Vin (I am running off the battery pack that came with the Boe-Bot) ... it was set like this from the factory (hope this did not cause some kinda damage to any thing)



    CODE:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    DEBUG CR, "Program running"

    pulsecount VAR Word

    FREQOUT 4, 2000, 3000

    FOR pulsecount = 1 TO 100
    PULSOUT 13, 750 + pulsecount
    PULSOUT 12, 750 - pulsecount
    PAUSE 20
    NEXT

    FOR pulsecount = 1 TO 75
    PULSOUT 13, 850
    PULSOUT 12, 650
    PAUSE 20
    NEXT

    FOR pulsecount = 100 TO 1
    PULSOUT 13, 750 + pulsecount
    PULSOUT 12, 750 - pulsecount
    PAUSE 20
    NEXT

    DEBUG CR, "Program done"

    END
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-15 21:00
    You actually want the servos to run off the battery pack (Vin). Otherwise, they run off the regulated (5V) power. The servos draw quite a bit of current when moving or starting to move and, if that's done a lot, can overheat the voltage regulator which will cause it to protect itself by shutting itself down until it cools. Servos can run very well off 6V, should not be used with power sources below about 4.5V or above about 7.5V. The behavior you're describing suggests that your power source is not up to supplying the power demands of two active servos. You can use 4 fresh AA alkaline batteries or 5 AA NiMH rechargable batteries, preferably some with good current capacity ratings (2300 mAh or more). For the 5 cells, you'll have to add a 5th battery holder. Parallax sells one or you can get one from RadioShack and wire it in series with the existing 4 cell holder.
  • jbodjbod Posts: 46
    edited 2008-02-15 23:27
    Talked with Tech Support on this ... It does it with new batteries and even with a 9v ... Seems like the MC does not reset after powering down (unless it sits for 60 sec or more) ... So you have to either hard reset (rest button) or soft reset (let it sit powered down for 60 sec or more) ... Tech Support believes there is a Cap issue ... the charge should disapate as soon as powered down (0) ... however it hold power for about a minute after shut down ... They asked me to send it back (RMA) .... I'll let you know how it goes.
Sign In or Register to comment.