Automatic Roll-Up Windows


MX-5 ND power windows are controlled by a dedicated controller. When the soft top latch is unlocked, the windows go down automatically a few inches and stay there until manual interaction.

This is a little bit annoying when you just locked the top and are leaving the car. I decided to implement an automatic closing windows feature after you lock the top.

Bellow is the schematic diagram of the power window system for MX-5 ND


As you can see, there is no communication with CMU. Everything is controlled inside the main switch, which will not be easy to modify without altering hardware.

updated on 5/16/17

Finally, I got the actual switch from  MX-5 2017, part number NA1J66350B. The main processor is marked as “109GCK”, which is R5F109GCKFB from Renesas.  It has 6 accessible test points (GND, Reset, Debug, SCK, SI, SO) for programming/testing.

I did a quick scan on LIN bus wire; it seems to be very simple communication with passenger-side door switch.  It would be very easy to control the passenger side window, but there’s no similar interface for the driver side. The driver’s side is controlled by a button or internal software.

LIN master on the driver’s side is sending 2 bytes of data every 10ms. The first byte provides information about switches (door locked,  panel “Lock window” switch, top latch and soft top release).  The second byte has commands to the passenger side motor control (up/down and auto). The passenger side controller responds to the master, probably with door switch status.

My current plan is to first add a small microprocessor, to implement and test features I want. Later I will attempt to hack an existing processor. I’m not sure if hacking will be possible at all.  Available debug tools only support flash programming; no reading function supported. Also, this chip has a security feature. If enabled, it will not be possible to communicate without a known security ID.

My external microprocessor will check status on the LIN bus and soft top position, and based on this input will activate  “Close” signals. I think the 8pin PIC12F1572 microprocessor will be good enough for this project.

One possible scenario:

If windows where all the way up, unlocking Top latch will force windows down for a few inches. Once the top latch is locked again, in the current implementation, the windows will stay in the same position. I will check this status. If there is no manual interaction with switches, windows will be forced to go all the way up automatically.


On the picture above is the implementation with  PIC12F1572 microprocessor for auto-closing function.

The new version with PIC16F18323 has automatic windows down feature when the convertible top is open.

board with chip rev2

In this implementation:

Top locked up, windows up:  opening the top will force the windows to go all the way down.

Top locked down, windows up:  closing the top will force the windows to go down a few inches;  after the top latch is locked, the windows will go up all the way.

Top-down,  windows down:  closing top, windows will stay down.

Replacing the switch in the car is a relatively simple process, takes about 20 minutes of work.


Feedback on Miata forum:

I made one more option by request, windows will go up after lowering the top. Here is a customer’s video.

Step by step instruction for modifying switch: Switch mod.pdf

See the next post about key fob control.



34 thoughts on “Automatic Roll-Up Windows

  1. Sergey,

    Thanks for posting your thoughts on this. I was hoping CAN was involved so that some additional programming could be added. Now you’ve gotten me thinking that perhaps a simpler alternative would be to alter the power-in [1K in the schematic] from a delayed accessory power relay rather than the start stop unit relay, so that the manual switches would at least function for a few additional minutes after shutdown. Some people would like the CMU to come off this relay as well. for some ideas.


    • IG relay stays on 40 seconds after the power is off. You can close the windows manually, but I want to do it automatically.
      From MX-5 Service Manual:
      “IG OFF timer function:
      The door glass can be opened/closed using the power window main switch for approx. 40 s after the ignition is switched from ON (engine on or off) to ACC or OFF.”

      Liked by 1 person

  2. Pingback: Auto-closing windows | 21st Century Fiat 124 Spider

    • This is actually kind of a DIY project, but I can modify your switch or I can send my modified switch, if you agree to ship back yours, after replacement.
      For transactions details please contact me over e-mail (use contact form here or PM on Miata forum).


    • In this implementation external microcontroller act as a simple state machine, listening LIN messages (catching event when windows were lowered automatically) and position of Convertible top switches. Output of microcontroller connected parallel to manual switches, imitating pressing up or down. I’m not sure if NC has similar LIN bus commands, but it is possible to do the same even without LIN protocol.


  3. Seems slightly more difficult on the NC, was trying to look to see if we could combine this with the PRHT but they run in two separate modules. is the windows & which goes to & on the roof.

    Would be good to combine this with smarttop for added functionality or even bypass the need for that if we could re-interpret the speed limiter for it which Im guessing is sent over CAN


    • It is very different from ND, ND has no CAN bus on the door harness. With CAN you probably don’t need to do any hardware modification inside switch, just add external microcontroller.


    • Maybe I’m wrong. CAN seems used for speed control only. Window control will be similar to ND version, but you need to check these 2 wires from roof control, what they actually do


  4. I was able to figure out CAN messages from fob keys, this makes possible (with external microprocessor) to control windows from the key, when you lock or unlock the car. This will be my next project.

    Liked by 1 person

  5. Perfect, I try your automatic roll-up windows system during my holidays 😉

    Do you have an idea to use the video input of the camera as video input without having to put reverse gear? Or is it impossible without can bus converter?
    Thank you


  6. Pingback: Key fob controlled windows | Gadgets for my MX-5 2016 (ND)

  7. Hi, I’m trying to keep the Accessory-Relais powered for 40 Seconds or until the drivers side door is opened. Is it possible to reprogramm this small circuit of yours to sense the ignition signal (to start the timer) sense the drivers side door switch, connect it to a 12V power supply and have it contol the ACC-Relay of the car?


  8. Is there any way to make this work with the door open? I’d love to have a version of this that will open the windows fully when I am getting in and take the top down before entering the vehicle.


  9. Hello. I was reading about your experience in this window system…May be can you help me with a advice. I have a problem with the hall effect in my mazda RF. When I open the driver door my glass go down completely ( no few inches) and the power window main switch is blocked. Then I close the door and it works again, but to leave the car and close the glass of the driver I must go by the passenger side to up driver’s window and then turn off the car….driver side doors glass cannot be operated automatically.
    Now I cut the wire 2L of the power window main switch wiring connector and the glass is not going down when I open the driver door.

    The hard top have a similar problem when I try to open it. the driver window go down completely and the system shows a malfunction. the passenger side down a few inches.

    where I find the hall system on the board?


    • sorry, I forgot to answer this one. Maybe too late. Hall sensors located inside the motor. You can unscrew 3 screws to remove the motor and you will see PCB with sensors on top of the motor.


  10. Hello there,
    quick question: Will your mod still work for my 2018 G184?
    I don’t have the doorlock button but one big lock windows button instead.

    I would just try it but am rather hesitant on working on the interor of my new car without knowing whether it would work or not.



  11. Pingback: Automatic Roll-Up Windows – Part 2 | Gadgets for my MX-5 2016 (ND)

  12. Pingback: Automatic Roll-Up Windows – Part 2 | Gadgets for my MX-5 2016 (ND)

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.