PopularFX
Home Help Search Login Register
Welcome,Guest. Please login or register.
2024-05-18, 20:01:54
News: Registration with the OUR forum is by admin approval.

Pages: [1]
Author Topic: Arduino Microcontrollers  (Read 4618 times)
Group: Moderator
Hero Member
*****

Posts: 2661
I was in the middle of a project last night and needed a breather so I displayed out favorite logo,lol. I also found a neat picture hidden deep in the bowels of my project archives, Oh the memories :). This was one of my first magnetic levitation experiments and I was measuring instabilities with a laser. I learned that the magnetic field was most definitely not uniform on the microscopic scale and induced instability on rotation.
It's too bad we cannot post video's because I have some very interesting ones concerning levitation. There is just something about it which boggles the mind, it is easy to understand why it works but it is still just very bizarre to see it up close.

AC


---------------------------
Comprehend and Copy Nature... Viktor Schauberger

“The first principle is that you must not fool yourself and you are the easiest person to fool.”― Richard P. Feynman
   

Group: Elite Experimentalist
Hero Member
*****

Posts: 1579
Frequency equals matter...


Buy me a drink
Youtube?


---------------------------
   
Group: Moderator
Hero Member
*****

Posts: 2661
Here is a basic opto-isolated buck converter circuit I whipped up in Fritzing, awesome open source software.

The circuit can drive any N channel Mosfet with the 7667 Mosfet driver in pretty much any application and is normally in the off state until the Arduino pin 6 goes HIGH. I will write up the code for manual timing through the Arduino interface, PWM using a simple 10K trimmer pot and PWM through a GUI so we can move a slider with our mouse on our computer desktop.

AC


---------------------------
Comprehend and Copy Nature... Viktor Schauberger

“The first principle is that you must not fool yourself and you are the easiest person to fool.”― Richard P. Feynman
   
Group: Moderator
Hero Member
*****

Posts: 2661
Manual timing for circuit


int led1Pin=6;

void setup()  {
  pinMode(led1Pin, OUTPUT);// set pin 6 as output
   
}

void loop()  {
   
 
  digitalWrite(led1Pin, HIGH);  // turn ON
  delay(10);  // delay 10 milliseconds                 
  digitalWrite(led1Pin, LOW);  // turn OFF   
  delay(10);  // delay 10 milliseconds
 
}


// delay(10) is in milliseconds, 1000ms= 1 second
// for smaller delay use  delayMicroseconds(10);   instead of   delay(10);
//   1000 microseconds= 1 millisecond
//equal ON/OFF delay equals 50% duty cycle


---------------------------
Comprehend and Copy Nature... Viktor Schauberger

“The first principle is that you must not fool yourself and you are the easiest person to fool.”― Richard P. Feynman
   
Group: Moderator
Hero Member
*****

Posts: 2661
In this mod the 10K external pot controls the duty cycle of the mosfet, the frequency is about 500Hz and duty cycle varies.




int ledPin = 6;      // output on digital pin 6
int analogPin = 0;   // potentiometer connected to analog pin 0
int val = 0;         // variable to store the read value

void setup()
{
  pinMode(ledPin, OUTPUT);   // sets the pin as output
}

void loop()
{
  val = analogRead(analogPin);   // read the analog input pin 0

  analogWrite(ledPin, val / 4); 
  // analogRead values go from 0 to 1023, analogWrite values from 0 to 255


---------------------------
Comprehend and Copy Nature... Viktor Schauberger

“The first principle is that you must not fool yourself and you are the easiest person to fool.”― Richard P. Feynman
   
Group: Guest
@AC
Well it all looks simple enough.
Thanks for taking the time to do this.
Do you have some video of this setup driving a load?, would be good to see it up and running.
   
Group: Moderator
Hero Member
*****

Posts: 2661
@tinman
Quote
Well it all looks simple enough.

There is not much to it and it helps if a person can connect the dots. Some might think a regulated power supply is beyond their skill level however think nothing of building a 30A DC motor driver when in fact there is little difference between them. I threw in a 15000uF/63v DC capacitor across the output and this circuit ran a bank of 20 1/2 watt LED's near ripple free.

One issue is that in PWM mode the max frequency is 500Hz however in manual timing mode the frequency can be much higher so I will write some code to tweak it. analogWrite is PWM mode and digitalWrite configures the pin manually so it is simply a matter of creating a variable delay from microseconds to milliseconds.

The thing to remember here is that almost all the changes occur not in the circuit but in the code so any changes are super easy and can be done on the fly.

AC





---------------------------
Comprehend and Copy Nature... Viktor Schauberger

“The first principle is that you must not fool yourself and you are the easiest person to fool.”― Richard P. Feynman
   
Pages: [1]
« previous next »


 

Home Help Search Login Register
Theme © PopularFX | Based on PFX Ideas! | Scripts from iScript4u 2024-05-18, 20:01:54