Show Posts
Pages: [1]
1  Using Arduino / General Electronics / Re: Measure current on: September 18, 2013, 04:37:26 am
Hi,

yes that is doable.
However you are doing 2 analog reads, one after the other. So your voltage could have changed in the meantime.

I would suggest you put your 2 Ohm resistor at the bottom connected to ground (so swap position with the 200 Ohm R).
This way you measure against Ground, and you only need to do ONE analogread.

-Dan
2  Community / Exhibition / Gallery / Quadratron 4-channel power driver on: September 17, 2013, 02:09:58 pm
Hi to all,

Herewith I'm open sourcing my new Quadratron board.
The purpose of this board is to provide a flexible, modular and isolated way to drive 4 power transistors, which can be configured in variable ways, e.g. H-bridge. This can be used to drive DC and AC motors, transformers, coils, single- and double-rail circuits, single-phase driven 3PH motors , etc.
Typical operating voltage is 400V and current of 4A, totaling to 1600VA.

In fact this is a kind of Arduino-mega shield, but much larger (due to the power specs). Normally shields are put on top of the Arduino. In this case, the Arduino need to be put on top of the Quadratron (upside down of course).

I know from many forums that people are struggling sometimes to build power mosfet or igbt drivers. Well here you have it, and it is all electrically ISOLATED from your Arduino (up to 1kV isolation). It works easyly up to a few 100 kHz. The Quadratron has 4 isolated power channels, which you can configure in any way you like.

The design is completely Open Source Hardware, including Eagle files and part list.
Please read the INFOSHEET for more detailed information.

The attached zip file contains:
   - Eagle design files
   - part list
   - Gerber files for PCB making

Note that in the picture below, the mosfet or igbt is not mounted.
-Dan

with Arduino mega:


without Arduino:
3  Products / Arduino Due / Re: Java GUI compatible with arduino MEGA and arduino DUE on: September 06, 2013, 01:50:19 pm

just another note:

see also this tread, which takls about the porting the Mega timers to the DUE:
http://forum.arduino.cc/index.php?topic=186389.0

-Dan
4  Products / Arduino Due / Re: Java GUI compatible with arduino MEGA and arduino DUE on: September 06, 2013, 01:49:08 pm
Hi Albert,

Many people have read your post, but I believe they do not understand yet the true power of this GUI.

For the sake of clarity to everyone:
- there is a part which runs on Windows or Mac - this part is called the GUI
- there is part which runs on the Arduino (Mega, DUE, ...) - and is part of the sketch
- between the GUI and the sketch, there is USB communication (the standard one used by Arduino), and a proper protocol for exchanging data

In the Arduino sketch, you define what parameters you would like to use in teh GUI:
   - there are 12 sliders on which you can set the min, max and default values
   - in addition there are 6 checkbox controls
   - lastly there is a console text section
Once you start your GUI, you get a default screen.
Upon establishing the connection the Arduino (is just selecting the right serial port), the setup parameters are exchanged.
From then onwards, you can adjust all your desired Arduino parameters LIVE from your GUI!

As an example, you can life-update the PWM frequency, or duty-cycle of any timer (you just program in the sketch what you want to get).
Same with the 6 checkbox. This acts like an on/off switch, where you can command just anything to your Arduino.
The console section, is to receive text messages from your Arduino, as you have programmed it in your sketch.
Suppose you have a system programmed with a PLL, you could send a message to the GUI telling the "PLL is locked".
Use your imagination!!

It's a very flexible thing.
In stead of juggling around with adjusting the parameters in your sketch, reprogram and reload, you just do it live from the GUI.
It's all Open Source for use.

-Dan

5  Using Arduino / Project Guidance / Re: Can Arduino output 20kHz PWM with varying duty cycle? on: August 27, 2013, 06:45:49 am
Hi,

It's better you access the Timer registers directly, rather than through the Arduino libraries.
That way you have more control.

Suppose you use Arduino Mega, which has 4x 16-bit timers (Timer1/3/4/5). You need 3 timers.
Each timer has 3 OCR registers.
If you use OCRnA as TOP, this sets your frequency.
At 16MHz (=62.5ns), no timer prescaler, and needing 20kHz (=50000ns) PWM frequency, you need to set OCRnA to 800 (=50000/62.5).
This will give you exactly 20kHz.

Per timer, you have 2 compare registers (OCRnA and OCRnB) to control your duty cycle, AND to have the 'compare' output to the designated pins.
Use an ISR() to set your compare registers, as per your desired duty cycle.

-Dan
6  Using Arduino / Project Guidance / Re: Arduino reset upon serial Java connection on: August 01, 2013, 12:48:08 am
Hi Mike,

thank you for your considerations.

The first solution (rewrite driver) is not really an option, as these drivers are generic. Changing this would entail that I have customized drivers.
These drivers are also used by many for many other types of communications.

About the second solution (serial chip), we use the existing build-in USB ports (PC & Mac). Again the solution must remain standard.
There are many folks out there having similar problems with Arduino DTR, so we should avoid telling them they need another type of USB port.

About your third solution, yes this is possible, and I will check into this. Good practice says that you first need to poll if the port of available before you allocate it to your own application.

I truly understand what you are trying to say, and I appreciate your thoughts.
I was also hoping there would be someone who would be willing to go through the Arduino mega16u2 firmware and check if this can be adapted.

regards,
-Dan
7  Using Arduino / Project Guidance / Arduino reset upon serial Java connection on: July 31, 2013, 01:39:31 pm
Hi,

