C7 Tech/Performance Corvette Technical Info, Internal Engine, External Engine, Tech Topics, Basic Tech, Maintenance, How to Remove & Replace
Sponsored by:
Sponsored by:

NPP retrofit

Thread Tools
 
Search this Thread
 
Old Aug 5, 2020 | 08:03 AM
  #21  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

Uno is fine. A nano I'd basically a miniature uno. Same architecture basically. Can you tell me what the exact error you are getting is?
Reply
Old Aug 5, 2020 | 09:15 PM
  #22  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

Can you please identify which pin numbers - alpha numeric - that this circuit and the bluetooth switch are supposed to connect to on the Arduino UNO?

Its terribly illegible...
Reply
Old Aug 5, 2020 | 09:47 PM
  #23  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

On the left side, black is ground (grnd) pin and red is VCC pin. On the right side, pin 7 (d7) is the signal pin that your pwm signal will come out of and pin 9 (d9) is the pin your button will attach to. You can see both of these values set in the first couple of lines of the code. You can change these pins to whatever you want as long as they are the digital pins on the Arduino, but for simplicity, just leave it as it is.

const int _pwmPin = 7; //pin7 on board
const int _buttonPin = 9; // pin9 on board

By the way, I was able to download and use the pwm library that's linked in my original post on an Uno just fine. The code compiles and uploaded to the uno fine.
Reply
Old Aug 7, 2020 | 08:03 AM
  #24  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

It is still completely unclear which pins to connect to - the pic you attached is blurry on a HD 20" hi rez monitor
On the Uno - not nano - which pin does the green wire connect to?
Which pin for the blue wire?

Last edited by Argentimage; Aug 7, 2020 at 08:17 AM.
Reply
Old Aug 7, 2020 | 08:31 AM
  #25  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

Originally Posted by CityOf9Gates
On the left side, black is ground (grnd) pin and red is VCC pin. On the right side, pin 7 (d7) is the signal pin that your pwm signal will come out of and pin 9 (d9) is the pin your button will attach to. You can see both of these values set in the first couple of lines of the code. You can change these pins to whatever you want as long as they are the digital pins on the Arduino, but for simplicity, just leave it as it is.

const int _pwmPin = 7; //pin7 on board
const int _buttonPin = 9; // pin9 on board

By the way, I was able to download and use the pwm library that's linked in my original post on an Uno just fine. The code compiles and uploaded to the uno fine.
As I said in my previous post, the pins that you connect to on the uno are labeled vcc for positive, gnd for ground d9 for your button and d7 for your signal. If you look on your uno, right next to the pins is a label, just connect to the pins I have listed here.
Reply
Old Aug 7, 2020 | 08:51 PM
  #26  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

Does the wire to pin 2 always have current? Or only when the switch is triggered?


Reply
Old Aug 7, 2020 | 09:38 PM
  #27  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

I'm not sure where you got pin 2 from. You should have constant power (+)y going into the VCC pin on your Arduino. Ground going into the ground pin on your Arduino. Your signal comes out of the Arduino on pin digital pin 7 (d7) and your button should connect to digital pin 9 (d9). Those are the only pins involved. D7 will always have a voltage across it, but it'll be close to 0 when the duty cycle is at 20% and close to 5v when at 80 % duty cycle.
Reply
Old Aug 8, 2020 | 06:03 AM
  #28  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

Pin 2? the NPP valve
Reply
Corvette Stories

The Best of Corvette for Corvette Enthusiasts

story-0

10 Ugly Corvettes That We Still Kinda Love

 Joe Kucinski
story-1

Top 10 Most Expensive Corvettes Ever Sold on Bring A Trailer

 Brett Foote
story-2

10 Things Every Corvette Owner Needs (2026 Edition)

 Michael S. Palmer
story-3

8 Most "Only Corvette Owners Understand" Quirks and Problems

 Pouria Savadkouei
story-4

10 Reasons the C6 Z06 is Still A Performance Benchmark After 20 Years

 Joe Kucinski
story-5

How Much Horsepower Every Corvette Engine "LOST" in 1972

 Joe Kucinski
