Author Topic: Circuit Designing- How to Regulate voltage down from 100V, Powering Atmega328p.  (Read 11007 times)

0 Members and 1 Guest are viewing this topic.

Offline Harsh ChandolaTopic starter

  • Contributor
  • Posts: 30
  • Country: in
So, I am designing an LED tube light,  which can be switched between warm white and cool white colours and could be dimmed as well. The LED strip is as shown in the diagram. I have written the program on arduino and have tested it on a prototype circuit which works alright. Now I have to design the actual circuit. So I have a constant voltage driver converting 230V AC to 100V DC, the LED strip uses 84Volts (refer to the circuit diagrams attached to see how LED Strings are attached, each LED is rated at 3 Volts).

So First off since I'd be using arduino, while designing, of course I'd be just wanting to solder the Atmega328p chip on the PCB, so I'd like to know:
       1> How to power the chip in the first place, like Arduino could be powered from 7-12 volts, do I need to power Vcc pin of Atmega328p with 5 volts maximum?
       2> Secondly I am using a gate driver to drive the Mosfets which requires a voltage of around 15-18V(Refer to the diagram)
Now my issue is that how do I regulate the 100 volts from driver to 5 volts for Atmega chip and 15 volts for Gate Driver or which voltage regulator should I use? (I'll list the product I had chosen).
       3> My other doubt is that since Atmega328p doesn't draw more than 20mA at 1MHz(around 7mA, i guess), if I make a potential divider such that the chip could be connected across one of the resistors in the resistor network of the potential divider to get 5 volts, will that work? will that work for Gate Driver as well? if not why?
Since size is an issue I'm avoiding a buck converter but if I could get one with decent size I'd use it probably.
Is using zener diode acceptable for both the cases mentioned above?(i.e. For Atmega chip and Gate Driver)
This is an LED tubelight it'll be long but width wise I want to keep it thin. What alternatives do I have?

Lastly, at most of the places I've seen people using oscillators with their Atmega chip, this is really confusing me, I mean do I need to have an oscillator too for my purpose? isn't there an in-built oscillator in the chip itself? kindly educate me on this.
Thanks a lot for keeping patience with my doubt. Any help would be greatly appreicated.
Cheers,
Harsh Chandola
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
1. The Arduino contains an LDO (low-dropout regulator), which is a kind of linear regulator. This LDO is what accepts 7-12V in, and produces 5V output. Yes, AtMega328P is 5V maximum (strictly 5.5V, look at the datasheet, but you want to keep to 5V max to have some leeway).
2. You can buy logic-level MOSFETs (example) that will switch reliably with gate voltages of only 5V, which remove the need for a separate voltage rail for the gate driver. However, requiring separate 5V and 15V rails is no problem. Just use a regulator to convert 100V to 5V, and another regulator to convert 100V to 15V. That's all there is to it!
3. Making a voltage divider out of resistors is worse than using an LDO in every way.

An LDO converting 100V to 5V will have a 95V drop across it. If you're drawing 7mA, that's a fairly hefty 700mW dissipation, and means that the conversion is at best only 5% efficient. Buck converters may be more efficient, but as you've identified, will be bulkier. This is a tradeoff that you have to choose. Zener diodes and resistor dividers will be even less efficient than an LDO, so will waste even more power.

The oscillator inside an AtMega is not very accurate -- not good enough to reliably run the UART, or USB peripherals (if using a chip with USB), and timing accuracy will be poor as well, etc. However, if you're not using any of those things, or don't care about timing accuracy, etc, then the internal oscillator is just fine. A PWM controller for a LED strip is a prime example of something for which the internal oscillator is perfectly useable (unless the device is controlled via UART or USB), and thus an external oscillator is probably not required.

Don't forget to include decoupling capacitors in your design, they are conspicuously absent from your design. Also, you need to provide a way to program your microcontroller.
« Last Edit: January 07, 2017, 04:58:21 am by rs20 »
 
The following users thanked this post: Harsh Chandola

Offline Harsh ChandolaTopic starter

  • Contributor
  • Posts: 30
  • Country: in
1. The Arduino contains an LDO (low-dropout regulator), which is a kind of linear regulator. This LDO is what accepts 7-12V in, and produces 5V output. Yes, AtMega328P is 5V maximum (strictly 5.5V, look at the datasheet, but you want to keep to 5V max to have some leeway).
2. You can buy logic-level MOSFETs (example) that will switch reliably with gate voltages of only 5V, which remove the need for a separate voltage rail for the gate driver. However, requiring separate 5V and 15V rails is no problem. Just use a regulator to convert 100V to 5V, and another regulator to convert 100V to 15V. That's all there is to it!
3. Making a voltage divider out of resistors is worse than using an LDO in every way.

An LDO converting 100V to 5V will have a 95V drop across it. If you're drawing 7mA, that's a fairly hefty 700mW dissipation, and means that the conversion is at best only 5% efficient. Buck converters may be more efficient, but as you've identified, will be bulkier. This is a tradeoff that you have to choose. Zener diodes and resistor dividers will be even less efficient than an LDO, so will waste even more power.

The oscillator inside an AtMega is not very accurate -- not good enough to reliably run the UART, or USB peripherals (if using a chip with USB), and timing accuracy will be poor as well, etc. However, if you're not using any of those things, or don't care about timing accuracy, etc, then the internal oscillator is just fine. A PWM controller for a LED strip is a prime example of something for which the internal oscillator is perfectly useable (unless the device is controlled via UART or USB), and thus an external oscillator is probably not required.

Don't forget to include decoupling capacitors in your design, they are conspicuously absent from your design. Also, you need to provide a way to program your microcontroller.
First off, thank you so much your answer was way clearer than my question was. So, Yes I don't need UART or USB in my design so going according to your advice I'm probably better off without the external oscillator. Where exactly do I need the decoupling capacitors in my design? Coming to programming the chip let me know what I think is right or wrong:
So First I'd have this Atmega328p chip programmed from arduino board and then I'll pop it out and will pop it on the dip28 pin socket that i'd solder on my PCB. That's one more thing I thought of, instead of soldering the Atmega328p Chip on PCB I'd solder the socket on the PCB on which the Atmega328P can be mounted. Does this way works? I am habitual of not soldering ICs to PCB instead I solder their compatible sockets, is that a good practice? Can Atmega328P be programmed like the way I said? Program them using arduino uno board take them out put it on PCB?
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
No.  The ATmega328P on an Arduino *MUST* be preprogrammed with an Arduino compatible bootloader, which accepts programming commands via its UART peripheral.  A blank ATmega328P wont be 'seen' by AVRDUDE.

To program a blank ATmega328P, you need a programmer for Atmel AVR MCUs - either commercial
(e.g. AVR Dragon, AVRISP etc.), or a number of home-brew ones supported by AVRDUDE or an Arduino running the ArduinoISP sketch, with the target ATmega328P in a breadboard, or via a 6 pin AVR ISP connector on your target board.
« Last Edit: January 07, 2017, 06:08:58 am by Ian.M »
 

Offline Harsh ChandolaTopic starter

  • Contributor
  • Posts: 30
  • Country: in
No.  The ATmega328P on an Arduino *MUST* be preprogrammed with an Arduino compatible bootloader, which accepts programming commands via its UART peripheral.  A blank ATmega328P wont be 'seen' by AVRDUDE.

To program a blank ATmega328P, you need a programmer for Atmel AVR MCUs - either commercial
(e.g. AVR Dragon, AVRISP etc.), or a number of home-brew ones supported by AVRDUDE or an Arduino running the ArduinoISP sketch, with the target ATmega328P in a breadboard, or via a 6 pin AVR ISP connector on your target board.
As  I was looking for Atmega328p chips online I found that some sellers sell the chip with Arduino Uno Boot Loader on it, If I purchase those ones would that make my life easier, with those ones I can simply put them on Arduino Boards and program right? Third option seems the cheapest one though if I am to get a blank Atmega328p chip as I have a extra Arduinos lying around. Well Dragon isn't that expensive too to be honest.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Yes you can buy ATmega328P chips preprogramed with an Arduino bootloader, but as the breadboard jig to program your own using ArduinoISP is so simple, why bother?  The only way it makes sense is as a spare if you've only got one Arduino and have FUBARed it so you cant use ArduinoISP, or if you are already ordering other stuff from the supplier in question, and don't want to order from an ordinary component distributor.

Probably the cheapest option on a modern PC is to use ArduinoISP. However like all other low voltage AVR programmers, if you mis-configure the fuse bits, you can make the target ATmega328P nearly impossible to re-program without special methods or even 'brick' it to to the point that only a HV parallel capable programmer (e.g. AVR Dragon) can recover it.  *ALWAYS* double-check your fuse bits before programming!

The most convenient option is to include a footprint for a 6 pin AVR ISP header on your target board.  Fit a header for development and for production, use a programming jig that connects to the header pads using pogo pins.   *NEVER* connect to the ISP header if the target board is connected to a non-isolated mains derived supply!

PWMing a MOSFET fast enough to avoid flicker and keep the MOSFET cool by minimising the time spend in the linear region requires high transient gate currents.  Its quite probable that the AVR I/O pin wont be able to deliver enough current to directly drive a logic level MOSFET fast enough - get the datasheets and do the math for the specific MOSFET you plan to use, remembering that the ATmega328P output voltage *will* droop if heavily loaded.

If it turns out you need a gate driver, and if you only have the AVR and maybe a few other low current ICs on the 5V rail, then using a linear regulator from the gate driver supply makes sense.  Deriving the gate driver supply from a +100V DC rail efficiently in a small volume is difficult - a linear regulator off the 100V DC supply will have a lot of heat to dissipate.   However building a safe reliable switching regulator from 100V down to 12V or 15V is not easy. 
« Last Edit: January 07, 2017, 07:55:25 am by Ian.M »
 
The following users thanked this post: Harsh Chandola

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Where exactly do I need the decoupling capacitors in my design?

This video is very detailed, and probably goes into more detail that you might need right now, but it does also answer the basic questions: Why have decoupling capacitors? Where do you put them?

Decoupling capacitor means same thing as bypass capacitor, by the way.

 
The following users thanked this post: Harsh Chandola

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
Power integrations Linkswitch-TN devices, (LNK302/4/6) would be a good fit for this - designed for mains use but just omit the rectifier for 100VDC operation. Cheap and simple.

Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: Harsh Chandola

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21672
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Why not connect the MCU circuit in series with the "bottom" of the LEDs?  Assuming you never need to turn them fully off of course.  A shunt regulator (zener diode, or TL431 + TIP32) regulates the voltage, while the supply current varies with LED level.

Assuming you don't need the LEDs completely off, of course.

(Driving the LED switches is left as an exercise for the reader... ;D )

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline cheetahkid

  • Newbie
  • Posts: 7
  • Country: gb
first thing first, 100v dc down to 5v dc, for a beginner, you mention 230v ac to 100v dc, why not get a simple usb power supply (230v ac to 5v dc), they are everywhere even charging your mobile phone that is 5v. [Edit.. Mains 230Vac beware] You can even take it apart and use internal for your project... cheap and simple. Shame they don't do 15v ready available unless you use the Ebay.

For the 15v again shop around for 230v ac to 15v from Ebay... I would suggest 15v can plug into Arduino Uno would be fine because you said 20mA would be the top maximum current, it may be just luke warm with the 5v regulator or ANY 5v regulator if not using the Uno (within the maximum voltage of the regulator). This is the one for you.
« Last Edit: January 08, 2017, 08:12:38 am by cheetahkid »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Why not connect the MCU circuit in series with the "bottom" of the LEDs?  Assuming you never need to turn them fully off of course.  A shunt regulator (zener diode, or TL431 + TIP32) regulates the voltage, while the supply current varies with LED level.

Assuming you don't need the LEDs completely off, of course.

(Driving the LED switches is left as an exercise for the reader... ;D )

Even if you need them fully off, its possible as an ATmega328P only needs a few tens of uA sleep current, and the problems with waste heat from a linear supply using a dropper resistor start when you need a significant load current,
so if everything else is designed for minimum power consumption when off, a 1Meg resistor bypassing the LED chain and the MOSFETs  would be enough to keep a reservoir cap charged to maintain the 5V rail.  That's only 9mW wasted, and the standby dissipation of the 100V DC PSU will almost certainly be far higher than that.  Even if you need quite a bit more standby current, e.g. 1mA, so use a 91K bypass resistor that's only 95mW.   The reservoir cap provides enough current to start up the gate driver, and once its switching, the LED chain can be tapped.

However, if one taps the LED chain for the controller power, either you need a high side switch that will require a relatively complex level shifting gate driver, or you have to add another synchronous switch to only connect the LED chain tap to the reservoir cap when the low side MOSFET is on.  IMHO the added complexity isn't worth it when a HV buck chip like the Linkswitch TN mike suggested can easily provide a suitable low voltage rail independent of the current through the LED chain.

first thing first, 100v dc down to 5v dc, for a beginner, you mention 230v ac to 100v dc, why not get a simple usb power supply (230v ac to 5v dc), they are everywhere even charging your mobile phone that is 5v. You can even take it apart and use internal for your project... cheap and simple. Shame they don't do 15v ready available unless you use the Ebay.

For the 15v again shop around for 230v ac to 15v from Ebay...
Gutting cheap miniature mains SMPSUs to power your project is not ideal - most have no provision for mounting the PCB safely once its removed from the original housing, and they commonly fail to meet the safety standards we expect in the developed world.  I don't see any benefit in going straight to 5V unless the design doesn't need a gate driver for the MOSFETs. 

Its possible a US market 12V SMPSU could be hacked to run off the 100V DC bus, at which point safety isolation would be handled by the 100V PSU, and it might be worth doing for a one-off but for any sort of quantity production, you either need a commercially available PCB mount module or to build your own SMPSU, or to get a 100V PSU with an auxillary low voltage output.   
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff

       2> Secondly I am using a gate driver to drive the Mosfets which requires a voltage of around 15-18V(Refer to the diagram)
Now my issue is that how do I regulate the 100 volts from driver to 5 volts for Atmega chip and 15 volts for Gate Driver or which voltage regulator should I use? (I'll list the product I had chosen).
       
Why on earth are you using a gate driver ? LED current isn't going to be enough to need a high gate voltage to mimimise RdsON. Just use a logic-lefel MOSFET and drive at 5V

Just stick 1K or so in series with the gates to soften the edges and avoid gate capacitance causing switching spikes in the AVR outputs. 
 
« Last Edit: January 07, 2017, 04:04:38 pm by mikeselectricstuff »
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline onesixright

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
TL;DR;

Just curious, why Arduino?  ;)

Nowadays everybody seems to jump on the Arduino wagon (or even worse, Raspberry Pi) for very simple MCU needs. I don't know the functional specs, but wouldn't it be more elegant to take a look at a simple PIC?
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5022
  • Country: ro
  • .
If you want to keep it super simple, there are linear regulators that can work with 100v+ DC.

For example, see Microchip's LR8 regulators that work up to 450v DC and can output up to 20mA

0.7 uk pounds / 25pcs  = LR8K4-G Linear Voltage Regulator, Adjustable, 1.2V to 440V/20 mA out, TO-252AA-3 : http://uk.farnell.com/microchip/lr8k4-g/linear-volt-reg-0-02a-440v-to/dp/2448524
0.42 uk pounds / 25pcs = LR8N8-G Linear Voltage Regulator, Adjustable, 1.2V to 440V/20 mA out, TO-243AA-3 : http://uk.farnell.com/microchip/lr8n8-g/linear-volt-reg-0-02a-440v-to/dp/2448526

1.22 uk pounds / 40pcs = TL783 Linear Voltage Regulator, Adjustable, 20V primary input, 1.25V to 125V/700 mA/1 Output, TO-263-3 : http://uk.farnell.com/texas-instruments/tl783ckttr/reg-hi-volt-adj-d2pak-3/dp/2075436

The first one would also allow you to put a bridge rectifier in front of it and maybe a tiny capacitor (like 4.7-10uF 400v+) and make it work from mains voltage.

Would be ideal to use the first one to take whatever input voltage you have down to 25v..55v, depending on what dc-dc converter you'd use afterwards.. majority of switching regulators seem to have maximum voltages 30v or 32v or 36v or 40v or 42v or 60v  ... you can produce for example 50v at 2mA ( so you'd get 50% efficiency with 100v IN), and then use dc-dc converter to convert 50v 2mA into 5v ~ 15mA (about 90% efficiency)... and with a good switching regulator. If you want cheap you'd find plenty of MC34063 regulators that would work up to 40v but you can do better than using that ancient regulator.
Could also take it down to ~ 12-15v where you'd find cheap tiny switching regulators working at high frequencies which means you'd be able to keep everything tiny and surface mount.

 
The following users thanked this post: Harsh Chandola

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
TL;DR;

