Adding sensors to complex Arduino nano Every bread board

Hello!
I need help modifying an existing bread board set-up to add another sensor, because this is not my own set up, I am not sure what I can change or if it is even possible to change. Also any tips on how to convert this to a diagram would be greatly appreciated, to me, this circuit is really complex so I'm not sure where to start. Va and Vb have 12V of power and Vc and ground have 24 volts of power.

Any help is greatly appreciated!

Do you have the source code, if not forget the modifications.

That setup can never have worked.
Three of the five transistors are not connected, and half of the parts are not connected to the power supply because of the split power rails of the breadboard.
Seems to me you have to start all over again.

Every transistor (mosfet?) circuit is the same, so work out one and copy.
Leo..

1 Like

Then start by drawing a schematic of the way the current breadboard is wired and save it for the time you have to put something back to the way it was.

That microcontroller does not look like a Nano Every. It looks more like a Nano 33 IoT. See: Arduino Nano 33 IoT — Arduino Official Store.
Your starting point for this assignment project should be a description of the circuit and what it is to achieve, then a schematic diagram (which can be created using a pencil and paper) , then finally code.

**Edit **

The power source Vb, which you have told us is +12v, is directly shorted ground. You probably can't rely on anything on that board and even the choice on microcontroller pins may be inappropriate.
Anyway, you've more or less got to rewire the whole thing as has been suggested.

It appears that the current circuit is intended to drive 5 inductive loads (relays or motors etc.) using what seem to be N channel mosfets and there is also what looks like an I2C screen. The hardware part of the project could actually quite simple because it all appears to be modular and would be easy to test using a few simple programs.

However, I guess the real complexity is going to be in the final software.

1 Like

it looks as though you may have to restart the project from scratch
in that case I suggest that it is time draw up a requirements-specification
this should give you an idea of the processor requirements in terms of computing power, memory (flash and SRAM), IO (I2C, SPI, GPIO, Canbus, ADCs, DACs, etc), WiFi/Bluetooth/LoRa connectivity etc
you then select a microcontroller to meet the requirements allowing some room for expansion (when prototype is operational end-users always ask for more functionality)

Hello!
I was wondering what was is the best way to test for voltage going through my circuit, my circuit has a little display screen and I was hoping that if I was able to turn it on that it would mean there is constant electricity. I have tried using a multi meter but I have been getting inconsistent readings. I am using an Arduino nano, Va and Vb have 24 V, Vc and ground have 12 V. The bunched up wire at the top go to a sensors and an ignition system, The display screen should say the word ARMED. One suggestion I was told was to put LED lights through the circuit but I have no idea where I put them or what the right place is to put them to test for power through the circuit.

Here is the code for the ignition, When I just run the Arduino by itself connected to the computer I an output that says:
Sketch uses 16267 bytes (33%) of program storage space. Maximum is 49152 bytes.
Global variables use 417 bytes (6%) of dynamic memory, leaving 5727 bytes for local variables. Maximum is 6144 bytes.

// Arduino Nano control system for Detonation-Based Combustion testing.
// The Arduino system will wait for a button input. When the button is pressed, the air knife is
// activated. After a delay, the valves are opened. After a delay for the powder to be released,
// the valves are closed, the air knife is turned off, and there is a spark for the explosion.
// The system will then not respond to inputs until it is reset. Press the white button on the
// Arduino Nano labeled "RST" to reset the program.

// Set Board Manager to  = Arduino Nano Every

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET -1

Adafruit_SSD1306 display(OLED_RESET);

int spark = 4;       // 24V Trigger for combustion spark
int air_knife = 5;   // 24V Air knife to break up powder(THIS NEEDS TO BE RENAMED)
int bGate = 7;   // used to be 6 12V Pneumatic cylinder to control blast gate valve
//int gate = 7;  // 12V Pneumatic cylinder to control valve that controls gate
int powder = 8;  // 12V Pneumatic cylinder to control valve tht pushes out powder
int button = 9;      // Button to start control process
int camera_trigger = 10;    // 5.5V Pin to trigger the camera - needs low to high to trigger
int TMX_trigger = 11; //5V Signal to 3.3V input to trigger TMX - needs high to low to trigger


