Jump to content
Why become a member? ×

Guitar Pickup Winder


rwillett

Recommended Posts

On 29/01/2024 at 11:52, rwillett said:

The moral of this story is "Dont mess with things that you think you understand but really don't, because it could be expensive and you literaly do get your fingers burnt".

But where is the fun in that!

LOVING this build!

Sam x

Link to comment
Share on other sites

1 hour ago, SamIAm said:

But where is the fun in that!

LOVING this build!

Sam x

 

I'm tired of playing with fire...  and electricity greater than 0.1A and 5V... and circular saws that jump off the bed...and heat sinks that can melt lead...and toxic fumes from playing with ABS...and picking up hot metal from forges...

 

I just about have 10 fingers and thumbs, though I look at them and I have knocked chunks off them and have had bits sewn back on.

 

Rob

  • Like 2
Link to comment
Share on other sites

36 minutes ago, Richard R said:

 

😲

 

Isn't that dangerous? What if the duvet gets caught in the saw???

That's exactly my point as to why I shouldn't be let near power tools. 

  • Haha 1
Link to comment
Share on other sites

4 hours ago, rwillett said:

 

Equipment I have, time to write a comms protocol to exchange information to drive a separate LCD display on a different Arduino, not so much.

 

That's a fair point, as making a design change inevitably results in unexpected further difficulties, time and effort.

 

Unfortunately in my experience, so does keeping the design the same…

Link to comment
Share on other sites

On 29/01/2024 at 13:12, rwillett said:

As an aside the company I worked for as a sandwich student (do they still exist?), brought something like the 2nd Apple Lisa in the UK when it came out.  I worked doing research in formal methods and the dept next door had the Lisa.

OMG, just spotted this blast from the past.  During my first degree (Attempt, 3 years in medical school learned me that I did not want to study medicine!) in '82, I was very involved in the computer club, eventually the Head of School IT chap gave me a key to his office and I spent many enjoyable hours on the Apple Lisa in there ... dial up acoustic coupler to this and that and some dev tinkering.

Sam x

Link to comment
Share on other sites

After spending a number of evenings trying to get two Arduinos to talk reliably to each other through serial comms, I have given up. I can get them talking but no matter what I try, I cannot make it work reliably. I keep getting spurious characters. I suspect there is a timing issue that I simply don't understand. It's embarrassing to keep hitting my head on the table in front of the kids as I weep trying to get serial comms to work.

 

So I'm changing my approach. I'm going to work out the i2c protocol and use that instead. I2C is packet based (32 byte messages) and looks significantly simpler, once you understand it (key point). The advantages of i2c is that it is a master/slace relationship using unique addresses for devices.

 

The new approach will be:

  1. The Arduino Nano will be the master. This may become an Uno if I need a few extra IO pins. Its going to be tight but an Uno is no big problem.
  2. The Arduino Mega will be one slave. 
  3. The 4x4 keyboard and LCD display will move from the Mega to the Uno. This simplifies comms. My original intention was to make the Uno a display only device and all the display commands would come from the Mega.
  4. The Mega may get replaced by a simpler Uno as the additional pins on the Mega are not needed now the display and keypad have moved to the Nano or Uno
  5. The Mega and LCD will be slaves on the I2C bus but this still allows bidrectional communication. to the master Nano. (Kinky)
  6. The software design now has all the LCD and keypad handling on the Nano. The Mega just does motors.
  7. The Nano master will simply send motor commands to the Mega slave in a fire and forget approach. The Mega slave will the count of motor step updates back to the Nano master every second or so via the I2C bus. The Nano will simply update as needed.
  8. The Nano master will write state into the 512Byte (512 BYTES!!!) so it remembers state after being turned off.

Most of the code will continue to be used, especially all the motor code. I will refactor the keyboard and LCD code to work on the Nano and use the I2C to interface it all.

 

Lets see how this goes....

Rob

 

  • Like 1
  • Confused 1
Link to comment
Share on other sites

10 hours ago, rwillett said:

 

So I'm changing my approach. I'm going to work out the i2c protocol and use that instead

 

...one day Rob when you're retired and a grumpy old git, believe me, you'll look back on all your endeavours, and think:

 

"Is it nearly beer o'clock?"

 

...did you visit the MODBUS rabbit-hole yet?

 

Link to comment
Share on other sites

And for those of you who remembered when memory was expensive and we really, really, really had to save memory

 