Just curious, why Arduino?  ;)

Nowadays everybody seems to jump on the Arduino wagon (or even worse, Raspberry Pi) for very simple MCU needs. I don't know the functional specs, but wouldn't it be more elegant to take a look at a simple PIC?

Because PIC doesn't have a free, well-supported, cross-platform IDE like Arduino provides for the Atmel. I mean, geez, give him/her credit for using a bare chip instead of a whole Arduino board. The Arduino bootloader is a perfectly reasonable and free choice for programming solution -- and I'm saying this as a person who actually hates Arduino and Atmel quite a lot and has long since moved to ARM.
 
The following users thanked this post: cheetahkid

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
..of course the Mega328 is ridiculous overkill for this application unless there's going to be some crazy UI or connectivity to control the LEDs - an ATTiny would be more than adequate
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline onesixright

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Because PIC doesn't have a free, well-supported, cross-platform IDE like Arduino provides for the Atmel.

 :wtf: ? MLABX is free, you can run it with XC8 or just ASM. I thought you only need to pay for some optimised compiler stuff. Which you probably don't need.

BTW im more then happy to give him a break, i just think its overkill. So i was curious what are the design decisions to choose this platform. You could also use a pc/laptop to control a led strip ;) Is it efficient, don' think so. IMHO i think its nice to create  solution that fits the problem (with a minimum of overkill).

 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Because PIC doesn't have a free, well-supported, cross-platform IDE like Arduino provides for the Atmel.
