As other answers have mentioned, the most likely choices (based on that description) are as follows:
The 1981 film Heartbeeps revolved around three robots that escaped from their warehouse. Along with the "son" that they built, the four became a nuclear family (mom, dad, son, grandpa). A large portion of the film did take place in a junkyard, which later became their permanent home.
The three adult robots are humanoid, although the "son" is not - he more closely resembles a box on treads with a cube-like head.
A.I.: Artificial Intelligence (2001)
The 2001 film A.I. revolves around a human-appearing robot boy who is on the run, later joined by an adult robot who is also on the run. One scene in the movie takes place at a junkyard-like "Flesh Fair" where people destroy robots for entertainment. The movie doesn't quite match your description about a family living in a junkyard, although it's easy to see where there might be confusion.
There may be other live-action films from that era that match, in which case further details might help narrow it down. A description of the humanoid robots would be especially helpful, although based on the current question, you're probably looking for Heartbeeps - although not considered successful, it does appear on cable from time to time.
Both films included the concept that robots were sub-human and often treated unfairly.