Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Magpie's Content

There have been 156 items by Magpie (Search limited from 28-April 23)


By content type

See this member's


Sort by                Order  

#26773 Powerful Aquarium Lighting

Posted by Magpie on 09 April 2012 - 12:54 PM in General Discussion

I take back anything I ever said about the NCL30160s

They are Junk!

I had my last one running this afternoon, and for one hour it was fine.
I went away and came back in another hour, my workshop was smokey and chip number 5 had gone short circuit. It was only running at 130mA and the chip was running cool. It did actually run very cool for the work it did. I once had it up to 800mA.

I initially had 29 volts, 130mA running into the chip but now I had 450mA running into it (I didn't read the voltage but It would have dropped to about 3-6 volts at a guess).
My current limiting supply had gone into limit mode and I had 450mA running through a breadboard to my chip. The heat in the chip was making the smoke and now it is stuck to the breadboard, I will send a photo, soonish. My smoke alarm didn't go off, it only goes off for normal cooking smells. sigh.

The only excuse I could find for this chip is that the circuit was breadboarded, and you shouldn't do this at High frequencies, but I dont actually believe the breadboarding of this circuit was a problem.

In short the NCL30160 is junk. Dont use it for your own safety.

If you look at the block diagram the short seems to be in the built in voltage regulator.

A timely reminder to take precautions when doing power electronics,
  • smoke alarm
  • current limited supply
  • fuses
  • watch closely



#26758 Powerful Aquarium Lighting

Posted by Magpie on 09 April 2012 - 12:03 AM in General Discussion

Hi Andrew How is the aquarium going? I have some of the NCL30160's but I have blown 4/5 of them. They are static sensitive. But seem to work as specified. I used the circuit straight out of the datasheet. I may soon try and rejig my attiny version for my domestic lighting project. I have a book on PID control and and some better surface mount fets. But I would recommend you continue with something like the NCL30160, to keep the part count low and to interface nicely to your tlc5940s.



#26757 Steff Shield

Posted by Magpie on 08 April 2012 - 11:51 PM in Project Showcase

It looks like my shield's architecture has already been superseded, and I haven't even got the board back from olimex yet. I have prototyped with the NCL30160 and it works as expected and no obvious signs of noise with the pwm running at 500hz. I used 10 leds is series with about 5m of cable running off 29 or so volts. The only trouble is that I have fried 4/5 chips already, 2 from static (my fault) 1 from incorrect wiring (my fault) 1 from switching on suddenly ?? this is a real worry it is supposed to be 40 volt max. (I really don't know why this happened, maybe my input capacitor was not making good contact.) This chip had been working happily for 2 hours. This must be the first time I have ever burnt more than 1 chip on a project in my life, and I have burnt 4. I must get an anti static mat. I only have one chip left, it's wired in and going fine but I am scared to turn it on suddenly, I will contact the manufacturer and see what they say. Unfortunately I am going to stop development on this project now, at least for a while. My main project is actually domestic low voltage lighting, and I think that the attiny might be more suited, and more robust. I may pick it up again one day, with the Go architecture, we will see. [Picture now attached.]

Attached Thumbnails

  • NCL30160 002 small.JPG



#26384 USB Audio Device - FINALLY WORKS!!

Posted by Magpie on 04 April 2012 - 12:24 PM in Project Showcase

I guess it comes down to the fact that the pc is the most versatile source of sound anyway, it can take in a hdmi input and push it down the usb probably.



#26371 USB Audio Device - FINALLY WORKS!!

Posted by Magpie on 04 April 2012 - 10:40 AM in Project Showcase

I know nothing about hdmi, but I think in the near future I am going to learn.



#26344 Redacted 00101100

Posted by Magpie on 04 April 2012 - 12:52 AM in General Discussion

It's April 4 where I live. time to wake up Chris. Whatever happens don't launch your product the way Raspberry Pi launched theirs, eg. Vapourware, false dates, blaming others, incompetence, probable lies, threats on forums to track down people who ask awkward questions. I must admit I found it intriguing. Actually I'm sure Netduino wouldn't do this anyway.



#26339 USB Audio Device - FINALLY WORKS!!

Posted by Magpie on 03 April 2012 - 10:46 PM in Project Showcase

What about standard HDMI inputs? Do have any idea if it is feasible to add them?



#26319 USB Audio Device - FINALLY WORKS!!

Posted by Magpie on 03 April 2012 - 01:25 PM in Project Showcase

Doesn't matter so much music can come out of PC anyway. Digital Radio, mp3s, movies. I probably don't need any more.



#26318 Steff Shield

Posted by Magpie on 03 April 2012 - 01:16 PM in Project Showcase

I sorted out my credit card I just got some nice fat toroidal inductors delivered, I hope they are up to the job frequency wise.
I also got the ICs.

I am hoping that most of my efficiency will come from
  • using the hysteresis mode to limit the amount of switching,
  • the high quality inductors
  • and the low rds on of the led drivers.

It really seems to be coming along! Have you had any more thoughts in terms of the drivers themselves in terms of noise constraints?

I am fairly sure that if the cable run is short to the leds from the driver the noise wont be an issue.

The some applications may have longer runs, I am hoping by using twisted pair cables this wont be an issue. Cat 5/6 I think would work well.
I plan to drive the Led Driver with it's maximum pwm input frequency which is 20khz..
Whatever noise is present will be in harmonics of those 20khz. This may give electro-magnetic noise in the 20khz to 200khz region. I am not sure what equipment will be effected by this, if anybody knows please say so.

The other option was to use a non hysteretic mode and keep the buck converter in continuous mode all the time.
This would have less noise, possibly less efficiency and would take larger inductance. I think switching at around 200-500 khz would give near the best efficiency. I haven't found a great solution here, but I am sure there is one. Probably two external fets and a half bridge driver to give a Synchronous buck converter.

I will post an image of the pcb soon.



#26316 USB Audio Device - FINALLY WORKS!!

Posted by Magpie on 03 April 2012 - 12:44 PM in Project Showcase

It sounds really good? I like the sound of that. It's also good that you have had time to test and tweak things, this might take a lot of the headache out for us D class amp usb audio newbies. Is there an easy way to break into the Audio before the D amp? I might want to provide a more traditional set of Audio inputs as well. May the boards come soon.



#26288 analog to digital conversion

Posted by Magpie on 03 April 2012 - 12:12 AM in General Discussion

The minimum specifications that you need to decide are: Max input voltage that needs to be measured. Min input voltage that needs to be measured. ( this can be negative) Max allowable error. in volts (error can be due to many things such as noise, resolution, non linearity and more) Number of measurements per second. Number of channels to measure. From these you can calculate your number of bits ADC, but add a couple of bits so that the adc resolution isn't actually the limitation on your error. Also from these someone should be able to suggest your analogue input circuitry and ADC devices. So if you can list answers to these someone may be able to help you further.



#26123 AnalogInput Repeatability

Posted by Magpie on 30 March 2012 - 05:43 AM in Netduino 2 (and Netduino 1)

I suspect its is noise on your voltage reference. I have got best results using a dedicated Voltage regulator into Aref. Use Vin as your input and ARef on your output. You also need a load resistor so that the voltage regulator's minimum drive is satisfied. (around 1k?) If you have a 7805 you could pad the output down to 3.3v using resistors before putting into AREF. ps. You will need a line of code to use ARef as well. Sorry gotto go. It's beer o'clock.



#26068 How to draw 220V motor

Posted by Magpie on 29 March 2012 - 12:43 AM in General Discussion

I am not sure how your current controller works but to do speed control of an AC induction motor you will need the equivalent of a Variable Speed Drive (VSD). These are prohibitively expensive, so you might have to look at a DC motor. If you have any details of your current motor controller, I would be interested to see what it does.



#25983 Steff Shield

Posted by Magpie on 26 March 2012 - 11:59 AM in Project Showcase

Sure Ralim
I would be happy to send you something for trial. Sorry it's taken so long to reply.

It seems I can't easily avoid the hysteresis style dimming, but I am just a bit worried about em noise.
Still there are things you can do about it. I will look into that later once it is built.

Basically I want to use a buck topology, this is a step down only converter and as such is slightly more efficient than a step up or a step up/down converter. Have a look in Wikipedia if you need more background.

The only slight difference with the led driver circuit from a normal buck converter is that we pulse modulate to set our desired current, where most converters pwm to set the voltage as long as the current is not above some limit.
We will choose the non synchronous version because it is a lot simpler and only has slightly higher inefficiencies.

To make a Led driver Stupidly efficient we have to work out where our losses will be.

From Wikipedia. Sorry if I don't elaborate every point.
Conduction losses that depend on load:

  • Resistance when the transistor or MOSFET switch is conducting. (we will choose a fet with this as low as possible. we need to drive fet at high enough joltage to minimize this.)
  • Diode forward voltage drop. (we will choose a diode with Vf as low as possible.)
  • Inductor winding resistance. (we will choose an inductor with R as low as possible. This is where most drivers skimp.)
  • Capacitor equivalent series resistance. (we will choose capacitors with R as low as possible.)
Switching losses:
  • Voltage-Ampere overlap loss. (we will minimize switching through our hysteris method and make sure that we control the fets gate fast. Also Totem pole should not go into heavy saturation.)
  • Frequencyswitch*CV2 loss. (choose fet with small gate capacitance)
  • Reverse latence loss. ( I think this is about the diode and it being a fast recovery type.)
  • Losses due driving MOSFET gate and controller consumption. ( make sure that the driving transistors are biased properly, otherwise minimise as best you can.)
  • Transistor leakage current losses, and controller standby consumption. (shouldn't apply to fets)


If you want to know a very good app. note on driving fets see this one by Laszlo Balogh .

I have decided on the NCL30160 from On Semi and because it seems the most efficient, even though the driver chip has an internal fet. The internal fet should simplify things.

The NCL30160 has a very low Rds on( resistance in ohms between drain and source when the fet is turned on.) , compared to its peers, so it was the clear winner.

In the data sheet is has a circuit diagram, I have lifted it straight into SteffShield.
We still have to select component values though, I will make a prototype and see what I can get out of it.

Attached Thumbnails

  • steff shield schematic version3.png



#25928 [UK] Electrical Supply help

Posted by Magpie on 24 March 2012 - 12:21 PM in General Discussion

Yes I did see you said undervoltage, I just made a big presumption that only overvoltage will take out the light globes. Anyway hopefully you have found the cause of your troubles. Good Luck



#25926 USB Audio Device - FINALLY WORKS!!

Posted by Magpie on 24 March 2012 - 11:43 AM in Project Showcase

Is it going to work first go? No mods. Of course it is!



#25924 [UK] Electrical Supply help

Posted by Magpie on 24 March 2012 - 11:38 AM in General Discussion

Hi Do you have smoke alarms? If you dont you should get some, even though they are annoying. Like Mario I find it difficult to see how a blowing light bulb would take out a circuit breaker. I am not saying it didn't happen but it's hard to understand. The only reasons I can think of for overvoltage on your mains are line surges or a broken neutral. Broken neutrals I would say are quite uncommon but can have serious consequences. If you ring up your supply Authority and say you suspect you have a broken neutral they might come and inspect for free. Can you get a second sparky in to verify the safety of the installation, especially the neutral and the earth connections, don't get the first one he may be dodgy, I would say it might be two hours work. Otherwise can you just turn off any dodgy circuits, at the switchboard and see if the rest of the house is ok? I wouldn't be getting the multimeter out unless you know what you are doing, and you are in a clear state of mind.



#25882 USB Audio Device - FINALLY WORKS!!

Posted by Magpie on 23 March 2012 - 02:25 AM in Project Showcase

Hi Just a word of warning. But hopefully it wont apply to you because you're using eagle. I uploaded some kicad gerbers to BatchPCB and everthing passed DRC but.... The images of the layers they sent me back were all wrong. They seemed to have mixed up my layers and I had copper traces saying R3 instead of silkscreen. I tried numerous times but could not resolve it. So hopefully you checked the images they sent back and they were good, or maybe it was just my images that were wrong. That was the reason I went with Olimex instead.



#25763 Sharing code between projects

Posted by Magpie on 20 March 2012 - 10:49 AM in Visual Studio

Scrub that, I misread the question.

So some of your source code is identical, in both types of projects, so you only want to maintain one copy of it. Is that what you want?

You definitely can't share the compiled code, but I don't think there is any reason that you can't share the source code, if you can get it to compile in both types of projects. You might have to use a lot of ifdefs or whatever C# has for conditional compilation.

I think you would be better off having two solutions and cutting and pasting any similar code.
That way you can have two instances of visual studio and can debug both at the same time.



#25673 USB Audio Device - FINALLY WORKS!!

Posted by Magpie on 18 March 2012 - 07:21 AM in Project Showcase

Hi Hanzibal I used Kicad recently, I found it fairly easy to learn, compared with Eagle anyway. Also it is open source and you are not limited in anyway. Both packages have their own bizarre UI way of doing things but you get used to it. I must admit I didn't get far with Eagle, I seemed to get a mental block whenever I open it up. With KIcad I followed some video tutorials and I have managed to do just about everything. The only thing I still haven't managed is to fill an earth plane in an easy way. But I managed to import all the eagle libraries, sparkfun libraries into Kicad and make my own library. Then layout a board that passed DRC by olimex. Although I got pinged 3 Euros by then for using non standard drill holes. I would use some form of source control with your drawings, libraries as it is quite easy to do things inadvertently. So the ability to roll changes back is critical. Diptrace is also supposed to be ok but I didn't try it.



#25649 Minimum AnalogInput Read value

Posted by Magpie on 17 March 2012 - 10:04 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Probably the last thing I can think of is for you to post some repro code. If you can post some code that allows people to reproduce this, then I could do a comparison. Also mention any other wiring you might have, Secret Labs firmware version, also are you using ethernet? Sorry you already answered this. Maybe its something called "burden voltage", although it seems very high.



#25643 Minimum AnalogInput Read value

Posted by Magpie on 17 March 2012 - 01:28 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi The readings you did looked fine unless of course your software is using Aref. There was a couple more questions you didn't answer. What does your software read. Tied to ground. Also Are you using ARef in your code? The is a setting in code you might have to call.



#25606 Minimum AnalogInput Read value

Posted by Magpie on 16 March 2012 - 11:13 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Spcboog I know I am late on this but I think there are a couple of readings you should try. Tie at least 2 of the "Analogue In" pins to ground each via a resistor say 1k and disconnect the sensor. Measure the following pins with the black probe connected to GND. Vin, 5V, 3.3v, ARef, AGND, and obviously the analogue pins. Tell us what your readings are. What does your software read. Also Are you using ARef in your code? It often pays to double check the obvious.



#25605 Steff Shield

Posted by Magpie on 16 March 2012 - 10:39 AM in Project Showcase

I am going for the A8447 from Allegro for the step down Vin buck converter.
The only trouble is digikey doesn't like my credit card. So I might have to use the A8499 which is similar but not as good. Attached is a schematic of the shield without the actual led drivers.


I haven't decided on a chip for the Led Driver, I have been looking at hysteretic control, which is turned on and off by PWM at speeds in the kilohertz.
Hysteretic control is basically measuring the current through the inductor and turning on when it is lower than the low threshold and turning off when the current is higher than the high threshold. It's very efficient because it minimises the switching rate.

This seemed perfect until I realised that this would still be noisy in the top end of the hearing range. I really want the converter to operate in continuous mode to reduce noise. Wheres the LM3401 goes into and out of continuous mode at 20khz.

I have plenty of options but no obviously good ones.
  • adjust the thresholds rather than the enable.
  • use a different chip with a different control method.
  • go back to a home brew style circuit.

Attached Thumbnails

  • LM3401 schematic.png
  • LM3401 waveform.png



#25599 Detecting Sensor Type

Posted by Magpie on 16 March 2012 - 08:32 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Mohammad The short answer is no. Generally when you put together a circuit you know what you are connecting, so it is not necessary. Usb devices do have a discovery mechanism but I am fairly sure the Netduino usb connector cant be configured as a usb host anyway. Maybe if you give us more specific information about your needs there might be another way to do it.




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.