A new Arduino project..

For Automotive-related projects such as ECUs and microcontollers. For Scimitar and Sabre original equipment, please use the relevant model areas.

Moderators: scimjim, Lukeyboy46, erikscimitardemon, Roger Pennington, philhoward

User avatar
scimjim
RSSOC Member
Posts: 40186
Joined: Sun Oct 01, 2006 10:08 pm
Location: Gloucester
Has thanked: 189 times
Been thanked: 1281 times

A new Arduino project..

Post by scimjim » Tue Jul 14, 2020 7:38 pm

A search on the site threw this up:

The other problem is that the analogue in is 10 bits resolution, that is the numbers change from 0 to 1203 where as the PWM output has only 8 bit resolution, numbers change from 0 to 255.

You could feed the PWM output from one system to a digital input of the other, then you could use the pulse function to measure what is coming in.
However there are much better ways of transferring data between two system, look at I2C using the wire library, make on a master and the other a slave and transfer the numbers digitally.


Jim King

SECURE DRY STORAGE FOR YOUR SCIMITAR

Current: SE5 (8Ball), 1400 1600 1800 Zetec ST170 powered SS1 (G97), 2.5TD SE5a (diesel 5a), 6 x random other SS1s.
Previous: SE5, 3 x SE5a, 2 x SE6a, 3 x SE6b, GTC, 2.9i GTC, 3 x 1600 SS1, 1300 SS1, Mk1 Ti Sabre, Mk1.5 CVH Sabre, TI SS1 (snotty), 1600 SS1 (C686CCR).
Chief mechanic for: 1400 K series SS1 (Megan3), 1400 CVH EFi SS1 (Grawpy), 1300 SS1 (Number One) & Sarah's coupe.
CURE THE FAULT - NOT THE SYMPTOMS

User avatar
Old and Slow
RSSOC Member
Posts: 1500
Joined: Tue Jan 20, 2015 5:37 pm
Location: East Berks
Has thanked: 2 times
Been thanked: 101 times

A new Arduino project..

Post by Old and Slow » Tue Jul 14, 2020 7:43 pm

Wouldn't you stick an RC circuit between the two, to turn the PWM signal into a proportional voltage?


Philip Needham
Ashley-bodied TR3; '54 Ford Consul; '55 AC 2-Litre Saloon;'65 850 Mini; '70 Ford Zodiac MkIV; XR3i
'81 911SC Targa, '64 Sabre Six

User avatar
AJL Electronics
RSSOC Member
Posts: 8251
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 52 times
Been thanked: 322 times
Contact:

A new Arduino project..

Post by AJL Electronics » Tue Jul 14, 2020 8:59 pm

As you say, t isn't an analogue signal so if you fed it direct, the receiver will merely see a toggling digital signal. If you want to read an analogue version of the PWM, you will need to integrate it. I would try some small capacitors to give an average value in the first instance.


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
philhoward
RSSOC Member
Posts: 27306
Joined: Tue Aug 29, 2006 5:41 pm
Location: Staffs, UK
Has thanked: 132 times
Been thanked: 877 times
Contact:

A new Arduino project..

Post by philhoward » Tue Jul 14, 2020 9:02 pm

If going serial transmission I’d look to invoke CAN probably but I don’t (at this stage) want to change the code on the “sending” side. I was almost sure it wouldn’t be happy as it was but not sure if it would be happy driving an RC circuit - plus it could affect the response time.

I think the idea I had was a non-starter :oops:


Phil Howard
Scimitarweb Forum Admin
SS1 1600 Rooster Turbo; Sabre Mk1.5, Sabre Mk2
SS1 Racer
Previous: SE5/5a/SS1 No.1/SS1 Rooster/SS1 1800Ti/SE5a 24 Valve
http://www.ss1turbo.com
Never try and argue with an idiot. They drag you down to their level, then beat you based on experience.

User avatar
AJL Electronics
RSSOC Member
Posts: 8251
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 52 times
Been thanked: 322 times
Contact:

A new Arduino project..

Post by AJL Electronics » Tue Jul 14, 2020 9:21 pm

What was the idea? More than one route to paradise, don't you know? :mrgreen:


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
philhoward
RSSOC Member
Posts: 27306
Joined: Tue Aug 29, 2006 5:41 pm
Location: Staffs, UK
Has thanked: 132 times
Been thanked: 877 times
Contact:

A new Arduino project..

Post by philhoward » Tue Jul 14, 2020 9:28 pm

Using the “boost” output (PWM to a pneumatic solenoid) to feed my DBW-esque bypass valve on the supercharger. Not necessarily for the immediate need (if it works at all I’ll be happy) but so I only need to change one “ECU” rather than two. I’ll need some sort of additional drive (H Bridge I’ve gone for ) anyway as the motor in the throttle is 1.2 Ohms - somewhat more than the Speeduino fancies feeding plus it needs to be driven open - the spring return isn’t quick enough for my liking.


Phil Howard
Scimitarweb Forum Admin
SS1 1600 Rooster Turbo; Sabre Mk1.5, Sabre Mk2
SS1 Racer
Previous: SE5/5a/SS1 No.1/SS1 Rooster/SS1 1800Ti/SE5a 24 Valve
http://www.ss1turbo.com
Never try and argue with an idiot. They drag you down to their level, then beat you based on experience.

User avatar
philhoward
RSSOC Member
Posts: 27306
Joined: Tue Aug 29, 2006 5:41 pm
Location: Staffs, UK
Has thanked: 132 times
Been thanked: 877 times
Contact:

A new Arduino project..