There's already quite some text written about this subject, but none provided a real proper solution on how to solve this structurally.
Let me first explain briefly:
I use an Arduino Mega Rev3, and connect from a PC (Windows 7 64bit) via the USB/serial port with a Java program using the RXTX library.
My friend is doing the exact same thing from a Mac (same Arduino, same Java...).

Each time when I open() the serial port in Java, the Arduino reboots (this is the same with many other serial programs).
Note that the issue is not related to the Java code (no code posted here), but simply that upon opening the serial port, the DTR line on the Arduino asserts (=goes low). This resets the Arduino via the 100nF cap. This reset is done by design by the Arduino folks, so that the bootloader starts and checks if new code need to be loaded.

HOWEVER, when you are in full running with the Arduino, and want to make a serial connection (for monitoring, control through Java, whatever, ...), you do NOT want to have the Arduino rebooting in the middle of your program. This would be very bad practice.

So I'm looking for a structural solution to this. There are many proposals circulating around the web, many of those changing the Arduino HW. I do not want to make such changes, because the HW should remain untouched. Yes I know there is a solder-jumper that you could cut, but then you loose the ability to be able to load the sketches without pushing the reset button.
I'm looking for a transparent solution to all that.

Given the Arduino folks have designed a custom-made solution for sketch upload (DTR asserting to Reset line), and that the recent models of the Arduino boards are no longer using the FT232RL, but an atMega16u2 (or 8u2), I believe it would be more appropriate to update the firmware one way or the other, so that it detects whether there is sketch-upload needed, or any other serial connection, and make decision to assert or not the DTR line.

Any thoughts or ideas are welcome.

Regards,
-Dan



8  Products / Arduino Due / Re: Due pinout diagram on: November 17, 2012, 10:39:33 am
Actually I've been wondering if it's worth differentiating the peripheral mux option used. After all it has no real bearing on the average user and more experienced SAM users will either know this or will soon find out.

Rob,

Actually yes, you're right. This might confuse the readers of the pinout. And when one is really in the weeds of selecting alternate peripheral pin functions, he would have to open the datasheet anyway to select the right register bits.

-Dan
9  Products / Arduino Due / Re: Due pinout diagram on: November 16, 2012, 04:53:04 pm
Top left of the excellent diagram, explaining the color coding: "per A" / "Per B or X" - I am confused what the little black corner signifies.

The IO Controller provides multiplexing of different Peripheral functions on a single pin, either A, B or extra (X).
This is a way to select one of them.
For more info, check the datasheet sections 11.3 and 32.5.3.

-Dan
10  Products / Arduino Due / Re: Due pinout diagram on: November 15, 2012, 04:57:54 pm
Hi Rob,

I've just gone through it again, and may I kindly ask for some other updates:

- port A.9 is also high current
- mark the little grey square close to ICSP with "mega16U2"
- would it make sense to add as well the erase button?
- the contour of the DUE board is good visible on the screen, but not really when you print.
  Can you make the contour darker or with more contract?
- add "TX0" on the board for port A.9
    and "RX0" for A.8
- on the actual DUE itself, there are marks with long lines across the pins, like
         COMMUNICATIONS                           
         same for PWM and ANALOG IN
  Do you think it makes sense to add those as well?


I think your pinout approaches perfection smiley


thanks
-Dan
11  Products / Arduino Due / Re: Due pinout diagram on: November 15, 2012, 05:30:09 am
Rob,

thanks for the corrections.

One more thing: port C.29 (PWM10) is high current.
Could you also move the comment on the left "Allows serial2 to be used for SPI" above the "SCK1" box. This to make the total picture a bit less wide (as such fits better in a document).

Anyway I would like to thank you for a super job done. This is a great diagram to be used for all (hey Arduino guys, please take note smiley-wink

best,
-Dan
12  Products / Arduino Due / Re: Due pinout diagram on: November 15, 2012, 02:50:01 am
Hi Rob

thanks for the updates!

As you did correctly the change for PWM10 to point to C.18, the comment should now be updated as follows:
"Also connected to A.28".

thank you

Dan
13  Products / Arduino Due / Re: Due pinout diagram on: November 14, 2012, 02:35:10 pm
Hi,

I think you need to swap 5V and GND on the ICSP connector.

Maybe you could also add a comment that TX0 & RX0 are connected to the Mega16U2 (for programming).

-D
14  Products / Arduino Due / Re: Due pinout diagram on: November 14, 2012, 12:05:58 pm
Hi,

I new to this forum, although I use already since long AVR processors. Recently I bought an Arduino DUE.

The DUE pinout diagram is really awesome !! Great piece of work.

I think there are some minor errors:
1) port B.26 is not "TIOA0", but "TCLK0" (per B)
2) port B.16 is on physical pin 77 (not 78)
3) "TIOB7" (PWM10) is on pin 102 port C.29 (not 111 / A28)
Anyway please double check.

Perhaps you could also add the following:
- on A.19 "PWMH1" (per B)
- on C.19 "PWMH5" (per B)
- on B.14 "PWMH2" (per B)
- on C.18 "PWMH6" (per B)
- on A.20 "PWML2" (per B)
- on C.9 "PWMH3" (per B)
- on C.7 "PWMH2" (per B)
- on C.5 "PWMH1" (per B)
- on C.3 "PWMH0" (per B)
- on D.6 "PWMFI2" (per B)

best,
-D

Pages: [1]