:wtf: ? MLABX is free, you can run it with XC8 or just ASM. I thought you only need to pay for some optimised compiler stuff. Which you probably don't need.
No one in their right minds could call MPLAB X 'well-supported' - Microchip's forum engine sucks, and it takes years to pressure the MPLAB X team enough to get simple bug-fixes for their obscenely bloated IDE.|O   OTOH XC8 support is fairly good in spite of the forum problems because the ex-HiTech compiler team still has a culture of listening to the end users. :-+
« Last Edit: January 08, 2017, 11:13:36 am by Ian.M »
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
BTW im more then happy to give him a break, i just think its overkill. So i was curious what are the design decisions to choose this platform.

Fair enough, but I think most electronics enthusiasts (myself included) aren't entertained by downspeccing their MCU choices if that research effort leads to:
-- Having to draw new schematic and footprint parts in your PCB software, familiarise with a new device, worry about loose ends in the portability of your existing code, all for the benefit of:
-- Saving 1mA and 50 cents off a one-off project

Obviously in a commercial situation, where the bottom line is multiplied by thousands or millions (or extremely power-sensitive situations) does the second line really become significant. Apart from that, you'd have to be nuts (or be passionate & interested in MCU selection as a hobby in itself) to spend much time thinking about it. This is an LED project, not a MCU project.