Post by philhoward » Wed Jul 15, 2020 4:27 pm

And I've broken "something"...

Tried to upload (strictly download from programmer to device, but I'll let them off) and it seems to go through the motions, except doesn't actually spit the revised sketch in there, giving me some useless/ful error messages:
Arduino: 1.8.12 (Windows 7), Board: "Arduino Nano, ATmega328P"

Sketch uses 6808 bytes (22%) of program storage space. Maximum is 30720 bytes.
Global variables use 453 bytes (22%) of dynamic memory, leaving 1595 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM16 -b115200 -D -Uflash:w:C:\Users\PHIL~1.HOW\AppData\Local\Temp\arduino_build_53336/sketch_ETB_Nano.ino.hex:i

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM16
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

COM port is correct - I can see my export of info in Serial Monitor (albeit at 9600 Baud, but this is exactly as it was before). Driver reloaded, Even re-installed the IDE - no change.

Any ideas? RX pin isn't shorted or connected to anything else. Tried 2 USB cables, and 2 USB ports - no difference.


Phil Howard
Scimitarweb Forum Admin
SS1 1600 Rooster Turbo; Sabre Mk1.5, Sabre Mk2
SS1 Racer
Previous: SE5/5a/SS1 No.1/SS1 Rooster/SS1 1800Ti/SE5a 24 Valve
http://www.ss1turbo.com
Never try and argue with an idiot. They drag you down to their level, then beat you based on experience.

User avatar
philhoward
RSSOC Member
Posts: 27306
Joined: Tue Aug 29, 2006 5:41 pm
Location: Staffs, UK
Has thanked: 132 times
Been thanked: 877 times
Contact:

A new Arduino project..

Post by philhoward » Wed Jul 15, 2020 4:44 pm

Delay my last - used the "old Bootloader" option and it works... :oops:


Phil Howard
Scimitarweb Forum Admin
SS1 1600 Rooster Turbo; Sabre Mk1.5, Sabre Mk2
SS1 Racer
Previous: SE5/5a/SS1 No.1/SS1 Rooster/SS1 1800Ti/SE5a 24 Valve
http://www.ss1turbo.com
Never try and argue with an idiot. They drag you down to their level, then beat you based on experience.

User avatar
AJL Electronics
RSSOC Member
Posts: 8251
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 52 times
Been thanked: 322 times
Contact:

A new Arduino project..

Post by AJL Electronics » Wed Jul 15, 2020 5:09 pm

Took me a while to suss that one too! Enable the verbose error reporting, it helps a lot.


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
AJL Electronics
RSSOC Member
Posts: 8251
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 52 times
Been thanked: 322 times
Contact:

A new Arduino project..

Post by AJL Electronics » Thu Jul 16, 2020 9:07 am

@philhoward

I have sorted out what was wrong with my BMW interface and it isn't my fault. The EasyEDA package has preloaded components with matching footprints for the board. On the 1N4148 and 1N914 diodes, there are only 3 system options. All of them have the idents reversed. There were hundreds of "user contributed" entries and 99% of those were all wrong too. I updated to the only correct one I found and it has mucked up my PCB layout. I also found an error in the Arduino Nano footprint, where pin 16 was declared twice and pin 15 not at all. Once I swapped out the diodes and replaced the transistors it had taken out, it all sprang into life.

Conclusion... Check all the footprints before committing to a PCB design.


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
philhoward
RSSOC Member
Posts: 27306
Joined: Tue Aug 29, 2006 5:41 pm
Location: Staffs, UK
Has thanked: 132 times
Been thanked: 877 times
Contact:

A new Arduino project..

Post by philhoward » Thu Jul 16, 2020 9:33 am

Anything free is worth exactly what you paid for it.. :mrgreen:


Phil Howard
Scimitarweb Forum Admin
SS1 1600 Rooster Turbo; Sabre Mk1.5, Sabre Mk2
SS1 Racer
Previous: SE5/5a/SS1 No.1/SS1 Rooster/SS1 1800Ti/SE5a 24 Valve
http://www.ss1turbo.com
Never try and argue with an idiot. They drag you down to their level, then beat you based on experience.

User avatar
Old and Slow
RSSOC Member
Posts: 1500
Joined: Tue Jan 20, 2015 5:37 pm
Location: East Berks
Has thanked: 2 times
Been thanked: 101 times

A new Arduino project..

Post by Old and Slow » Thu Jul 16, 2020 1:49 pm

De-bugging electronics - don't you just love it!!


Philip Needham
Ashley-bodied TR3; '54 Ford Consul; '55 AC 2-Litre Saloon;'65 850 Mini; '70 Ford Zodiac MkIV; XR3i
'81 911SC Targa, '64 Sabre Six

User avatar
AJL Electronics
RSSOC Member
Posts: 8251
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 52 times
Been thanked: 322 times
Contact:

A new Arduino project..

Post by AJL Electronics » Thu Jul 16, 2020 3:16 pm

Old and Slow wrote:
Thu Jul 16, 2020 1:49 pm
De-bugging electronics - don't you just love it!!
Not when it means lifting and and replacing SMDs that you can hardly see, let alone identify!


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

Ford
RSSOC Member
Posts: 209
Joined: Fri Nov 10, 2017 5:49 pm
Location: Hull
Has thanked: 25 times
Been thanked: 15 times

A new Arduino project..

Post by Ford » Thu Jul 16, 2020 3:26 pm

I feel your pain, having spent the past week going through testing and trying to find fixes for latest version of board for a medical device I develop, absolute nightmare


SS1 1316

Post Reply

Return to “Automotive Electronics”