+- +-

+- User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Stats ezBlock

Members
Total Members: 144
Latest: Donald
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 2261
Total Topics: 109
Most Online Today: 14
Most Online Ever: 53
(September 16, 2016, 01:39:23 AM)
Users Online
Members: 0
Guests: 10
Total: 10

Author Topic: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)  (Read 9297 times)

Offline Vincent

  • Jr. Member
  • **
  • Posts: 50
  • life is a mystery
Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« on: February 17, 2014, 08:49:17 PM »
What it does this sketch ?

With this sketch you have a DDS generator with a train pulse generator. Both adjustable.

What do you need ?

:: One Arduino UNO R3 (MEGA328P ATMEGA16U2 ).
:: One LCD Board Keypad Shield.

Technical Specs (adapted for short a coil).

:: DDS 500hz - 20khz // Duty Cycle 2 % - 99%.
:: Shorting Coil pulses from 1 microseconds (fix).
:: Phase delay : 1 to 600 (adjustable).
:: Pulses by shot : 1 to 30 (adjustable).

Hardware Connections

:: Pin 2 must be connected to Pin 3.
:: Pin 3 Output DDS.
:: Pin 12 Output Short Coil Module.

Software

1. You must have the Arduino environment installed and working.
2. Install the library PWM (attached to this post).
3. Open the Sketch.
4. Before do the upload you must check the main frequency and DDS on this line :

// **************User must enter Frequency in HZ and Duty Cycle********
int32_t frequency_3 = 8000;    //Frequency (Hz) Master Coil Pin 3
int dutyC= 420;               // Duty Cycle 10 (0%) - 1000(100%)
//********************************************************************************
If you want 5500 hz and 50% Duty Cycle :

int32_t frequency_3 = 5500;    //Frequency (Hz) Master Coil Pin 3
int dutyC= 520;               // Duty Cycle 10 (0%) - 1000(100%)

5. Save and upload to your Arduino.

FAQ

1. Why do I need to change the main frequency from the code ?

The arduino is working at full load. More choices from the keyboard means more power. I'm working in a more powerfull version. But this version do the job very well.

2. How do I change Phase and Pulses Quantity ?

Use the LEFT and RIGHT buttons to Phase change (steps 0.5) and UP and Down to Pulse change.

3. Why my LCD blinks at certain combinations ?
See FAQ 1. You will know wich combinations are the best for your setup.

Thank's to kEhYo77 and Romero. His code and explanations helped me to develop this application.

Enjoy,

Vincent.

Offline Romero

  • Administrator
  • Hero Member
  • *****
  • Posts: 881
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #1 on: February 17, 2014, 09:46:13 PM »

thank you Vincent for all your effort. I will give them a first try tomorrow.

Best regards,
Romero

Offline Romero

  • Administrator
  • Hero Member
  • *****
  • Posts: 881
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #2 on: February 18, 2014, 11:54:23 AM »
Hi Vincent,

this module outputs signal only on pin 3 but nothing on pin 12 any idea?

Regards,
Romero

Offline Romero

  • Administrator
  • Hero Member
  • *****
  • Posts: 881
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #3 on: February 18, 2014, 02:30:54 PM »
Working now, it works only with Arduino Uno not with Mega
I like the wide range of Phase, this way I can use the same  code to test shorting BEMF
« Last Edit: February 18, 2014, 02:39:22 PM by Romero »

Offline Vincent

  • Jr. Member
  • **
  • Posts: 50
  • life is a mystery
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #4 on: February 18, 2014, 08:47:03 PM »
Nice. Enjoy it !!!
Vincent

Offline Vincent

  • Jr. Member
  • **
  • Posts: 50
  • life is a mystery
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #5 on: February 18, 2014, 08:48:15 PM »
For those who encountered problems with the initial setup.

This module only works in an Arduino UNOR3 or Pro-Mini.

:: PIN 3 and 2 must be connected together.

** PIN 3 is the DDS output and PIN 2 is triggering the signal // Driving the main coil.

:: PIN 12 is driving the shorting coil module.

**************************************************************************
Keypads Pins

Starting from the LEFT to Right (Pins on the top).

Pin13. NC
Pin12 - Output to short module.
Pin11. NC
Pin3 - DDS Output.
Pin2 - Trigger connected to Pin3.
Pin1.  NC
Pin0.  NC

**************************************************************************

How to check if your pins are working well ?

1 .First, if you soldered the extra pins, be sure that everything is OK there.
2. Upload the debug_pins routine to your Arduino. Then you will see on your scope :

Pin12 - 1000khz frequency.
Pin3   - 4000khz frequency.
Pin2   - 8000khz frequency.

with 0.10 seconds interval.

**************************************************************************

How to check if the buttons are working OK ?

1. Upload the debug_buttons routine.
2. Open the serial console.

You mast see this values or closer to these numbers when you press a button :

No Button pressed : 1023
UP : 132
Down : 312
Left : 482
Right : 0
Select : 720


Regards.

Vincent

Offline Vincent

  • Jr. Member
  • **
  • Posts: 50
  • life is a mystery
Shorting Coil V2 Turbo
« Reply #6 on: February 20, 2014, 08:46:34 PM »
Hi,

I'm posting a new version for this module. While I'm doing tests, I did several improvements that could help another people.

Improvements

:: Minimal pulse for short a coil of : 0.1250 us
:: Train pulses frequency : 1.6 Mhz. ( against 320 Khz of Version 1).
:: Bug fixed when phase was 1.
:: Max pulses by shot reachs 40 now.
:: Output PIN Short Coil Module now is 13.


:: Only works in :Arduino UNO R3 (MEGA328P ATMEGA16U2 ).
:: LCD Board Keypad Shield.

Technical Specs (adapted to short a coil).

:: DDS 500hz - 20khz // Duty Cycle 2 % - 99%.
:: Shorting Coil pulses from 0.1250 us (fix).
:: Phase delay : 2 to 600 (adjustable).
:: Pulses by shot : 1 to 40(adjustable).

Hardware Connections

:: Pin 2 must be connected to Pin 3.
:: Pin 3 Output DDS.
:: Pin 13 Output Short Coil Module.

************************************************
Future Improvements for V3 Turbo Reload.

:: Cycle Control for Charge / Discharging Capacitor to a load.

Cheers,

Vincent

Offline Romero

  • Administrator
  • Hero Member
  • *****
  • Posts: 881
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #7 on: February 21, 2014, 11:41:40 AM »
Thank you Vincent!
Another question... you know the code from JL Naudin. Can you make it send train pulses for each sensing from the hall sensor? 4 fast pulses will be enough, also to be able to run 2 independent coils, 2 hall sensors... from one arduino. Down button in that code does not work too.
I have few projects that I am working on and later on this type of code will be super. I am also sure that many other people are appreciating your effort.

Lately I am learning how to to use a CNC Router as I have ordered one and expecting to get it by Monday but I have never used one before. Autocad or Solid Works are not my strenght too... lots of learning.

Regards,
Romero
« Last Edit: February 21, 2014, 11:54:24 AM by Romero »

Offline Vincent

  • Jr. Member
  • **
  • Posts: 50
  • life is a mystery
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #8 on: February 21, 2014, 08:26:10 PM »
Hi,

Another question... you know the code from JL Naudin. Can you make it send train pulses for each sensing from the hall sensor? 4 fast pulses will be enough, also to be able to run 2 independent coils, 2 hall sensors... from one arduino. Down button in that code does not work too.

@ I know the code, is well written. The button problem comes from the library. Every Keypad shield have different leaders resistors. There are like 4 versions on the market. Check the version that I fixed and tell me if it's working for you now.

(Thank's to JL Naudin for his code // All credits to him, I updated the library).


:: New Module

I can do the modification that you are proposing, but I need more information.

Hall 1 // Hall 2 // Coil 1 // Coil 2

:: Witch hall is driving  witch coil ?
::  Do you need a delay between the hall pulse and coil activation ?
::  MAX Rotor RPM and how many magnets ?
::  4 fast pulses on every coil ? How fast ?

Also I can modify JL Naudin code to send 4 fast pulses and start from there.

I have few projects that I am working on and later on this type of code will be super. I am also sure that many other people are appreciating your effort.

@ A pleasure to work on it.

Lately I am learning how to to use a CNC Router as I have ordered one and expecting to get it by Monday but I have never used one before. Autocad or Solid Works are not my strenght too... lots of learning.

@ I wish you  the best with a CNC. Autocad and Solid Works are complex, but with patience you will find the key to accomplish good designs. Take a look to google sketchup and G-code. Maybe sketchup can be a good tool to learn too, less complicate and a stepstone to get introduce into this amazing world of 3d, pieces and robots.

Regards,

Vincent.



Offline Romero

  • Administrator
  • Hero Member
  • *****
  • Posts: 881
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #9 on: February 21, 2014, 09:46:26 PM »
Hi,

Another question... you know the code from JL Naudin. Can you make it send train pulses for each sensing from the hall sensor? 4 fast pulses will be enough, also to be able to run 2 independent coils, 2 hall sensors... from one arduino. Down button in that code does not work too.

@ I know the code, is well written. The button problem comes from the library. Every Keypad shield have different leaders resistors. There are like 4 versions on the market. Check the version that I fixed and tell me if it's working for you now.

(Thank's to JL Naudin for his code // All credits to him, I updated the library).


:: New Module

I can do the modification that you are proposing, but I need more information.

Hall 1 // Hall 2 // Coil 1 // Coil 2

:: Witch hall is driving  witch coil ?
::  Do you need a delay between the hall pulse and coil activation ?
::  MAX Rotor RPM and how many magnets ?
::  4 fast pulses on every coil ? How fast ?

Also I can modify JL Naudin code to send 4 fast pulses and start from there.

I have few projects that I am working on and later on this type of code will be super. I am also sure that many other people are appreciating your effort.

@ A pleasure to work on it.

Lately I am learning how to to use a CNC Router as I have ordered one and expecting to get it by Monday but I have never used one before. Autocad or Solid Works are not my strenght too... lots of learning.

@ I wish you  the best with a CNC. Autocad and Solid Works are complex, but with patience you will find the key to accomplish good designs. Take a look to google sketchup and G-code. Maybe sketchup can be a good tool to learn too, less complicate and a stepstone to get introduce into this amazing world of 3d, pieces and robots.

Regards,

Vincent.
Hi Vincent,
Let's start to modify JL Naudin code and add  4 fast pulses instead of one.
Now  imagine 2 independent arduino, each driving separate coils.
What I wanted was to combine 2 arduino coil controllers into one then when adjustments are made via keypad both coils are receiving the same data, increasing or decreasing value sent to both direction. I am sure this can be done for more than 2 independent coils but for 2 is ok for me.
The number of magnets can be defined manually in the code, that is how is done in Naudin's code already.

I have used Google sketch up for basic design in the past but I find SolidWorks the best, you can also preview CNC operation before to prevent wasting material. I have used Autocad too but never for 3D modeling.
I have a new generator to build and I want to make use of the CNC Router facilities to make it. This is something I always wanted and now its time to learn how to use it. Next is to get a 3D printer and a 3D scanner.

Regards,
Romero

Offline Vincent

  • Jr. Member
  • **
  • Posts: 50
  • life is a mystery
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #10 on: February 22, 2014, 01:21:53 PM »
Hi Romero,

Let's start to modify JL Naudin code and add  4 fast pulses instead of one.

@ I'm working on it. Adjusting my old rotor but well balanced for the tests. Gives news ASAP.

Now  imagine 2 independent arduino, each driving separate coils.
What I wanted was to combine 2 arduino coil controllers into one then when adjustments are made via keypad both coils are receiving the same data, increasing or decreasing value sent to both direction. I am sure this can be done for more than 2 independent coils but for 2 is ok for me.

@ We can drive more than 2 coils with 1 arduino. I started to do code optimization, writing sentences in C. So low level programming give me more speed and power over the processor.

a+

Vincent
 

Offline Vincent

  • Jr. Member
  • **
  • Posts: 50
  • life is a mystery
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #11 on: February 26, 2014, 08:37:31 PM »
Update # 26/02

Hi,

I'm working on the JN code and is not stable to do the modifications. I started from the scratch with a more powerful routine, with better handle of external interrupts, LCD refresh and compatibility with a module to manage BEMF // Load // Discharge capacitors.

Coming soon :

:: New module for Magnetic Motors ( timing 99.99% accurate).
:: New version for the shorting coil module.
:: Gauss probe with an Allegro A1324LUA-T. This one is an amazing tool to do tests with coils and see where, when and how are resonating with different kinds of cores (until 18Khz).

Cheers,

Vincent

Offline Vincent

  • Jr. Member
  • **
  • Posts: 50
  • life is a mystery
Re: Shorting Coil with an Arduino UNOR3 V1 (DDS + Train Pulses)
« Reply #12 on: March 02, 2014, 12:17:21 AM »
Update # 26/02

Hi,

I'm working on the JN code and is not stable to do the modifications. I started from the scratch with a more powerful routine, with better handle of external interrupts, LCD refresh and compatibility with a module to manage BEMF // Load // Discharge capacitors.

Coming soon :

:: New module for Magnetic Motors ( timing 99.99% accurate).
:: New version for the shorting coil module.
:: Gauss probe with an Allegro A1324LUA-T. This one is an amazing tool to do tests with coils and see where, when and how are resonating with different kinds of cores (until 18Khz).

Cheers,

Vincent

Tests on going...code soon

 

Recent Topics

Romero Experiments by Romero
June 10, 2017, 02:22:03 PM

Watersplitting Device via GigaHz pulse Generator by Hitman
June 23, 2016, 05:45:13 PM

Free Energy Flashlight by Hitman
February 24, 2016, 12:35:30 PM

Earth's magnetic field by Romero
January 09, 2016, 05:47:42 PM

Induction Heater of Vasily Kuznetsov by Hitman
July 01, 2015, 10:41:39 PM

Partnered output coils by Romero
June 20, 2015, 01:51:23 PM

Articol de incurajare by sinergicus
February 23, 2015, 12:54:41 PM

Dave45 work and suggestions by Dave45
December 13, 2014, 05:43:42 PM

THE MOST PROFOUND RE-DISCOVERY OF ALL TIME by Hitman
October 18, 2014, 03:54:19 PM

Despre prezent si viitor by sinergicus
October 18, 2014, 02:58:03 PM

Powered by EzPortal