For example, I'm working on a board with two SPI devices and an MCU to initialize those devices. Literally just writing out some SPI commands, and going to sleep. I'm using an ARM Cortex M0+ to do this. On the off chance that you'd ask "Why?" -- because the device and IDE are a pleasure to work with, I'm familiar with them, and I've got a bunch of ready-to-use code now that I've inherited from earlier projects, and am much happier investing my current effort into growing that code for future projects. These are not engineering reasons, but they are far more relevant and significant reasons to me than the power consumption, cost, or "elegance" of the chip could ever be.

TL;DR: If the OP replied "because I don't care" or "because that's what I'm familiar with", those would be entirely acceptable reasons in my opinion, especially for beginners. But beginners might not want to say that because they seem like "lazy" answers, which seems a little cruel.

..an ATTiny would be more than adequate

This is an excellent suggestion, the Arduino IDE does support ATTiny chips, so if the OP likes the Arduino IDE, this is an easy alternative.
 
The following users thanked this post: Harsh Chandola

Offline onesixright

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Because PIC doesn't have a free, well-supported, cross-platform IDE like Arduino provides for the Atmel.
:wtf: ? MLABX is free, you can run it with XC8 or just ASM. I thought you only need to pay for some optimised compiler stuff. Which you probably don't need.
No one in their right minds could call MPLAB X 'well-supported' - Microchip's forum engine sucks, and it takes years to pressure the MPLAB X team enough to get simple bug-fixes for their obscenely bloated IDE.|O   OTOH XC8 support is fairly good in spite of the forum problems because the ex-HiTech compiler team still has a culture of listening to the end users. :-+