void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)

  pinMode(powder, OUTPUT);
//  pinMode(gate, OUTPUT); (PINS NEED TO BE RENAMED)
  pinMode(air_knife, OUTPUT);
  pinMode(spark, OUTPUT);
  pinMode(camera_trigger, OUTPUT);
  pinMode(button, INPUT_PULLUP);
  pinMode(bGate, OUTPUT);
  pinMode(TMX_trigger, OUTPUT);

}

void loop() {
  // SEE HELP MANUAL FOR POWDER TIMINGS
      // edit the following timing based on powder size and amount:
  int air_knife_delay = 600;     // Delay between starting air knife and opening valves, 1 seconds, turns on air knife for this amount of time?

      // no edit: 
  int open_gate_delay = 1000;     // Does not seem to be used... Delay between opening the gate and closing, this is the powder dispersion time
  int sparktime = 100;          //  Delay between starting and stopping spark,
  int spark_delay = 200;          // Delay between starting and stopping spark, half a second--CJ:What?

  drawScreen(0, air_knife_delay, open_gate_delay, sparktime, spark_delay);

  while (digitalRead(button) == HIGH) {}   // Wait for button press

  drawScreen(1, air_knife_delay, open_gate_delay, spark, spark_delay);

  digitalWrite(bGate, HIGH);      // Open blast gate first
      // Note that as soon as the air knife turns on the powder will be ejected
  digitalWrite(air_knife, HIGH);    // Turn on air knife
  digitalWrite(TMX_trigger, LOW);        // Start TMX High signal
  delay(air_knife_delay);           // Wait after turning on air knife, turns on air knife?
   digitalWrite(air_knife, LOW);   // Turn off air knife
  digitalWrite(bGate, LOW);     // Close blast gate
  delay(sparktime);                  // Delay Spark
  digitalWrite(spark, HIGH);        // Trigger spark
  digitalWrite(camera_trigger, HIGH);       // Trigger the camera - low to high
  digitalWrite(TMX_trigger, HIGH);        // Trigger TMX Capture
  delay(spark_delay);               // Leave spark on briefly to ensure that the signal is delivered
  digitalWrite(spark, LOW);         // Turn off spark
  digitalWrite(camera_trigger, LOW); // Turn off camera trigger
  digitalWrite(TMX_trigger, LOW); // Turn off TMX trigger

  while (1) {  drawScreen(2, air_knife_delay, open_gate_delay, sparktime, spark_delay); }                             // Stop
}


