Nano to dim head unit

Hello.
In my car I have a Android head unit with an orange wire to dim the screen brightness. I have connected an 5v photoresistor with relay (i have a 12vin spare too)to activate the wire when it gets dark.
The problem is when its sunset the relay turns on/off several time when its not completely dark.
My though is to connect a arduino nano (or digispark) to the relay so the digispark is powered on by the relay, and if possible code the nano/digispark to give signal to the orange wire with 10 seconds delay - is it possible to connect it to an pin and code with "high" or "low" or something? or do I need an relay more? The orange wire is an negative power.
Hope you understand :slight_smile:
best regards.

Let's see the code in CODE TAGS.

I am not good with word problems, can you post a simple schematic, not a frizzy picture. Include links to the technical information on each of the hardware items.

Hi, @bjarneec
Welcome to the forum.

It sounds like you need some hysteresis rather than a timer.

If say your light range is 0 to 100.
You get the dimmer to activate say below 50, but deactivate above 65 or so.

Tom.... :smiley: :+1: :coffee: :australia:

Hello
You may add a hysteresis, as already mentioned, or add a low pass filter, thus means to make a averaging of the analog value.

1 Like

Thanks all - ill found another solution with some relays and a delayed relay board :slight_smile:

Hi,
This might help;

Tom... :grinning: :+1: :coffee: :australia:

2 Likes