Roadblock

A "new fashioned" televisor, using an Arduino to drive the motor and display.

Moderators: Steve Anderson, Dave Moll, Andrew Davie

Roadblock

Postby Andrew Davie » Sat Jul 29, 2017 11:52 pm

I seem to have hit a bit of a roadblock and I'm not quite sure what to do now. With both my SeeedStudio and my PCBWay boards, which are essentially the same, everything sort-of works, up to a point. I have the LCD user interface functional, select a file (so the SD card is operational). The motor starts, the disc stars spinning, the LED lights flash appropriately, the disc gets up to speed, and then - it all stops. I have a feeling it's at the point where the PWM for the disk becomes 0, and the disc starts free-spinning (to slow down). At that point, I guess, there's some disc-as-a-generator happening and perhaps I'm getting some sort of back-current resetting the Arduino...? Dunno. I have a diode on the motor.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1508
Joined: Wed Jan 24, 2007 4:42 pm
Location: Hobart, Tasmania, Australia

Re: Roadblock

Postby Andrew Davie » Sun Jul 30, 2017 1:13 am

OK, a bit of progress. I had a look at the PID code controlling the speed of the disc. More specifically, the code just before the PID kicks in. This code sets the motor PWM to full-speed, and then awaits until the disk is just slightly underspeed. It then (for just a brief instant) sets the motor PWM to zero, and next loop the PID becomes operational. I made a change to this - I removed the "set PWM to zero" and modified the PID so that it never allowed a speed less than a threshold (say, 25%). The thinking behind this was that a sudden change in motor demand was causing a backflow/spike. This has actually "fixed" the problem - the machine now successfully plays videos and locks frame perfectly, without resets.

There are a number of other problems/issues.

1. the MicroSD card is unreliable on boot - only visible about 30% of the time. I think this might be because I'm feeding it 5V instead of 3.3 (will fix next iteration) but also I have noticed that the card select pin is floating on boot. I should put a pull-up resistor in there to fix this.
2. The video has lines through it. Again a symptom of undervolt on the LED array. I will try increasing the input voltage and see how we go.
3. Nothing on the speaker - no sound at all. I have to track this one down no idea yet what's causing that.

OK, still a lot of work to do but it's a step forward. I now have a stand-alone "single board televisor" running of the single power supply input. It's all a journey I know some of my design decisions are less than ideal but boy I've learned a lot! I might do another order through PCBWay with an updated circuit board running the SD on 3.3V with a pull-up on CS. I'm not really happy/confident about my "fix" to the resetting but it does now appear to be confirmed that my diagnosis on the motor PID/abrupt change being a root cause.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1508
Joined: Wed Jan 24, 2007 4:42 pm
Location: Hobart, Tasmania, Australia

Re: Roadblock

Postby Andrew Davie » Sun Jul 30, 2017 2:33 am

I put in a pull-up (10K) to 3V3 for the CS pin of the MicroSD reader, and changed the supply to that from 5V to 3V3. After re-routing with Eagle, I'm happy enough to send off the circuit board to PCBWay for another run. Here's the design; the all-blue is because I'm using a ground plane this time - most of the back surface is just ground.

arduinovisor20170730.jpg
arduinovisor20170730.jpg (391.52 KiB) Viewed 1644 times
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1508
Joined: Wed Jan 24, 2007 4:42 pm
Location: Hobart, Tasmania, Australia

Re: Roadblock

Postby Steve Anderson » Sun Jul 30, 2017 3:26 pm

The issue with the SD card only working around 30% of the time could certainly be down to the missing pull-up on CS. Seeing as you're using it in SPI mode (only one in & out) it may get stuck in its native mode. Let's hope it fixes it.

You may need some resistive dividers on the inputs to the SD card - I'm assuming the Arduino is driving these at 5V, the CS, MOSI and SCK. This does though create a slight conflict with the CS requirement of a pull-up. Not sure how I would resolve this. A single transistor inverter would do it, but it would require inverting the CS function of the code.

It's a shame that the Arduino uses 5V as so much stuff is going over to 3.3V. Or is there a 3.3V version? Might be worth considering.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 3800
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Roadblock

Postby Andrew Davie » Sun Jul 30, 2017 7:12 pm

Well, my "abuse" of the motor (in that I was driving it full-power and then zero and then probably full very soon thereafter) appears to have been the cause of all the reset problems I had. I haven't seen a single glitch since I changed the code to be more "gentle". So I have been doing a bit of testing, using the new board, the new LED matrix (got 1000 new ultra-bright LEDs yesterday for US$11 delivered - around 1 cent each), and --- roll drums --- the 15V power brick I bought a while back. The system actually works with this power input, so now I have weaned it off the massive and scary 240V barebone transformers onto this light and very safe-feeling switch-mode power supply. Despite the dangers of all the noise that can come with these things, my system is actually working beautifully and displaying a nice clean and stable picture. I still have an issue with no sound, but I'll get onto diagnosing that later. Meanwhile, I did a short video showing the new (PCBWay) board in action. It seems to be working quite well - with the provisos that I still need another round of prototyping to fix the MicroSD power (from 5V to 3V) and also the select pin needs a pull-up. But... quite pleased with this now!


youtu.be/LIY_QkTzIX4
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1508
Joined: Wed Jan 24, 2007 4:42 pm
Location: Hobart, Tasmania, Australia

Re: Roadblock

Postby Andrew Davie » Mon Jul 31, 2017 11:45 pm

Today I populated a second of my most recent prototype boards. This time, instead of using scavenged/reclaimed components from earlier tests, I went with all-new components for everything. In my last build, things mostly worked, except for the sound. In this one, everything works! Sound is fine, video is fine, synching, LCD working... and for this one I put a pull-up resistor on the card select pin hoping that might fix the issue with the SD not being seen on boot. Jury still out on that one. So, now I have a completely functional, completely stand-alone televisor circuit board running without computer attached. With sound! Here's a video...


youtu.be/GM1C3cLfelk

As I have 8 of these boards still to play with, I think it's about good-enough to give away one or two - so if you'd like one to play with drop me a note.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1508
Joined: Wed Jan 24, 2007 4:42 pm
Location: Hobart, Tasmania, Australia


Return to Andrew Davie's Arduino Televisor

Who is online

Users browsing this forum: No registered users and 1 guest