Electronics using Andrew's Arduinovisor PCB

Moderators: Dave Moll, Andrew Davie, Steve Anderson

Electronics using Andrew's Arduinovisor PCB

Postby Robonz » Sun Sep 03, 2017 6:17 pm

Firstly, Andrew please do not be offended as I butcher your nicely laid out board. I fully appreciate the effort you put in to making this and I am especially thankful for the free PCB and parts.

I thought I would start by connecting the motor with a 3 ohm resistor to roughly simulate the open drain mosfet configuration. I wanted to see what noise the board would be exposed to, as I don't want to blow it up on the first power up. The motor/brush noise was much worse than I expected, Here is an image. At least 1 volt of ripple and a nasty transient spike which could easily be many volts. That spike driving through the mosfets miller capacitance could destroy the micro. It could also get into the power rails and do damage.

Image

As the motor only spins in one direction and is driven via open drain. My simple solution was to add 1000uF of electrolytic capacitors directly across the motor to eliminate the noise at the source. I will also need the equivalent capacitance on the non switching side of the mosfet to get rid of the switching noise which I will look at when I power the board up.

The noise is now only 200mV peak to peak and the motor still responds to voltage change quickly. The transient spike is completely gone.

Image

Cheers
Keith
User avatar
Robonz
Evil Genius
 
Posts: 149
Joined: Sat Aug 12, 2017 7:15 pm
Location: New Zealand

Re: Electronics using Andrew's Arduinovisor PCB

Postby Andrew Davie » Sun Sep 03, 2017 9:05 pm

Oh dear, maybe I should "unsubscribe".

My motor has a zener diode and a capacitor across it - this I was advised to do for just the reason you point out. I recall that my capacitor is really small though. And I also recall that I was having resets when the motor got up to speed and then cut-out abruptly. I believe I solved that last one in software by being more gentle on the motor - rather than GOOOOOOOO..... STOOOOPPPPP!!!!!!!!!!! I think I just never go from full power to instant 0 power. This cured my resets which were obviously caused (as I diagnosed/suspected) by inductive spikes coming back down the wire, so to speak.

I guess the defense of my design would be that "it works!" however badly. I would love to see a "better, perfect" version come out of it all. But for my first ever circuit board, I'm still pretty stoked that it does anything at all. So, have at it - I'll be brave :)
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Electronics using Andrew's Arduinovisor PCB

Postby Andrew Davie » Sun Sep 03, 2017 9:07 pm

On re-reading your post - I just want to double-emphasise - the SOFTWARE protects the board somewhat by never driving the motor at full power and immediate zero power (at least during playback; I can't recall if I gently stop the motor on "stop" but that would be easy to do. There is a minimum PWM value sent to the motor during operation, and that dramatically reduces the "spike" during initial synch, anyway. That is, when the disk is first spinning up and gets too fast and the PID switches over to "off"; that is a gentle thing now.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Capacitors

Postby Robonz » Sun Sep 03, 2017 9:52 pm

Hi Andrew

I have been designing and critiquing PCB'a for a long time. For a first PCB you have done very well. More important than anything is 1) Completing 2) Having it work. You have achieved both and have got past the 85% barrier to quote you. I still have to get over that hump too. I am just optimising and making your design robust. Its just a natural instinct for me these days.

The spike I see is the commutation of the brushes breaking the circuit so it is expected at ALL times. This can be managed many ways. I believe the 1000uF will give the best noise performance for a motor that pulls 1 or 2 amps. Set up correctly you can go from 0 to 255 PWM in one go without any worries. As said I will need to add 1000uf to the PCB as well. While it does work for you as it is, it's performance will change dramatically with different discs and motors etc.

What are the values on the Zenner and capacitor? It will take me two seconds to verify their performance. Also they are not on your schematics as for the motor too. I know the motor is not on the PCB but you normally add a symbol for clarity.

FYI: Typically Zenner diodes are too slow to bound a fast transient voltage spike. Another typical solution is to use a half bridge driver but that is not anywhere near as simple as a large capacitor.

Cheers
Keith
User avatar
Robonz
Evil Genius
 
Posts: 149
Joined: Sat Aug 12, 2017 7:15 pm
Location: New Zealand

Re: Capacitors

Postby Andrew Davie » Sun Sep 03, 2017 10:14 pm

Robonz wrote:What are the values on the Zenner and capacitor? It will take me two seconds to verify their performance. Also they are not on your schematics as for the motor too. I know the motor is not on the PCB but you normally add a symbol for clarity.


I don't have easy access to tell you exactly what I have on my motor, so I'm somewhat relying on my "diary" notes on the forum. I have a Schottky diode - it's either a 1N5711 or possibly (but not sure) a 1N5822. The capacitor I have no idea at the moment, other than one of my circuit diagrams shows 680pF. Noted on the comment that this needs to be on the schematics; my excuse is that the schematics were only for me, and I didn't consider the motor part of the design :P
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Electronics using Andrew's Arduinovisor PCB

Postby Andrew Davie » Mon Sep 04, 2017 10:52 am

I have just received in the mail 50x LM2596; if you are needing some of these still... let me know.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Electronics using Andrew's Arduinovisor PCB

Postby Robonz » Thu Sep 07, 2017 9:00 pm

HI Andrew

Sorry I had the flu pretty much all week so have been dead in the water with progress. I am starting to feel better but have to catch up on what I didn't do all week haha. I am keen to get this thing finished soon. I have some great ideas for your board which I hope you will embrace. I will get moving again soon.

The power supplies arrived today so I am all sorted for parts. I was also glad to see a belt in the bag of parts if I change to a quieter pulley driver later. Where are you getting the belts? I may want a shorter one.

BTW the cap and diode across the motor would do very little for the cause. The two most robust solutions are big cap or half bridge driver. I certainly won't be risking the board without either one of them for protection.

Cheers
Keith
User avatar
Robonz
Evil Genius
 
Posts: 149
Joined: Sat Aug 12, 2017 7:15 pm
Location: New Zealand

Re: Electronics using Andrew's Arduinovisor PCB

Postby Robonz » Sat Sep 09, 2017 4:29 pm

Hi Andrew, I am making more progress again

I have the board part built and just wanted to do some testing before I connect the high power devices like the light and motor.I have the SD card, the micro and the screen all connected. I have an SD card with one file Magic Rays of Light.wav fitted.

I turned the unit on and get leds on the mirco and the LCD lights up (TX connected to TX). I was expecting the display to show something other than the default screen. I tried pressing reset and got no change. Is there something I am missing here? Should the "custom" display be working at this point? I have not added firmware as you supplied it with firmware on from memory.

Cheers
Keith
User avatar
Robonz
Evil Genius
 
Posts: 149
Joined: Sat Aug 12, 2017 7:15 pm
Location: New Zealand

Re: Electronics using Andrew's Arduinovisor PCB

Postby Andrew Davie » Sat Sep 09, 2017 4:33 pm

Robonz wrote:Hi Andrew, I am making more progress again

I have the board part built and just wanted to do some testing before I connect the high power devices like the light and motor.I have the SD card, the micro and the screen all connected. I have an SD card with one file Magic Rays of Light.wav fitted.

I turned the unit on and get leds on the mirco and the LCD lights up (TX connected to TX). I was expecting the display to show something other than the default screen. I tried pressing reset and got no change. Is there something I am missing here? Should the "custom" display be working at this point? I have not added firmware as you supplied it with firmware on from memory.

Cheers
Keith



Have you tried touching the screen?
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Electronics using Andrew's Arduinovisor PCB

Postby Andrew Davie » Sat Sep 09, 2017 4:34 pm

Robonz wrote:Hi Andrew, I am making more progress again

I have the board part built and just wanted to do some testing before I connect the high power devices like the light and motor.I have the SD card, the micro and the screen all connected. I have an SD card with one file Magic Rays of Light.wav fitted.

I turned the unit on and get leds on the mirco and the LCD lights up (TX connected to TX). I was expecting the display to show something other than the default screen. I tried pressing reset and got no change. Is there something I am missing here? Should the "custom" display be working at this point? I have not added firmware as you supplied it with firmware on from memory.

Cheers
Keith



Have you uploaded the HMI file to the LCD itself? Process is to put the file in the root directory as the only file on a SD card, plug the card into the LCD and power up. It will self-install the HMI file and then you can remove the SD card and it's all functional. I recall I sent you the HMI file but if I haven't, then let me know!
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Electronics using Andrew's Arduinovisor PCB

Postby Robonz » Sat Sep 09, 2017 4:58 pm

I was not aware I had to load the HMI file. I download your github, 1,500 files . I found nbtv3.HMI stuck it on an SD card, powered up the display and it says

Baud 9600
SD card update.......
No Find file

hrmmm
User avatar
Robonz
Evil Genius
 
Posts: 149
Joined: Sat Aug 12, 2017 7:15 pm
Location: New Zealand

Re: Electronics using Andrew's Arduinovisor PCB

Postby Robonz » Sat Sep 09, 2017 5:14 pm

I now have an NBTV video file on the TFT screen to choose from, yay!

I don't know why but I tried uploading the nbtv3.tft file as TFT means screen. And viola it updated. I dunno what that HMI is for.

Next the touch didn't work so I connected RX to TX versus what I had which was TX to TX and the screen can find the sd card files.

Cool... now I can move on to the next stuff!!!!

Cheers
Keith
User avatar
Robonz
Evil Genius
 
Posts: 149
Joined: Sat Aug 12, 2017 7:15 pm
Location: New Zealand

Re: Electronics using Andrew's Arduinovisor PCB

Postby Andrew Davie » Sat Sep 09, 2017 5:20 pm

Robonz wrote:I now have an NBTV video file on the TFT screen to choose from, yay!

I don't know why but I tried uploading the nbtv3.tft file as TFT means screen. And viola it updated. I dunno what that HMI is for.

Next the touch didn't work so I connected RX to TX versus what I had which was TX to TX and the screen can find the sd card files.

Cool... now I can move on to the next stuff!!!!

Cheers
Keith


Ah yes, TFT sorry - that's the binary. HMI is the source.
Regarding RX/TX yes maybe I should label them differently - I went with the labels on the Arduino.
Glad that it's working so far :)
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Electronics using Andrew's Arduinovisor PCB

Postby Andrew Davie » Sat Sep 09, 2017 5:22 pm

Robonz wrote:Next the touch didn't work so I connected RX to TX versus what I had which was TX to TX and the screen can find the sd card files.


You may find that SD is unreliable/intermittent on 1st boot - that's because although the device is 3.3V, my design actually hooks it up to 5V.
This is corrected in the new circuit board (I'll send you one!) but there's a simple one-resistor fix, which I will send to you when I get home.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Electronics using Andrew's Arduinovisor PCB

Postby Andrew Davie » Sat Sep 09, 2017 6:17 pm

My memory was a bit wrong; the extra resistor is a pull-up for the CS line. This cured the unreliability of the SD card on startup. The new design runs the electronics at the correct 3.3V, but it seems to be happy enough at 5V in the board you have now. Add the resistor from the CS to 3V3 as shown in the picture! It's just a 10K pull-up; anything around that value will be fine.

sdfix.jpg
sdfix.jpg (268.43 KiB) Viewed 17642 times
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Next

Return to Arduino Televisor by Keith Colson

Who is online

Users browsing this forum: No registered users and 3 guests