Because PIC doesn't have a free, well-supported, cross-platform IDE like Arduino provides for the Atmel.
:wtf: ? MLABX is free, you can run it with XC8 or just ASM. I thought you only need to pay for some optimised compiler stuff. Which you probably don't need.
No one in their right minds could call MPLAB X 'well-supported' - Microchip's forum engine sucks, and it takes years to pressure the MPLAB X team enough to get simple bug-fixes for their obscenely bloated IDE.|O   OTOH XC8 support is fairly good in spite of the forum problems because the ex-HiTech compiler team still has a culture of listening to the end users. :-+

I don't want to hijack this thread for another Atmel vs Microchip or Tek vs Agilent. I did'n mean to push PIC, can be ATINY as-well (or take your pick). My point its is the ATMEGA feels like overkill for this type of project (unless the specs would show otherwise).

You stated it was not free en not cross platform, but that is simply not true. I don't know much about their "well-supported", so i take your word for it. Nevertheless, that the forum sucks, and the IDE bloated, doesn't mean it is because you say so. Thats just your opinion.

BTW you know Microchip acquired Atmel right?

 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
You stated it was not free en not cross platform, but that is simply not true.
I didn't state it wasn't free, nor did I state it wasn't cross-platform.
As the quotes were clearly attributed, you are obviously dumber than a rock.
<PLONK>
 

