Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

A question about running analogue signals into digital inputs.

Archive: 4 posts


I've been messing around with lots of different logic stuff recently, and in particular I've hit a situation more than once where I want an action to occur when an analog signal is equal to 0. For instance, I wanted a microchip to activate when two analogue values were equal, so I plugged both of them into different ends of a direction combiner, ran that through a NOT gate, and hooked the NOT gate to the chip.

This did not work like how it seemed it should. In the end the only solution I could figure out was to hook the direction combiner into a sequencer with a battery at the 0 location.

What confused me though was that I couldn't work out what rules were governing the way the analog input of the microchip interpreted the analog signal of the combiner. Sometimes it did seem like it worked, and other times it didn't, and through the small amount of testing I did I couldn't figure out what the pattern to it was.

From what I saw, an analog 0 obviously correlated to a digital 0, and a 100 correlated to a 1. But it seemed almost random as to whether 1-99 counted as a 1 or 0. Could someone maybe help me understand what a digital input does when it's given an analog signal that can't be neatly converted into a 1 or 0 (or -1)?
2011-02-19 06:59:00

Author:
Speed Racer
Posts: 156


I just ran into the same thing. the solution I used is to use a sequencer set to positional with a battery on 0% too.

as far as i can tell, anything lower than 100% is considered 0 in a digital circuit
2011-02-19 07:01:00

Author:
tdarb
Posts: 689


Expand battery to whole length of that sequencer and use NOT gate to invert it.2011-02-19 08:42:00

Author:
waD_Delma
Posts: 282


Could someone maybe help me understand what a digital input does when it's given an analog signal that can't be neatly converted into a 1 or 0 (or -1)?

I believe the answer is it varies by gadget, and possible also by circumstance. This wiki article (http://wiki.lbpcentral.com/Analog_signal)talks about some of the gadget variances.

That said, the easiest way I know to force a 1% to 99% analog signal to be treated as a 0% OFF signal is to make the analog input the activation input for a microchip, and have the chip just contain a normal 100% battery. This will only output a signal on the battery when the input is 100%. On the other hand, like the other posters said, to force 1% to 99% analog into a 100% ON signal, you can make a sequencer with a battery on it, and shrink the sequencer down to just the size of the battery. Set the sequencer to positional, hook your analog input to the positional input of the sequencer, then the battery output will give a 100% ON signal for anything other than a 0% input.

Keep in mind that analog signals also have a sign (though they are usually always positive), and a lot of inputs just take the absolute value of the incoming signal. This includes sequencers and the individual inputs on a signal combiner. Also the NOT gate just does OUTPUT = INPUT - 100%, it doesn't do OUTPUT = - INPUT, like one might expect. Those two things have given me a lot of confusion when trying to makes sense of what's happening with my analog signals.
2011-02-19 10:43:00

Author:
LittleBigDave
Posts: 324


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.