• I (think I) wired everything correctly, but:

    • 'It' is not working... :(
    • I get weird, random - all over the place - unexptected values... $#!#%34!45#&%$)_36((&36&^765

    Check your grounding! - All pieces have to have their ground (GND) connected 'with each other'.

    And if all looks connected: sometimes the breadboard or the jumber cable is simply - electro mechanically - broken, and does not create a clean connection. Test it (with a multi meter) or use another slot or jumper.

    With no common ground, the values at the signal pins of any of the connected 'pieces' have no real meaning... It is like two people try to push or pull each other with held hands while standing on two different (small) floats: only the floats move around and the people do not really experience the forces, and when the people push with 'one hand-connection' and pull with the other one, it gets even more twisty weird... When you anchor - ground - the floats, the pushs and pulls - of each individual 'hand-connection' begin to matter.

    With so many pieces involved - bards/modules (microcontrollers, espruino and others, sensors, motor drivers, power supplies, (usb) connected computer(s) - it is easy to overlook that there is no shared/common grounding.

    For example: if you connect a serial device that you power from a wall outlet or battery pack, and you run your Espruino connected to your computer over USB and powered as such, and you have (only) connected the TX and RX of Espruino with the RX and TX of the serial device, you get crazy values for many reasons, but mainly because you do not have closed curcuits. The two serial RX and TX connections are two 'open cirucuits' - actually really circuits, because the core of the definition of circuit implies that it is closed... and the closing for each of these RX and TX circuit is done be the ground connection.

    But you do not only get weird values, you also endanger your components. The floats can be pulled so far away from each other by third party powers, that people get ripped of the floats: the potential difference - voltage difference - of the pins can by greater than what the pin can handle and - with enough power - (milliamps) flowing, the devices get silently destroyed.

    PS: This is just an eye catcher post... ;-) - to make you check your groundings... that a circuit has to be closed to matter... that a bulb has to be connected to both poles of a battery to lighten up... something you learned long ago, but has been burried by a lot of other great things you learned ever since...

    (Troubleshooting page needs an entry about this.)

  • Good point - I'll stick something on the troubleshooting page.

    Just a note: while power supplies tend to isolate themselves from the mains voltage, sometimes there is still some very slight coupling between the mains and the 'isolated' voltage. It means that as @allObjects says, if you don't connect your ground together, you can potentially end up with 10s of volts going into the Espruino's GPIO lines - which it won't like at all!

  • This is quite a common problem especially these days with so many modular components and boards made. It means that people with very little knowledge of electronics are able to get into developing their own cool projects just by connecting preassembled boards together and not realising that they need common ground.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Help! It's not working... I see random behavior...

Posted by Avatar for allObjects @allObjects

Actions