Convert from a specific voltage range to another
To use the 3 resistor method described in the above link you must have a voltage supply rail greater than +5V (for your I/O voltage specification).

Here is a design along the same lines but with a supply rail of +12V.







simulate this circuit &ndash; Schematic created using CircuitLab

To determine the resistor values I set up two equations, one using the voltage divider law with Vin = -4V, and a second equation using Millman's theorum with Vin = +4V. Assuming a value for R2 and a value for the supply voltage, there are then two simultaneous equations and two unknowns (R1 and R3) which means that both equations can be solved and the values determined for R1 and R3.

It is possible to design this sort of solution using only two resistors but it can only be achieved with one supply rail voltage value which is 6.66666V (for your I/O voltage spec.) so an adjustable voltage regulator would be needed such as the LM317T.







simulate this circuit

If you haven't got access to a supply rail above +5V then perhaps you could consider using my op amp solution above.