story-6

Top 10 DOs and DON'Ts for Protecting Your Convertible Top!

 Michael S. Palmer
story-7

Top 10 Most Explosive Corvettes Ever Made: Power-to-Weight Ratio Ranked!

 Joe Kucinski
story-8

150 hp to 1,250 hp: Every Corvette Generation Compared by the Specs That Matter

 Joe Kucinski
story-9

8 Coolest Corvette Pace Cars (and Replicas) of All Time

 Verdad Gallardo
Old Aug 8, 2020 | 09:04 AM
  #29  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

Apologies, I thought we were talking about the Arduino still. Yes, pin 2 on the actuator will have voltage all the time. It will fluctuate depending on duty cycle (if you are looking at it with a multimeter) between close to 0 and 10v.
Reply
Old Aug 9, 2020 | 09:31 PM
  #30  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

well there is something terribly wrong with this - how about posing picture of you board???

The first one could not get it to power at the barrel connection - and they are real italian cover boards --
so I used the USB - the orange light flashed no on each touch of the momentary switch -- however when it did, there was no valve action then it stopped, not consistent in the flash on momentary switch - like maybe once in ten, so I spend a good deal of time like three hours making up a second board.

The second and third ardunio UNO's fried at the USB connection on plug in - so something is wrong - short to ground.

I do not doubt you have it working but something is really flawed in these instructions,

I'd really like to see your layout

then

what is the purpose of the resistors across ground and 1.5k and 1k values?

I should see a resistance difference with a multimeter? 10k ohm may either be at limit to measure thus cannot or it isnt 10k ohm...




Reply
Old Aug 10, 2020 | 12:01 AM
  #31  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

I can take a picture of my board for you tomorrow. I'll put the circuit together on a breadboard also so you can see the connections a little clearer. The 1k and 1.5k resistors to ground are what's called a voltage divider, https://en.m.wikipedia.org/wiki/Volt...0the%20divider . Basically it's taking the 12 volts out of the voltage regulator and stepping it down to 10 volts that the actuators require.this circuit is very simple. Please post a picture of what you have and I'll try to look at it too.
Reply
Old Aug 10, 2020 | 12:21 PM
  #32  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

Question - does the signal trigger the valve to move back forth or just 25%, that is a quarter turn each time it is triggered?

And then.. to the wiki Ohms law formula pasted in...you said we want to drop 12v to 10v, that is a 5/6 ratio, yes? Yes.

How do the 1.5 and 1 ohm resistors figure in to a 5/6 ratio?
The on line calculators say 1 K Ohm and 5k Ohm on two resistors - why is this using three?


Last edited by Argentimage; Aug 10, 2020 at 01:03 PM.
Reply
Old Aug 10, 2020 | 01:22 PM
  #33  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

Originally Posted by Argentimage
Question - does the signal trigger the valve to move back forth or just 25%, that is a quarter turn each time it is triggered?

And then.. to the wiki Ohms law formula pasted in...you said we want to drop 12v to 10v, that is a 5/6 ratio, yes? Yes.

How do the 1.5 and 1 ohm resistors figure in to a 5/6 ratio?
The on line calculators say 1 K Ohm and 5k Ohm on two resistors - why is this using three?
It's not using 3 resistors for the voltage divider, only 2. The entire blue line is 10v because the 1.5k and the 10k dump voltage back to ground (this is the voltage divider). The 1k resistor after is just an inline resistor on what is now a 10v leg of the circuit on it's way to the transistor.

you can plug the values into this calculator to see that it's correct https://ohmslawcalculator.com/voltag...der-calculator



The valve actuator turns exactly 1/4 turn between full open and full close.
Reply
Old Aug 11, 2020 | 06:22 AM
  #34  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

I am asking back forth left right movement?
What is reversing the current?

YEAH, I've seen that calculator, and there is a ready made board out there to do this....and that seller said it s a 5/6 ratio...and the Ohm law would look to be 5/6 ratio... thats why the questions go deeper.
12v in
10k Ohm Resistance 2