Offline onesixright

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
dumber than a rock.

Huh, thats really needed  :clap:? Im sorry, it was for rs20, you are right (just mismatched the comment). Made a mistake, shoot me.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Sorry, I shouldn't have made an objective-sounding claim against PIC based on the brief and painful subjective experience I had trying to use the Microchip IDE.

Nevertheless, let me retrace my steps a bit and can we just agree that MCU selection, albeit highly objective and precise when quantities of 100,000 are involved, is totally subjective and unconstrained when making one-off hobbyist projects. And thus filling every project post with "why didn't you use this MCU that you're not familiar with and would save you $2" is not terribly helpful?
 

Offline onesixright

  • Frequent Contributor
  • **
  • Posts: 624
  • Country: nl
Nevertheless, let me retrace my steps a bit and can we just agree that MCU selection, albeit highly objective and precise when quantities of 100,000 are involved, is totally subjective and unconstrained when making one-off hobbyist projects. And thus filling every project post with "why didn't you use this MCU that you're not familiar with and would save you $2" is not terribly helpful?

I didn't mean to imply he should use another MCU. I was asking why. I should have wrote "why not a simple PIC or ATTINY". I'm just doing a small (one off) PIC12 project ATM, initially i used a Arduino, and then i thought thats way overkill. For me its fun to see if i can go smaller, not because of $$$, because of the challenge. And a smaller MCU footprint tend to make you circuit a bit simpler. So i was just curious, why the ATMEGA. And BTW i'm not filling every project post with that .... ;)

And yes, I think we can agree...  :-+
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1280
  • Country: gb
    • bitdynamics
I'm always a bit nervous when i hear in-experienced electronics hobbiest talk about "high voltage" projects!  (note "High voltage here i define as above 60Vdc, which is the legal maximum voltage above which certain methods and precautions must be taken in commercial designs, rather than the 15,000 V which would be considered HV by our more adventurous members..... ;-)


I'd suggest:

1) start at a SAFE voltage:  Use less LEDs in series so you can say start with 20V, or 40V or anything that will blow up, let out smoke, but probably not kill you as it does so!

2) Understand the physics:  100V to 5V brings certain limitations.  Do you understand the fundamental difference between a linear regulator and a switching regulator?  if not, then you have a lot to learn, and that's best done at low power / low voltage.

3) SIMULATE: there are plenty of free circuit simulation tools (LTspice etc) which allow the beginner to try stuff without risk and cost.  Working in simulation is no guarantee it will work for real, but blowing up in sim land is pretty much one of blowing up for real!

4) Experience feeds experience:  For example, as soon as you say 100v to 5v, i can immediately see that, unless you can get down to a very low average current draw indeed, this is going to be very difficult for a linear regulator to do in a practical layout.  why is this?  hint P = V X I

5) Learn from others: you can already buy LED strips.  buy some, take them apart, how do they work.  look for teardowns on youtube, google "led strip circuit".  These days there is a mass of information easily available to you that will reduce your learning curve dramatically  (including doing as you have done and asking on a electronics forum ;-)

6) Peer review:  When you have got a solution, come back here and let us review it!  Take on board what others say, and try not to respond badly to critisism! (it's easy to get annoyed when you've spend hrs working on something for someone on a forum to tell you it's wrong...)

7) Wear Sunscreen..........    :-+


 
The following users thanked this post: Harsh Chandola


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf