gfxgfx
 
Please login or register.

Login with username, password and session length
logo
 
gfx gfx
gfx
19694 Posts in 1260 Topics by 5033 Members - Latest Member: jackiehinchey November 18, 2017, 01:14:28 AM
*
gfx* Home | Help | Login | Register | gfx
gfx
Breaktru Forum  |  eCigarette Forum  |  Modding  |  Topic: A basic Arduino PWM build for beginners.
gfx
gfxgfx
 

Author Topic: A basic Arduino PWM build for beginners.  (Read 18949 times)

0 Members and 3 Guests are viewing this topic.

Offline norcalreballer

  • Sr. Member
  • ****
  • Joined: Jul 2014
  • Location: USA
  • Posts: 63
  • Karma: +4/-0
  • Gender: Male
Re: A basic Arduino PWM build for beginners.
« Reply #50 on: May 06, 2015, 12:42:13 AM »
I had a quick look at the driver datasheet.  I understand it now.  I didn't think about the issue of switching from a 5v setup to 3.3v until today after sending off a board revision.. . My only concern is Rds(on)  with 3.3v.. 

I don't want to give you guys schematics and stuff if I don't know how well everything will work before real life stress testing.

 

Offline PoppaVic60

  • Full Member
  • ***
  • Joined: Aug 2012
  • Location: United States
  • Posts: 31
  • Karma: +5/-0
Re: A basic Arduino PWM build for beginners.
« Reply #51 on: May 06, 2015, 01:37:15 AM »
Totally understandable.

I'll keep poking at code and jumpers ;-)

Offline doobedoobedo

  • Super Member
  • *****
  • Joined: Dec 2013
  • Location: UK
  • Posts: 165
  • Karma: +35/-0
  • Gender: Male
Re: A basic Arduino PWM build for beginners.
« Reply #52 on: May 06, 2015, 04:58:07 AM »
The single most important thing for coding is clarity and organisation. Break what you're doing down into individual steps and write functions. Sprawling spaghetti code may appear to be faster to do initially but you'll soon get lost.

The vast majority of my code is for the interface on the OLED. Because my code is modular I was able to switch from controlling a raptor to controlling PWM in under an hour.

Offline doobedoobedo

  • Super Member
  • *****
  • Joined: Dec 2013
  • Location: UK
  • Posts: 165
  • Karma: +35/-0
  • Gender: Male
Re: A basic Arduino PWM build for beginners.
« Reply #53 on: May 06, 2015, 06:14:25 PM »
It's not particularly beautiful yet.

Offline Dejay

  • Jr. Member
  • **
  • Joined: Jun 2015
  • Location: Netherlands
  • Posts: 2
  • Karma: +0/-0
Re: A basic Arduino PWM build for beginners.
« Reply #54 on: October 07, 2015, 12:17:41 AM »
Thanks for posting your projects and asking and answering all these questions. I'm an electronics noob and have learned a lot.

This is a really great thread because it contains everything you need to make a basic PWM arduino mod with resistance measuring for variable watt.

Could you do temperature control with this type of resistance measuring as well (voltage divider)

At the moment I'm driving a 3034 direct from the PWM pin at 980Hz, just for initial testing. I'm not bothered about burning $3 arduino out at the moment, I've got loads. It makes a noise when it's firing so I'm either going to have to go up in frequency out of hearing range (32kHz) or down to 122Hz and it sounds like down is the way to go.

Is that a logic level mosfet? I've bought some IR IRLB3034PBF to play around with. From what I've learned it's essential to use a logic level mosfet.

My other question is if the coil has to be considered an inductor? Is the effect neglectible or should you take this into consideration somehow? Can there be voltage spikes from this? Should I use a "freewheeling diode" across the load?

I've tried to use online inductor calculators and it said 0.18uH for a 14 wrap coil and did a simulation with LTSpice and it showed some largish voltage spikes. A schottky diode would improve efficiency, yes?

Offline MonkeyTokes

  • Sr. Member
  • ****
  • Joined: Jun 2015
  • Location: Philadelphia
  • Posts: 61
  • Karma: +9/-0
  • Gender: Male
Re: A basic Arduino PWM build for beginners.
« Reply #55 on: November 16, 2015, 08:03:38 AM »
What MCU would you guys recommend to use to convert this into a single, simple and minimalist PCB as possible? I have a similar setup except I'm using a display and two buttons to control the analog output. right now I'm considering the attiny85 since it has just as many pins as I need but it doesn't leave any room for expanding then and I don't want to jump on that one simply because its one of the few MCU's I'm aware of when there probably is something as good if not better in a tiny package.

Offline shandy27

  • Sr. Member
  • ****
  • Joined: Jun 2012
  • Location: falkirk
  • Posts: 50
  • Karma: +2/-0
Re: A basic Arduino PWM build for beginners.
« Reply #56 on: November 17, 2015, 05:55:50 AM »
have you thought about same mcu the arduino uses but in surface mount package its a good bit smaller than the dip and you will still be able to expand in future if you want.

Offline Ian444

  • Jr. Member
  • **
  • Joined: Sep 2014
  • Location: QLD, Australia
  • Posts: 23
  • Karma: +4/-0
  • Gender: Male

Offline MonkeyTokes

  • Sr. Member
  • ****
  • Joined: Jun 2015
  • Location: Philadelphia
  • Posts: 61
  • Karma: +9/-0
  • Gender: Male
Re: A basic Arduino PWM build for beginners.
« Reply #58 on: November 17, 2015, 07:11:08 AM »
Those are basically clones of the boards I have now. I only have one other board to compare them to (a v3 nano) but they're very good for small projects with few wires and drastically reduce the size, plus I got a handful of them for under $10.

I have considered using the ATMEGA or yesterday I came across the attint84 I think it was called. The only thing in worried about in using a SMD one is if the timers fail like they do in normal PWM boxes I'd want to have it socketed so I don't need to scrap the entire board every time one dies. Though I'm not really sure this is an issue
« Last Edit: November 17, 2015, 08:21:57 AM by MonkeyTokes »

Breaktru Forum  |  eCigarette Forum  |  Modding  |  Topic: A basic Arduino PWM build for beginners.
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!