Hc-Sr04 and attiny85

Thread Starter


Joined Apr 11, 2023
Hello there, hope everyone are having an a good day.
English is not my native language, so I apologize for any possible errors.
I am here because i have some cuestions about a circuit that i being designing. I have some medical cars (these that the old people use) and They asked me to install a "no accidents" system, i think to put a Attiny85 with an hc-Sr04 on the front of the car. That will take the distance and if it is less than 1.75 meters (i think) it will cut every signal of the accelerator potentiometer (here is where i have a doubt).

I think accelerator potentiometer (5.1k in the extremes ) work as:
  1. When yo stay stopped the potentiometer are in the midddle, i think it will take 2.5k.
  2. When you want go ahead it takes values more than 2.5k.
  3. When you want to go back, take values less than 2.5k.

Probably it is a resistive divider, so i think to by pass it by an a transistor, it is okey? can i do it?
It works with 24V battery and I think that if the distance is less than 1.75 meters I have to detect the voltage and it is less than 12 V, it moves back and if it is greater than 12 it turns off the transistor so as not to move.
Can i use an op amp to reduce the voltage?

Thank you, here i left the schematic.



Joined Dec 31, 2017
Don't think that will work either. Maybe use a small relay to break the connection.
Would be better to know exactly how that accelerator/ potentiometer is wired and what voltages are associated with it.