if we want 10v out the calculator returned 2 yesterday, and 2 today too. Why is it 1.5 on the board?



Last edited by Argentimage; Aug 11, 2020 at 07:32 AM.
Reply
Old Aug 11, 2020 | 08:26 AM
  #35  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

I' sent you a message to your inbox. I built the circuit for you with an Uno and I figured out why yours isn't working.

Iyou are welcome to experiment and come up with your own solution using a pre made voltage divider of you choose. I wouldn't do it that way. You can also buy 10v voltage regulators, etc. But they are less common. Your solution is a very simple one. Pin 7 on an Uno doesn't generate pwm signals you need to switch pin7 and pin9 in the code and in your circuit. Since my instructions used a nano and I hadn't built this circuit with an Uno. I didn't know that was the issue. I will update the instructions later to be more generic, but, the issue isn't the voltage divider circuit, it's the choice of using the uno and not the nano as described.
Reply
Old Aug 11, 2020 | 11:12 AM
  #36  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

I have revised the schematic to hopefully make the circuit more clear. I have also included an Arduino Uno in place of the nano used previously because maybe the larger form factor of the UNO is more accessible. Both Uno and Nano will work fine. Also, I have revised the code slightly to send pwm over pin 9 on the uno/nano. I've also included a second wired momentary button in the schematic for those that don't want a wireless option.

Last edited by CityOf9Gates; Aug 11, 2020 at 11:14 AM.
Reply
Old Aug 11, 2020 | 04:30 PM
  #37  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default



Reply

Get notified of new replies

To NPP retrofit

Old Aug 19, 2020 | 06:01 PM
  #38  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

Im getting this error code:
SUggestions on how to solve?
SKETCHES THAT COULD NOT BE IMPORTED:
[PWM] Error: no ino file
[utility] Error: no ino file
[PWM_lib_example] There's already a sketch with this name in your Sketchbook, please rename it and try to import again.
[PWM_lib_resolution_example] There's already a sketch with this name in your Sketchbook, please rename it and try to import again.
​​​​​​​
Reply
Old Aug 19, 2020 | 06:10 PM
  #39  
Argentimage's Avatar
Argentimage
Drifting
15 Year Member
Active Streak: 30 Days
Active Streak: 60 Days
Photogenic
 
Joined: Sep 2009
Posts: 1,810
Likes: 212
From: Metro MI too close to the D
Default

Im getting this error code:
SUggestions on how to solve?
SKETCHES THAT COULD NOT BE IMPORTED:
[PWM] Error: no ino file
[utility] Error: no ino file
[PWM_lib_example] There's already a sketch with this name in your Sketchbook, please rename it and try to import again.
[PWM_lib_resolution_example] There's already a sketch with this name in your Sketchbook, please rename it and try to import again.

then when I upload and save, this error:
PWM.h no such file or directory

down further it says compiliation terminated

all this is in red:



Detecting libraries used...

/tmp/190827772/sketch_aug19b_copy/sketch_aug19b_copy.ino:1:10: fatal error: PWM.h: No such file or directory

#include <PWM.h> // pwm-frequency-library #include <EEPROM.h> const int _pwmPin = 9; //pin9 on arduino board const int _buttonPin = 7; // pin7 on board bool _isRunning = true; bool ReadValveState() { int valveSt = EEPROM.read(0); //read the last valve state from memory if (valveSt == 1) { return true; } else { return false; } } void DoOpenValves()//sends a pwm signal to valves causing them to open { pwmWrite(_pwmPin, 203); } void DoCloseValves()//sends a pwm signal to valves causing them to close { pwmWrite(_pwmPin, 51); } void setup() { InitTimersSafe(); SetPinFrequencySafe(_pwmPin, 200); //sets the pwm pin frequency to 200 Hz pinMode(_pwmPin, OUTPUT); // sets the pwm pin as an output pin pinMode(_buttonPin, INPUT_PULLUP); //sets the input pin for the button pinMode(LED_BUILTIN, OUTPUT); if (ReadValveState() == true) //initialize the valves to the last state (if the valves were open when the car was turned off, the valves will be open when the car is turned on, etc { DoCloseValves(); } else { DoOpenValves(); } _isRunning = false; } void loop() //the main body of our arduino code, this is run over and over as long as there is power { if (_isRunning == false) //this is to prevent repeated button presses { if (digitalRead(_buttonPin) == LOW) //check the state of the button if it's pressed { _isRunning == true; if (ReadValveState() == true) //if the valves are closed, { EEPROM.write(0, 0); //set the new valve state and open the valves DoOpenValves(); } else //the must be opened { EEPROM.write(0, 1); //set the new valve state and close the valves DoCloseValves(); } FlashBuiltInLED(); // this will give a delay of 1 seconds this helps in debugging to know if your circuit is working when not connected to a valve. If your button is pressed and you see a flashing, then the button is triggering the open/close of the the valve pwm _isRunning == false; } } } void FlashBuiltInLED() { for (int i = 0; i <= 10; i++) { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on delay(100); // wait for tenth a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off delay(100); // wait for tenth a second } }/* */ void setup() { } void loop() { }