void drawScreen(int status, int air_knife_delay, int open_gate_delay, int sparktime, int spark_delay)
{

  // Clear the buffer.
  display.clearDisplay();
  display.setCursor(0, 0);
  display.setTextColor(WHITE, BLACK);
  display.setTextSize(2);

  // Program status
  switch (status) {
    case 0:
      display.write("Armed");
      break;
    case 1:
      display.write("Triggered");
      break;
    case 2:
      display.write("Safe");
      break;
  }

//
//  // Air Knife Status
//  display.setTextColor(WHITE, BLACK);
//  display.setTextSize(1);
//  //drawPercentbar( 0, 0, 50, 10,p1);
//  display.setCursor(0, 25);
//  display.print("OX:");
//
//  display.setCursor(27, 25);
//  if (air_knife_timer == 0) {
//    display.print("-.-");
//  } else if (air_knife_timer > air_knife_delay) {
//    display.print(air_knife_delay / 1000, 1);
//  }
//  else {
//    display.print(air_knife_timer / 1000, 1);
//  }
//  display.print(" / ");
//  display.print(air_knife_delay / 1000, 1);
//  display.print(" s.");
//
//  display.setCursor(108, 25);
//  if (air_knife_ON == true)   {
//    display.print("ON\n");
//  }
//  else {
//    display.print("OFF");
//  }
//
//
//  // Aluminum Dispersion Status
//  display.setTextColor(WHITE, BLACK);
//  display.setTextSize(1);
//  //drawPercentbar( 0, 0, 50, 10,p1);
//  display.setCursor(0, 40);
//  display.print("AL:");
//
//  display.setCursor(27, 40);
//  if (open_valve_timer == 0) {
//    display.print("-.-");
//  } else if (open_valve_timer >= open_valve_delay) {
//    display.print(open_valve_delay / 1000, 2);
//  }
//  else {
//    display.print(open_valve_timer  / 1000, 2);
//  }
//  display.print(" / ");
//  display.print(open_valve_delay / 1000, 2);
//  display.print(" s.");
//
//  display.setCursor(108, 40);
//  if (open_valve_ON == true)   {
//    display.print("ON\n");
//  }
//  else {
//    display.print("OFF");
//  }
//
//
//  // Detonator Status
//  display.setTextColor(WHITE, BLACK);
//  display.setTextSize(1);
//  //drawPercentbar( 0, 0, 50, 10,p1);
//  display.setCursor(0, 55);
//  display.print("DT:");
//
//  display.setCursor(27, 55);
//  if (spark_timer == 0) {
//    display.print("-.-");
//  } else if (spark_timer >= spark_delay) {
//    display.print(spark_delay / 1000, 1);
//  }
//  else {
//    display.print(spark_timer / 1000, 1);
//  }
//  display.print(" / ");
//  display.print(spark_delay / 1000, 1);
//  display.print(" s.");
//
//  display.setCursor(108, 55);
//  if (spark_ON == true)   {
//    display.print("ON\n");
//  }
//  else {
//    display.print("OFF");
//  }
  //  drawPercentbar( 0, 40, 100, 15, p3, 0, 0);

  display.display();
}

Any feedback is greatly appreciated

Well, this is quite a big circuit. Please check part by part. The display should be checked separately. The voltages across the MOSFET pins etc. should be checked with multimeter too.

  • You can measure DC voltage with a DVM.
    When it comes to DC Pulses, you cannot.

  • Are you aware there are breaks in the power rails Yellow.

  • We need a schematic.

This thread seems to be a continuation of this one.
Leo..

Hold on there partner. When you measure with the multimeter where is the black (negative) etc lead connected in your circuit? It should be connected to ground for all measurements. The multimeter readings should be pretty stable (within +/- 0.2 volts or so). Else perhaps the voltage is not stable.

24V should not be any near your Nano. Any 24V input needs to be divided down to the Nano voltage level.

I have merged your topics due to them having too much overlap on the same subject matter @connorsa.

In the future, please only create one topic for each distinct subject matter and be careful not to cause them to converge into parallel discussions.

The reason is that generating multiple threads on the same subject matter can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Thanks in advance for your cooperation.

There is nothing worth preserving of that layout. Apart from what else has been said, the mosfet gate pull down resistors are the wrong side of the gate current limiting resistors.
One power rail is shorted to ground and with 24v you risk damaging the mcu and display.

It appears to be a school exercise where you have been given a mess to sort out before you can start.

In your position, I would leave the Nano (now an Every) and display where they are and rip out all wires and components on your side of the row of 8 green single space jumpers. Then wire the display directly to the Nano (carefully checking the power and I2C connections). Power the Nano via a USB cable and get the display working. Once the display is working wire up one of the mosfets (say the one to control the air knife) and attempt to get that working, maybe just using a led (and series resistor) to indicate that it is working. The remaining 4 mosfet circuits will be copies of what you will already have.

I could imagine that the software also has some traps built in, for example the i2c address of the display in the begin statement contradicts that which appears in the comment.

I think this project is way over your head and you need to build up to it. I recommend for you is to get a copy of the Arduino Cookbook and go through it cover to cover and try the projects that are similar to what you want. Also do some tutorials on basic electronics. If you want to do it properly get a schematic capture program such as KiCad (free) and learn how to use it. It will do schematic capture through generating the gerber files needed to do a PCB (Printed Circuit Board).