This is the output of one of the sketches for the Arduino. This is for an Uno which has 32KB of program space (where the executable resides) and 2K (Two f%^&*@£ing KiloBytes of memory)  I have washing machines with more space. I have ball point pens with more capacity than this. My sodding cat flap has more storage space than 2KB. I suspect the dogs glow in the dark collar has more than this.

 

I've spent athe last two hours writing string arrays to sit in readonly mode to get more space for local storage and the stack. 2KB of local variable space <shakes head and goes and opens another bottle of wine> Kids today, don't know they are born.

 

Sketch uses 3120 bytes (9%) of program storage space. Maximum is 32256 bytes.
Global variables use 368 bytes (17%) of dynamic memory, leaving 1680 bytes for local variables. Maximum is 2048 bytes.

 

  • Haha 2
Link to comment
Share on other sites

I feel your pain,  I do think modern programming is so much quicker than all the low level stuff I remember. 

Started programming on a ZX81, so yes I remember when memory was tight, men were real men,  programmers were real programmers and small furry creatures from Alpha Centuri were real small furry creatures from Alpha Centuri.

 

 

Edited by Richard R
  • Like 2
  • Haha 3
Link to comment
Share on other sites

I enjoyed my  ZX81 (Damn that wobbly RAM extension!), but played with the Comodore PET and Tandy TRS-80 and Superbrain before.

I LOVED the instruction set of the Z80!

sam x

Edited by SamIAm
Link to comment
Share on other sites

1 hour ago, SamIAm said:

I enjoyed my  ZX81 (Damn that wobbly RAM extension!), but played with the Comodore PET and Tandy TRS-80 and Superbrain before.

I LOVED the instruction set of the Z80!

sam x

I remember the wobbly ZX81 RAM pack. 8KB and 16KB? Didn't the ZX81 turn the display off for certain instructions as it couldn't refresh the screen display and execute the code at the same time? Was it 1Mhz or something? perhaps it was 4Khz :)

 

Kids today don't know they are born.

 

Rob

  • Like 1
Link to comment
Share on other sites

There's something else you could try - driving the LCD direct from the Arduino rather than through the I2C adaptor. More fiddly but it may be the I2C bus that's slowing it down.

 

https://docs.arduino.cc/learn/electronics/lcd-displays/

 

Also, junk the Uno and use an ESP32. Smaller, cheaper, and you have wireless and bluetooth built in if you want to use them.

  • Like 1
Link to comment
Share on other sites

It looks like the LCD itself is sloooooooow. The i2c bus works at 100K. It's not much faster than a decent modem but it's enough. The timings for changing the LCD Display are quite large, I didn't realise TBH but I am where I am.

 

I've just got the i2c packet stuff working now. Just sending down "Hello World" from the Uno to the Mega and it's a lot more reliable and simpler.

  Wire.beginTransmission(1);                                                
  Wire.write("Hello World 2");                                                    
  Wire.endTransmission();    

 

I'm getting 13 bytes every time which is more than I did with the serial comms.  It's non-blocking as well (AFAIK), so it looks OK.

 

Now I need to get bidirectional comms, initially an ACK and then some more informative stuff.

 

I have Arduinos around me and shields and I've just spent a few weeks learning more about how they work.  No idea about the ESP32 so will stay on these as it looks a lot more promising, I'll work with a 2K variable limit. Will force me to be creative and selective.

 

Rob

  • Like 1
Link to comment
Share on other sites

On 18/02/2024 at 14:50, rwillett said:

I have Arduinos around me and shields and I've just spent a few weeks learning more about how they work.  No idea about the ESP32 so will stay on these as it looks a lot more promising, I'll work with a 2K variable limit. Will force me to be creative and selective.

 

You can program an ESP32 using the Arduino IDE, although it doesn't use Arduino shields.

Link to comment
Share on other sites

I did read more up about it and I found that out. I have 4-5 Arduinos anyway, so will keep using them, the 2K limit is a challenge but I can make it work.  The ESP32 doesn't seem to have quite such a large eco system around it, thought it does look very capable. Perhaps V2 :)

  • Like 1
Link to comment
Share on other sites

What is this FTW of which you speak?

 

Fitness To Work?

For The Win?

F**k The World?

Forever Two Wheels?

Free the Whales?

Free To Watch?

Feel The Wind?

For The Will?

Fight To Win?

Finding The Way?

Feed The World?

For Those Wondering?

Ford Truck World?

Forschungszentrum Telekommunikation Wien?

Fear The Wire?

Free Trade Wharf?

Florida Tax Watch?

 

  • Haha 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...