^~~~~~~

compilation terminated.

exit status 1



Reply
Old Aug 19, 2020 | 07:18 PM
  #40  
CityOf9Gates's Avatar
CityOf9Gates
Thread Starter
Instructor
 
Joined: Jun 2017
Posts: 125
Likes: 7
Default

You need to download the pwm.h library from the link at the top of the thread. Then you need to add pwm.h as a library https://www.arduino.cc/en/guide/libr...nd%20open%20it.

Then re compile your code.
Reply



All times are GMT -4. The time now is 06:45 AM.

story-0
10 Ugly Corvettes That We Still Kinda Love

Slideshow: 10 ugly Corvettes that we still kinda love.

By Joe Kucinski | 2026-06-03 10:34:17


VIEW MORE
story-1
Top 10 Most Expensive Corvettes Ever Sold on Bring A Trailer

A lot of money has changed hands at the online auction house over the years.

By Brett Foote | 2026-06-03 10:21:50


VIEW MORE
story-2
10 Things Every Corvette Owner Needs (2026 Edition)

Slideshow: 10 great gifts Corvette enthusiasts actually want for Father's Day!

By Michael S. Palmer | 2026-06-03 15:43:40


VIEW MORE
story-3
8 Most "Only Corvette Owners Understand" Quirks and Problems

Slideshow: These are the quirks, annoyances, and oddly lovable problems that every Corvette owner eventually learns to live with.

By Pouria Savadkouei | 2026-05-28 09:31:39


VIEW MORE
story-4
10 Reasons the C6 Z06 is Still A Performance Benchmark After 20 Years

Slideshow: 10 reasons why the C6 Z06 is still a performance benchmark after 20 years.

By Joe Kucinski | 2026-05-27 17:20:09


VIEW MORE
story-5
How Much Horsepower Every Corvette Engine "LOST" in 1972

Slideshow: How much horsepower every Corvette engine lost in 1972.

By Joe Kucinski | 2026-05-27 16:54:53


VIEW MORE
story-6
Top 10 DOs and DON'Ts for Protecting Your Convertible Top!

Slideshow: How to Protect A Convertible Top: 10 DOs & DON'Ts

By Michael S. Palmer | 2026-04-03 00:00:00


VIEW MORE
story-7
Top 10 Most Explosive Corvettes Ever Made: Power-to-Weight Ratio Ranked!

Slideshow: The 10 most explosive Corvettes ever built based on power-to-weight ratio.

By Joe Kucinski | 2026-05-20 07:23:03


VIEW MORE
story-8
150 hp to 1,250 hp: Every Corvette Generation Compared by the Specs That Matter

Slideshow: From C1 to C8 we compare every Corvette generation by the numbers.

By Joe Kucinski | 2026-05-12 16:54:12


VIEW MORE
story-9
8 Coolest Corvette Pace Cars (and Replicas) of All Time

Slideshow: Some Corvette pace cars became collectible legends, while others perfectly captured the look and attitude of their era.

By Verdad Gallardo | 2026-05-11 09:50:51


VIEW MORE